diff --git a/devtools/client/aboutdebugging/components/workers/Panel.js b/devtools/client/aboutdebugging/components/workers/Panel.js index ec0e815d52d2..8c0df956bd11 100644 --- a/devtools/client/aboutdebugging/components/workers/Panel.js +++ b/devtools/client/aboutdebugging/components/workers/Panel.js @@ -133,7 +133,8 @@ class WorkersPanel extends Component { const isServiceWorkerDisabled = !Services.prefs .getBoolPref("dom.serviceWorkers.enabled"); - const isDisabled = isWindowPrivate || isPrivateBrowsingMode || isServiceWorkerDisabled; + const isDisabled = + isWindowPrivate || isPrivateBrowsingMode || isServiceWorkerDisabled; if (!isDisabled) { return ""; } diff --git a/devtools/client/aboutdebugging/test/browser_addons_debug_info.js b/devtools/client/aboutdebugging/test/browser_addons_debug_info.js index 1de0e4d96362..9b0dac4f24e6 100644 --- a/devtools/client/aboutdebugging/test/browser_addons_debug_info.js +++ b/devtools/client/aboutdebugging/test/browser_addons_debug_info.js @@ -72,7 +72,8 @@ add_task(async function testTemporaryWebExtension() { isWebExtension: true }); - const addons = document.querySelectorAll("#temporary-extensions .addon-target-container"); + const addons = + document.querySelectorAll("#temporary-extensions .addon-target-container"); // Assuming that our temporary add-on is now at the top. const container = addons[addons.length - 1]; const addonId = container.dataset.addonId; diff --git a/devtools/client/application/initializer.js b/devtools/client/application/initializer.js index 76af86c86ee6..0ac40e188351 100644 --- a/devtools/client/application/initializer.js +++ b/devtools/client/application/initializer.js @@ -66,7 +66,8 @@ window.Application = { */ async createMessageContexts() { const locales = Services.locale.getAppLocalesAsBCP47(); - const generator = L10nRegistry.generateContexts(locales, ["devtools/application.ftl"]); + const generator = + L10nRegistry.generateContexts(locales, ["devtools/application.ftl"]); // Return value of generateContexts is a generator and should be converted to // a sync iterable before using it with React. diff --git a/devtools/client/inspector/boxmodel/test/browser_boxmodel_editablemodel_allproperties.js b/devtools/client/inspector/boxmodel/test/browser_boxmodel_editablemodel_allproperties.js index 9ae3df5f6c95..9ef45e00ca33 100644 --- a/devtools/client/inspector/boxmodel/test/browser_boxmodel_editablemodel_allproperties.js +++ b/devtools/client/inspector/boxmodel/test/browser_boxmodel_editablemodel_allproperties.js @@ -32,7 +32,8 @@ async function testEditing(inspector, boxmodel, testActor) { await selectNode("#div1", inspector); - const span = boxmodel.document.querySelector(".boxmodel-padding.boxmodel-bottom > span"); + const span = + boxmodel.document.querySelector(".boxmodel-padding.boxmodel-bottom > span"); is(span.textContent, 5, "Should have the right value in the box model."); EventUtils.synthesizeMouseAtCenter(span, {}, boxmodel.document.defaultView); diff --git a/devtools/client/inspector/boxmodel/test/browser_boxmodel_sync.js b/devtools/client/inspector/boxmodel/test/browser_boxmodel_sync.js index aab78b3723e6..8d0502b6ee8c 100644 --- a/devtools/client/inspector/boxmodel/test/browser_boxmodel_sync.js +++ b/devtools/client/inspector/boxmodel/test/browser_boxmodel_sync.js @@ -17,7 +17,8 @@ add_task(async function() { await selectNode("p", inspector); info("Modify padding-bottom in box model view"); - const span = boxmodel.document.querySelector(".boxmodel-padding.boxmodel-bottom > span"); + const span = + boxmodel.document.querySelector(".boxmodel-padding.boxmodel-bottom > span"); EventUtils.synthesizeMouseAtCenter(span, {}, boxmodel.document.defaultView); const editor = boxmodel.document.querySelector(".styleinspector-propertyeditor"); diff --git a/devtools/client/inspector/fonts/fonts.js b/devtools/client/inspector/fonts/fonts.js index 718c44c152dc..8813e476f138 100644 --- a/devtools/client/inspector/fonts/fonts.js +++ b/devtools/client/inspector/fonts/fonts.js @@ -178,7 +178,8 @@ class FontInspector { return []; } - const fonts = await this.pageStyle.getUsedFontFaces(node, options).catch(console.error); + const fonts = + await this.pageStyle.getUsedFontFaces(node, options).catch(console.error); if (!fonts) { return []; } diff --git a/devtools/client/inspector/inspector.js b/devtools/client/inspector/inspector.js index fbe02b48ac9d..e464e5c36929 100644 --- a/devtools/client/inspector/inspector.js +++ b/devtools/client/inspector/inspector.js @@ -1065,7 +1065,8 @@ Inspector.prototype = { this.eyeDropperButton.title = INSPECTOR_L10N.getStr("inspector.eyedropper.label"); this.eyeDropperButton.addEventListener("click", this.onEyeDropperButtonClicked); } else { - const eyeDropperButton = this.panelDoc.getElementById("inspector-eyedropper-toggle"); + const eyeDropperButton = + this.panelDoc.getElementById("inspector-eyedropper-toggle"); eyeDropperButton.disabled = true; eyeDropperButton.title = INSPECTOR_L10N.getStr("eyedropper.disabled.title"); } diff --git a/devtools/client/inspector/markup/markup.js b/devtools/client/inspector/markup/markup.js index 7ae8e6bfe91f..1aa82ece7729 100644 --- a/devtools/client/inspector/markup/markup.js +++ b/devtools/client/inspector/markup/markup.js @@ -648,7 +648,7 @@ MarkupView.prototype = { } const done = this.inspector.updating("markup-view"); - let onShowBoxModel, onShow; + let onShowBoxModel; // Highlight the element briefly if needed. if (this._shouldNewSelectionBeHighlighted()) { @@ -656,7 +656,7 @@ MarkupView.prototype = { } const slotted = selection.isSlotted(); - onShow = this.showNode(selection.nodeFront, { slotted }).then(() => { + const onShow = this.showNode(selection.nodeFront, { slotted }).then(() => { // We could be destroyed by now. if (this._destroyer) { return promise.reject("markupview destroyed"); diff --git a/devtools/client/inspector/markup/test/browser_markup_display_node_02.js b/devtools/client/inspector/markup/test/browser_markup_display_node_02.js index ac191762ac90..9da086585d8f 100644 --- a/devtools/client/inspector/markup/test/browser_markup_display_node_02.js +++ b/devtools/client/inspector/markup/test/browser_markup_display_node_02.js @@ -84,8 +84,8 @@ const TEST_DATA = [ ]; add_task(async function() { - const {inspector, testActor} = await openInspectorForURL("data:text/html;charset=utf-8," + - encodeURIComponent(TEST_URI)); + const {inspector, testActor} = await openInspectorForURL( + "data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)); for (const data of TEST_DATA) { info("Running test case: " + data.desc); diff --git a/devtools/client/inspector/rules/test/browser_rules_completion-existing-property_01.js b/devtools/client/inspector/rules/test/browser_rules_completion-existing-property_01.js index 05f7db3b645a..fa69d98175bf 100644 --- a/devtools/client/inspector/rules/test/browser_rules_completion-existing-property_01.js +++ b/devtools/client/inspector/rules/test/browser_rules_completion-existing-property_01.js @@ -115,7 +115,9 @@ async function testCompletion([key, completion, open, selected], // Also listening for popup opened/closed events if needed. const popupEvent = open ? "popup-opened" : "popup-closed"; - const onPopupEvent = editor.popup.isOpen !== open ? once(editor.popup, popupEvent) : null; + const onPopupEvent = editor.popup.isOpen !== open + ? once(editor.popup, popupEvent) + : null; info("Synthesizing key " + key); EventUtils.synthesizeKey(key, {}, view.styleWindow); diff --git a/devtools/client/inspector/rules/test/browser_rules_completion-existing-property_02.js b/devtools/client/inspector/rules/test/browser_rules_completion-existing-property_02.js index 5f561c89ad07..abc3130f2ef1 100644 --- a/devtools/client/inspector/rules/test/browser_rules_completion-existing-property_02.js +++ b/devtools/client/inspector/rules/test/browser_rules_completion-existing-property_02.js @@ -95,7 +95,9 @@ async function testCompletion([key, modifiers, completion, open, selected, chang // Also listening for popup opened/closed events if needed. const popupEvent = open ? "popup-opened" : "popup-closed"; - const onPopupEvent = editor.popup.isOpen !== open ? once(editor.popup, popupEvent) : null; + const onPopupEvent = editor.popup.isOpen !== open + ? once(editor.popup, popupEvent) + : null; EventUtils.synthesizeKey(key, modifiers, view.styleWindow); diff --git a/devtools/client/inspector/rules/test/browser_rules_completion-new-property_01.js b/devtools/client/inspector/rules/test/browser_rules_completion-new-property_01.js index 48009f25788f..edfff3cbcdc0 100644 --- a/devtools/client/inspector/rules/test/browser_rules_completion-new-property_01.js +++ b/devtools/client/inspector/rules/test/browser_rules_completion-new-property_01.js @@ -81,7 +81,9 @@ async function testCompletion([key, completion, open, isSelected], editor, view) // Also listening for popup opened/closed events if needed. const popupEvent = open ? "popup-opened" : "popup-closed"; - const onPopupEvent = editor.popup.isOpen !== open ? once(editor.popup, popupEvent) : null; + const onPopupEvent = editor.popup.isOpen !== open + ? once(editor.popup, popupEvent) + : null; info("Synthesizing key " + key); EventUtils.synthesizeKey(key, {}, view.styleWindow); diff --git a/devtools/client/inspector/rules/test/browser_rules_completion-new-property_02.js b/devtools/client/inspector/rules/test/browser_rules_completion-new-property_02.js index 9d8ff27c2b25..c6033c3fcd4f 100644 --- a/devtools/client/inspector/rules/test/browser_rules_completion-new-property_02.js +++ b/devtools/client/inspector/rules/test/browser_rules_completion-new-property_02.js @@ -102,7 +102,9 @@ async function testCompletion([key, modifiers, completion, open, selected, chang // Also listening for popup opened/closed events if needed. const popupEvent = open ? "popup-opened" : "popup-closed"; - const onPopupEvent = editor.popup.isOpen !== open ? once(editor.popup, popupEvent) : null; + const onPopupEvent = editor.popup.isOpen !== open + ? once(editor.popup, popupEvent) + : null; info("Synthesizing key " + key + ", modifiers: " + Object.keys(modifiers)); EventUtils.synthesizeKey(key, modifiers, view.styleWindow); diff --git a/devtools/client/inspector/rules/test/browser_rules_edit-value-after-name_04.js b/devtools/client/inspector/rules/test/browser_rules_edit-value-after-name_04.js index 26d5a57d0c35..374de7f7a82c 100644 --- a/devtools/client/inspector/rules/test/browser_rules_edit-value-after-name_04.js +++ b/devtools/client/inspector/rules/test/browser_rules_edit-value-after-name_04.js @@ -25,7 +25,8 @@ add_task(async function() { await selectNode("#testid", inspector); const ruleEditor = getRuleViewRuleEditor(view, 1); const propEditor = ruleEditor.rule.textProps[0].editor; - const anchor = propEditor.valueSpan.querySelector(".ruleview-propertyvalue .theme-link"); + const anchor = + propEditor.valueSpan.querySelector(".ruleview-propertyvalue .theme-link"); info("Focus the background name span"); await focusEditableField(view, propEditor.nameSpan); diff --git a/devtools/client/inspector/rules/test/browser_rules_gridline-names-autocomplete.js b/devtools/client/inspector/rules/test/browser_rules_gridline-names-autocomplete.js index fc650d631001..51cddfdbbe22 100644 --- a/devtools/client/inspector/rules/test/browser_rules_gridline-names-autocomplete.js +++ b/devtools/client/inspector/rules/test/browser_rules_gridline-names-autocomplete.js @@ -140,7 +140,9 @@ async function testCompletion([key, modifiers, completion, open, selected, chang // Also listening for popup opened/closed events if needed. const popupEvent = open ? "popup-opened" : "popup-closed"; - const onPopupEvent = editor.popup.isOpen !== open ? once(editor.popup, popupEvent) : null; + const onPopupEvent = editor.popup.isOpen !== open + ? once(editor.popup, popupEvent) + : null; info("Synthesizing key " + key + ", modifiers: " + Object.keys(modifiers)); diff --git a/devtools/client/inspector/rules/test/browser_rules_shapes-toggle_02.js b/devtools/client/inspector/rules/test/browser_rules_shapes-toggle_02.js index c9a1af768d53..e41e34793f9f 100644 --- a/devtools/client/inspector/rules/test/browser_rules_shapes-toggle_02.js +++ b/devtools/client/inspector/rules/test/browser_rules_shapes-toggle_02.js @@ -30,7 +30,8 @@ add_task(async function() { const shapeToggle = container.querySelector(".ruleview-shapeswatch"); const shapeToggleStyle = getComputedStyle(shapeToggle); const overriddenContainer = getRuleViewProperty(view, "div", "clip-path").valueSpan; - const overriddenShapeToggle = overriddenContainer.querySelector(".ruleview-shapeswatch"); + const overriddenShapeToggle = + overriddenContainer.querySelector(".ruleview-shapeswatch"); const overriddenShapeToggleStyle = getComputedStyle(overriddenShapeToggle); ok(shapeToggle && overriddenShapeToggle, diff --git a/devtools/client/inspector/rules/views/class-list-previewer.js b/devtools/client/inspector/rules/views/class-list-previewer.js index cbab59557e9e..eaf7af08d527 100644 --- a/devtools/client/inspector/rules/views/class-list-previewer.js +++ b/devtools/client/inspector/rules/views/class-list-previewer.js @@ -73,9 +73,10 @@ ClassListPreviewerModel.prototype = { if (!CLASSES.has(this.currentNode)) { // Use the proxy node to get a clean list of classes. this.classListProxyNode.className = this.currentNode.className; - const nodeClasses = [...new Set([...this.classListProxyNode.classList])].map(name => { - return { name, isApplied: true }; - }); + const nodeClasses = [...new Set([...this.classListProxyNode.classList])] + .map(name => { + return { name, isApplied: true }; + }); CLASSES.set(this.currentNode, nodeClasses); } diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_03.js b/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_03.js index 2eb1518a673a..c17ca0d324d2 100644 --- a/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_03.js +++ b/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_03.js @@ -27,7 +27,8 @@ async function testZoomSize(testActor, helper) { await helper.show("#polygon", {mode: "cssClipPath"}); const quads = await testActor.getAllAdjustedQuads("#polygon"); const { top, left, width, height } = quads.border[0].bounds; - const expectedStyle = `top:${top}px;left:${left}px;width:${width}px;height:${height}px;`; + const expectedStyle = + `top:${top}px;left:${left}px;width:${width}px;height:${height}px;`; // The top/left/width/height of the highlighter should not change at any zoom level. // It should always match the element being highlighted. diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-show-hide.js b/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-show-hide.js index ab5539df7303..f03a7bb71d4f 100644 --- a/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-show-hide.js +++ b/devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-show-hide.js @@ -9,8 +9,9 @@ const HIGHLIGHTER_TYPE = "EyeDropper"; const ID = "eye-dropper-"; add_task(async function() { - const helper = await openInspectorForURL("data:text/html;charset=utf-8,eye-dropper test") - .then(getHighlighterHelperFor(HIGHLIGHTER_TYPE)); + const helper = + await openInspectorForURL("data:text/html;charset=utf-8,eye-dropper test") + .then(getHighlighterHelperFor(HIGHLIGHTER_TYPE)); helper.prefix = ID; await isInitiallyHidden(helper); diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-rulers_02.js b/devtools/client/inspector/test/browser_inspector_highlighter-rulers_02.js index ea093676792a..a97fabaa6be6 100644 --- a/devtools/client/inspector/test/browser_inspector_highlighter-rulers_02.js +++ b/devtools/client/inspector/test/browser_inspector_highlighter-rulers_02.js @@ -47,7 +47,7 @@ async function isUpdatedAfterScroll(highlighterFront, inspector, testActor) { info("Ask the content window to scroll to specific coords"); - let x = 200, y = 300; + const x = 200, y = 300; let data = await testActor.scrollWindow(x, y); diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-zoom.js b/devtools/client/inspector/test/browser_inspector_highlighter-zoom.js index dfebcf3779d4..2411e7fc4e82 100644 --- a/devtools/client/inspector/test/browser_inspector_highlighter-zoom.js +++ b/devtools/client/inspector/test/browser_inspector_highlighter-zoom.js @@ -50,6 +50,7 @@ add_task(async function() { }); async function getElementsNodeStyle(testActor) { - const value = await testActor.getHighlighterNodeAttribute("box-model-elements", "style"); + const value = + await testActor.getHighlighterNodeAttribute("box-model-elements", "style"); return value; } diff --git a/devtools/client/jsonview/test/browser_jsonview_expand_collapse.js b/devtools/client/jsonview/test/browser_jsonview_expand_collapse.js index 3d239707ac49..e4b64dbb4675 100644 --- a/devtools/client/jsonview/test/browser_jsonview_expand_collapse.js +++ b/devtools/client/jsonview/test/browser_jsonview_expand_collapse.js @@ -12,16 +12,16 @@ add_task(async function() { info("Test expand/collapse JSON started"); await addJsonViewTab(TEST_JSON_URL); - let browser = gBrowser.selectedBrowser, selector, countAfter, countBefore, json; + const browser = gBrowser.selectedBrowser; /* Initial sanity check */ - countBefore = await getElementCount(".treeRow"); + const countBefore = await getElementCount(".treeRow"); ok(countBefore == 6, "There must be six rows"); /* Test the "Collapse All" button */ - selector = ".jsonPanelBox .toolbar button.collapse"; + let selector = ".jsonPanelBox .toolbar button.collapse"; await BrowserTestUtils.synthesizeMouseAtCenter(selector, {}, browser); - countAfter = await getElementCount(".treeRow"); + let countAfter = await getElementCount(".treeRow"); ok(countAfter == 3, "There must be three rows"); /* Test the "Expand All" button */ @@ -31,7 +31,7 @@ add_task(async function() { ok(countAfter == 6, "There must be six expanded rows"); /* Test big file handling */ - json = JSON.stringify({data: Array(1e5).fill().map(x => "hoot"), status: "ok"}); + const json = JSON.stringify({data: Array(1e5).fill().map(x => "hoot"), status: "ok"}); ok(json.length > EXPAND_THRESHOLD, "The generated JSON must be larger than 100kB"); await addJsonViewTab("data:application/json," + json); ok(document.querySelector(selector) == null, "The Expand All button must be gone"); diff --git a/devtools/client/netmonitor/src/actions/ui.js b/devtools/client/netmonitor/src/actions/ui.js index 1c1015afb146..c58234545c07 100644 --- a/devtools/client/netmonitor/src/actions/ui.js +++ b/devtools/client/netmonitor/src/actions/ui.js @@ -27,7 +27,9 @@ const { getDisplayedRequests } = require("../selectors/index"); function openNetworkDetails(open) { return (dispatch, getState) => { const visibleRequestItems = getDisplayedRequests(getState()); - const defaultSelectedId = visibleRequestItems.length ? visibleRequestItems[0].id : null; + const defaultSelectedId = visibleRequestItems.length + ? visibleRequestItems[0].id + : null; return dispatch({ type: OPEN_NETWORK_DETAILS, diff --git a/devtools/client/netmonitor/src/components/RequestListColumnSetCookies.js b/devtools/client/netmonitor/src/components/RequestListColumnSetCookies.js index 051f32e02ac9..60bffc388069 100644 --- a/devtools/client/netmonitor/src/components/RequestListColumnSetCookies.js +++ b/devtools/client/netmonitor/src/components/RequestListColumnSetCookies.js @@ -40,7 +40,9 @@ class RequestListColumnSetCookies extends Component { render() { let { responseCookies = { cookies: [] } } = this.props.item; responseCookies = responseCookies.cookies || responseCookies; - const responseCookiesLength = responseCookies.length > 0 ? responseCookies.length : ""; + const responseCookiesLength = responseCookies.length > 0 + ? responseCookies.length + : ""; return ( div({ className: "requests-list-column requests-list-set-cookies", diff --git a/devtools/client/netmonitor/src/connector/chrome/request.js b/devtools/client/netmonitor/src/connector/chrome/request.js index e94ed506f299..db03c931edbb 100644 --- a/devtools/client/netmonitor/src/connector/chrome/request.js +++ b/devtools/client/netmonitor/src/connector/chrome/request.js @@ -64,10 +64,10 @@ function Header(id, headers) { } function PostData(id, postData, header) { const {headers, headersSize} = header; - let payload = {}, - requestPostData = { - from: id, postDataDiscarded: false, postData: {} - }; + const payload = {}; + const requestPostData = { + from: id, postDataDiscarded: false, postData: {} + }; if (postData) { requestPostData.postData.text = postData; payload.requestPostData = Object.assign({}, requestPostData); diff --git a/devtools/client/netmonitor/src/connector/firefox-data-provider.js b/devtools/client/netmonitor/src/connector/firefox-data-provider.js index c00934d2912d..67d8db56d691 100644 --- a/devtools/client/netmonitor/src/connector/firefox-data-provider.js +++ b/devtools/client/netmonitor/src/connector/firefox-data-provider.js @@ -481,7 +481,8 @@ class FirefoxDataProvider { // The name of the callback that processes request response const callbackMethodName = `on${method.charAt(0).toUpperCase()}${method.slice(1)}`; // And the event to fire before updating this data - const updatingEventName = `UPDATING_${method.replace(/([A-Z])/g, "_$1").toUpperCase()}`; + const updatingEventName = + `UPDATING_${method.replace(/([A-Z])/g, "_$1").toUpperCase()}`; // Emit event that tell we just start fetching some data this.emit(EVENTS[updatingEventName], actor); diff --git a/devtools/client/netmonitor/src/widgets/WaterfallBackground.js b/devtools/client/netmonitor/src/widgets/WaterfallBackground.js index 085790e9d873..8d9b93a1c4ee 100644 --- a/devtools/client/netmonitor/src/widgets/WaterfallBackground.js +++ b/devtools/client/netmonitor/src/widgets/WaterfallBackground.js @@ -107,7 +107,8 @@ class WaterfallBackground { return; } - const delta = Math.floor((timestamp - state.firstRequestStartedMillis) * state.scale); + const delta = + Math.floor((timestamp - state.firstRequestStartedMillis) * state.scale); drawPixelAt(delta, color); } diff --git a/devtools/client/netmonitor/test/browser_net_columns_last_column.js b/devtools/client/netmonitor/test/browser_net_columns_last_column.js index cb820c1f80fb..9f0b5a2fd84a 100644 --- a/devtools/client/netmonitor/test/browser_net_columns_last_column.js +++ b/devtools/client/netmonitor/test/browser_net_columns_last_column.js @@ -44,7 +44,8 @@ add_task(async function() { EventUtils.sendMouseEvent({ type: "contextmenu" }, document.querySelector(`#requests-list-${column}-button`)); - const menuItem = parent.document.querySelector(`#request-list-header-${column}-toggle`); + const menuItem = + parent.document.querySelector(`#request-list-header-${column}-toggle`); ok(menuItem.disabled, "Last visible column menu item should be disabled."); } }); diff --git a/devtools/client/netmonitor/test/browser_net_footer-summary.js b/devtools/client/netmonitor/test/browser_net_footer-summary.js index 3047c73c7640..a3c2361c2169 100644 --- a/devtools/client/netmonitor/test/browser_net_footer-summary.js +++ b/devtools/client/netmonitor/test/browser_net_footer-summary.js @@ -67,10 +67,11 @@ add_task(async function() { return; } - const valueTransfer = document.querySelector(".requests-list-network-summary-transfer") - .textContent; + const valueTransfer = + document.querySelector(".requests-list-network-summary-transfer").textContent; info("Current summary transfer: " + valueTransfer); - const expectedTransfer = L10N.getFormatStrWithNumbers("networkMenu.summary.transferred", + const expectedTransfer = L10N.getFormatStrWithNumbers( + "networkMenu.summary.transferred", getFormattedSize(requestsSummary.contentSize), getFormattedSize(requestsSummary.transferredSize)); diff --git a/devtools/client/netmonitor/test/browser_net_open_request_in_tab.js b/devtools/client/netmonitor/test/browser_net_open_request_in_tab.js index 9264084c6183..97c0f1d1ad16 100644 --- a/devtools/client/netmonitor/test/browser_net_open_request_in_tab.js +++ b/devtools/client/netmonitor/test/browser_net_open_request_in_tab.js @@ -69,7 +69,8 @@ add_task(async function() { async function checkTabResponse(checkedTab, method) { await ContentTask.spawn(checkedTab.linkedBrowser, method, async function(met) { const { body } = content.wrappedJSObject.document; - const responseRE = RegExp(met + (met == "POST" ? "\n*\s*foo\=bar\&baz\=42" : "")); + const responseRE = + RegExp(met + (met == "POST" ? "\n*\s*foo\=bar\&baz\=42" : "")); ok(body.innerHTML.match(responseRE), "Tab method and data match original request"); }); } diff --git a/devtools/client/performance/performance-controller.js b/devtools/client/performance/performance-controller.js index 182679ff534c..0413be2a838f 100644 --- a/devtools/client/performance/performance-controller.js +++ b/devtools/client/performance/performance-controller.js @@ -256,7 +256,8 @@ var PerformanceController = { if (!hasActor) { return true; } - const actorCanCheck = await gTarget.actorHasMethod("performance", "canCurrentlyRecord"); + const actorCanCheck = + await gTarget.actorHasMethod("performance", "canCurrentlyRecord"); if (!actorCanCheck) { return true; } diff --git a/devtools/client/performance/performance-view.js b/devtools/client/performance/performance-view.js index db0fd9be5c7d..661c981b78ab 100644 --- a/devtools/client/performance/performance-view.js +++ b/devtools/client/performance/performance-view.js @@ -225,7 +225,8 @@ var PerformanceView = { // Wrap the label in quotes if it exists for the commands. label = label ? `"${label}"` : ""; - const startCommand = $(".console-profile-recording-notice .console-profile-command"); + const startCommand = + $(".console-profile-recording-notice .console-profile-command"); const stopCommand = $(".console-profile-stop-notice .console-profile-command"); startCommand.value = `console.profile(${label})`; diff --git a/devtools/client/performance/test/helpers/event-utils.js b/devtools/client/performance/test/helpers/event-utils.js index 7172355c51b3..73207e27ef36 100644 --- a/devtools/client/performance/test/helpers/event-utils.js +++ b/devtools/client/performance/test/helpers/event-utils.js @@ -27,7 +27,8 @@ exports.once = function(target, eventName, options = {}) { * Possible options: `useCapture`, `spreadArgs`, `expectedArgs` */ exports.times = function(target, eventName, receiveCount, options = {}) { - const msg = `Waiting for event: '${eventName}' on ${target} for ${receiveCount} time(s)`; + const msg = + `Waiting for event: '${eventName}' on ${target} for ${receiveCount} time(s)`; if ("expectedArgs" in options) { dump(`${msg} with arguments: ${JSON.stringify(options.expectedArgs)}.\n`); } else { diff --git a/devtools/client/performance/test/helpers/tab-utils.js b/devtools/client/performance/test/helpers/tab-utils.js index 7747a2352cd7..0f89d06eeb96 100644 --- a/devtools/client/performance/test/helpers/tab-utils.js +++ b/devtools/client/performance/test/helpers/tab-utils.js @@ -45,7 +45,8 @@ exports.removeTab = function(tab) { * Adds a browser window with the provided options. */ exports.addWindow = async function(options) { - const { OpenBrowserWindow } = Services.wm.getMostRecentWindow(gDevTools.chromeWindowType); + const { OpenBrowserWindow } = + Services.wm.getMostRecentWindow(gDevTools.chromeWindowType); const win = OpenBrowserWindow(options); await waitForDelayedStartupFinished(win); return win; diff --git a/devtools/client/performance/views/details-js-call-tree.js b/devtools/client/performance/views/details-js-call-tree.js index 90c4594049d1..079e3cb7efa6 100644 --- a/devtools/client/performance/views/details-js-call-tree.js +++ b/devtools/client/performance/views/details-js-call-tree.js @@ -63,7 +63,8 @@ var JsCallTreeView = extend(DetailsSubview, { flattenRecursion: PerformanceController.getOption("flatten-tree-recursion"), showOptimizationHint: showOptimizations }; - const threadNode = this.threadNode = this._prepareCallTree(profile, interval, options); + const threadNode = + this.threadNode = this._prepareCallTree(profile, interval, options); this._populateCallTree(threadNode, options); // For better or worse, re-rendering loses frame selection, @@ -137,8 +138,8 @@ var JsCallTreeView = extend(DetailsSubview, { _prepareCallTree: function(profile, { startTime, endTime }, options) { const thread = profile.threads[0]; const { contentOnly, invertTree, flattenRecursion } = options; - const threadNode = new ThreadNode(thread, { startTime, endTime, contentOnly, invertTree, - flattenRecursion }); + const threadNode = new ThreadNode(thread, + { startTime, endTime, contentOnly, invertTree, flattenRecursion }); // Real profiles from nsProfiler (i.e. not synthesized from allocation // logs) always have a (root) node. Go down one level in the uninverted diff --git a/devtools/client/responsive.html/test/browser/browser_device_custom.js b/devtools/client/responsive.html/test/browser/browser_device_custom.js index 22bbbf699543..0cf8a3d1d1e4 100644 --- a/devtools/client/responsive.html/test/browser/browser_device_custom.js +++ b/devtools/client/responsive.html/test/browser/browser_device_custom.js @@ -63,7 +63,8 @@ addRDMTask(TEST_URL, async function({ ui }) { submitButton.click(); info("Look for custom device in device selector"); - const selectorOption = [...deviceSelector.options].find(opt => opt.value == device.name); + const selectorOption = + [...deviceSelector.options].find(opt => opt.value == device.name); ok(selectorOption, "Custom device option added to device selector"); }); @@ -103,7 +104,8 @@ addRDMTask(TEST_URL, async function({ ui }) { info("Ensure custom device was removed from device selector"); await waitUntilState(store, state => state.viewports[0].device == ""); is(deviceSelector.value, "", "Device selector reset to no device"); - const selectorOption = [...deviceSelector.options].find(opt => opt.value == device.name); + const selectorOption = + [...deviceSelector.options].find(opt => opt.value == device.name); ok(!selectorOption, "Custom device option removed from device selector"); info("Ensure device properties like UA have been reset"); @@ -167,7 +169,8 @@ function testDeviceAdder(ui, expected) { const { document } = ui.toolWindow; const nameInput = document.querySelector("#device-adder-name input"); - const [ widthInput, heightInput ] = document.querySelectorAll("#device-adder-size input"); + const [ widthInput, heightInput ] = + document.querySelectorAll("#device-adder-size input"); const pixelRatioInput = document.querySelector("#device-adder-pixel-ratio input"); const userAgentInput = document.querySelector("#device-adder-user-agent input"); const touchInput = document.querySelector("#device-adder-touch input"); diff --git a/devtools/client/responsive.html/test/browser/browser_device_custom_remove.js b/devtools/client/responsive.html/test/browser/browser_device_custom_remove.js index 307b71c2a446..810bf66c6981 100644 --- a/devtools/client/responsive.html/test/browser/browser_device_custom_remove.js +++ b/devtools/client/responsive.html/test/browser/browser_device_custom_remove.js @@ -100,11 +100,13 @@ addRDMTask(TEST_URL, async function({ ui }) { const deviceSelector = document.querySelector(".viewport-device-selector"); info("Ensure device 1 is still in device selector"); - const deviceOption1 = [...deviceSelector.options].find(opt => opt.value == device1.name); + const deviceOption1 = + [...deviceSelector.options].find(opt => opt.value == device1.name); ok(deviceOption1, "Test device 1 option exists"); info("Ensure device 2 is no longer in device selector"); - const deviceOption2 = [...deviceSelector.options].find(opt => opt.value == device2.name); + const deviceOption2 = + [...deviceSelector.options].find(opt => opt.value == device2.name); ok(!deviceOption2, "Test device 2 option removed"); openDeviceModal(ui); diff --git a/devtools/client/responsive.html/test/browser/browser_device_width.js b/devtools/client/responsive.html/test/browser/browser_device_width.js index 7fdfcf7dad0d..f23bcbfefa20 100644 --- a/devtools/client/responsive.html/test/browser/browser_device_width.js +++ b/devtools/client/responsive.html/test/browser/browser_device_width.js @@ -34,7 +34,7 @@ addRDMTask(TEST_URL, async function({ ui, manager }) { }); async function setViewportSizeWithInputKeys(ui) { - let width = 320, height = 500; + const width = 320, height = 500; let resized = waitForViewportResizeTo(ui, width, height); ui.setViewportSize({ width, height }); await resized; diff --git a/devtools/client/responsive.html/test/browser/head.js b/devtools/client/responsive.html/test/browser/head.js index 13bc86f02402..3cb693143e9f 100644 --- a/devtools/client/responsive.html/test/browser/head.js +++ b/devtools/client/responsive.html/test/browser/head.js @@ -394,7 +394,8 @@ function addDeviceInModal(ui, device) { const { store, document } = ui.toolWindow; const nameInput = document.querySelector("#device-adder-name input"); - const [ widthInput, heightInput ] = document.querySelectorAll("#device-adder-size input"); + const [ widthInput, heightInput ] = + document.querySelectorAll("#device-adder-size input"); const pixelRatioInput = document.querySelector("#device-adder-pixel-ratio input"); const userAgentInput = document.querySelector("#device-adder-user-agent input"); const touchInput = document.querySelector("#device-adder-touch input"); diff --git a/devtools/client/scratchpad/scratchpad.js b/devtools/client/scratchpad/scratchpad.js index a0d3a5b2d303..3d0fb5d7ed77 100644 --- a/devtools/client/scratchpad/scratchpad.js +++ b/devtools/client/scratchpad/scratchpad.js @@ -1083,8 +1083,9 @@ var Scratchpad = { * @return string */ _getUnicodeContent: function SP__getUnicodeContent(aContent, aCharsetArray) { - let content = null, - converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Ci.nsIScriptableUnicodeConverter); + const converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Ci.nsIScriptableUnicodeConverter); + + let content = null; aCharsetArray.some(charset => { try { converter.charset = charset; diff --git a/devtools/client/scratchpad/test/browser_scratchpad_throw_output.js b/devtools/client/scratchpad/test/browser_scratchpad_throw_output.js index caa7ad77a47d..e29e7b8af458 100644 --- a/devtools/client/scratchpad/test/browser_scratchpad_throw_output.js +++ b/devtools/client/scratchpad/test/browser_scratchpad_throw_output.js @@ -14,7 +14,7 @@ function test() { } function testThrowOutput() { - let scratchpad = gScratchpadWindow.Scratchpad, tests = []; + const scratchpad = gScratchpadWindow.Scratchpad, tests = []; const falsyValues = ["false", "0", "-0", "null", "undefined", "Infinity", "-Infinity", "NaN"]; diff --git a/devtools/client/shadereditor/test/doc_multiple-contexts.html b/devtools/client/shadereditor/test/doc_multiple-contexts.html index 021e7c4aaa56..12b3817f7e81 100644 --- a/devtools/client/shadereditor/test/doc_multiple-contexts.html +++ b/devtools/client/shadereditor/test/doc_multiple-contexts.html @@ -33,7 +33,7 @@