diff --git a/browser/base/content/test/general/browser_bug1003461-switchtab-override.js b/browser/base/content/test/general/browser_bug1003461-switchtab-override.js index 4f77a28f40c..0552afe8b61 100644 --- a/browser/base/content/test/general/browser_bug1003461-switchtab-override.js +++ b/browser/base/content/test/general/browser_bug1003461-switchtab-override.js @@ -42,7 +42,7 @@ add_task(function* test_switchtab_override() { ok(/moz-action:switchtab/.test(gURLBar.value), "switch to tab entry found"); info("Override switch-to-tab"); - let deferred = Promise.defer(); + deferred = Promise.defer(); // In case of failure this would switch tab. let onTabSelect = event => { deferred.reject(new Error("Should have overridden switch to tab")); diff --git a/browser/base/content/test/general/browser_urlbarSearchSingleWordNotification.js b/browser/base/content/test/general/browser_urlbarSearchSingleWordNotification.js index 94bb8df5b6e..2309d4676c0 100644 --- a/browser/base/content/test/general/browser_urlbarSearchSingleWordNotification.js +++ b/browser/base/content/test/general/browser_urlbarSearchSingleWordNotification.js @@ -102,7 +102,7 @@ function get_test_function_for_localhost_with_hostname(hostName, isPrivate) { browser.removeTab(tab); // Now try again with the pref set. - let tab = browser.selectedTab = browser.addTab(); + tab = browser.selectedTab = browser.addTab(); // In a private window, the notification should appear again. yield* runURLBarSearchTest(hostName, isPrivate, isPrivate, win); browser.removeTab(tab); diff --git a/browser/base/content/test/newtab/browser_newtab_enhanced.js b/browser/base/content/test/newtab/browser_newtab_enhanced.js index 6380f570b38..6e48a5772b5 100644 --- a/browser/base/content/test/newtab/browser_newtab_enhanced.js +++ b/browser/base/content/test/newtab/browser_newtab_enhanced.js @@ -49,7 +49,7 @@ function runTests() { // Test with enhanced = true NewTabUtils.allPages.enhanced = true; yield addNewTabPageTab(); - let {type, enhanced, title} = getData(0); + ({type, enhanced, title} = getData(0)); is(type, "organic", "directory link is still organic"); isnot(enhanced, "", "directory link still has enhanced image"); is(title, "title"); @@ -59,7 +59,7 @@ function runTests() { // Test with a pinned link setPinnedLinks("-1"); yield addNewTabPageTab(); - let {type, enhanced, title} = getData(0); + ({type, enhanced, title} = getData(0)); is(type, "enhanced", "pinned history link is enhanced"); isnot(enhanced, "", "pinned history link has enhanced image"); is(title, "title"); @@ -69,7 +69,7 @@ function runTests() { // Test pinned link with enhanced = false NewTabUtils.allPages.enhanced = false; yield addNewTabPageTab(); - let {type, enhanced, title} = getData(0); + ({type, enhanced, title} = getData(0)); isnot(type, "enhanced", "history link is not enhanced"); is(enhanced, "", "history link has no enhanced image"); is(title, "site#-1"); diff --git a/browser/base/content/test/plugins/browser_pageInfo_plugins.js b/browser/base/content/test/plugins/browser_pageInfo_plugins.js index 77a43bb04ee..80ed7c1635c 100644 --- a/browser/base/content/test/plugins/browser_pageInfo_plugins.js +++ b/browser/base/content/test/plugins/browser_pageInfo_plugins.js @@ -70,7 +70,7 @@ function testPart1a() { let objLoadingContent = test.QueryInterface(Ci.nsIObjectLoadingContent); ok(!objLoadingContent.activated, "part 1a: Test plugin should not be activated"); let secondtest = gTestBrowser.contentDocument.getElementById("secondtestA"); - let objLoadingContent = secondtest.QueryInterface(Ci.nsIObjectLoadingContent); + objLoadingContent = secondtest.QueryInterface(Ci.nsIObjectLoadingContent); ok(objLoadingContent.activated, "part 1a: Second Test plugin should be activated"); doOnOpenPageInfo(testPart1b); diff --git a/browser/components/customizableui/test/browser_884402_customize_from_overflow.js b/browser/components/customizableui/test/browser_884402_customize_from_overflow.js index e77daa2d2cf..371e1eb85f5 100644 --- a/browser/components/customizableui/test/browser_884402_customize_from_overflow.js +++ b/browser/components/customizableui/test/browser_884402_customize_from_overflow.js @@ -74,7 +74,7 @@ add_task(function() { yield waitForCondition(() => navbar.hasAttribute("overflowing")); ok(navbar.hasAttribute("overflowing"), "Should have an overflowing toolbar."); - let homeButtonPlacement = CustomizableUI.getPlacementOfWidget("home-button"); + homeButtonPlacement = CustomizableUI.getPlacementOfWidget("home-button"); ok(homeButtonPlacement, "Home button should still have a placement"); is(homeButtonPlacement && homeButtonPlacement.area, "nav-bar", "Home button should be back in the navbar now"); diff --git a/browser/components/customizableui/test/browser_886323_buildArea_removable_nodes.js b/browser/components/customizableui/test/browser_886323_buildArea_removable_nodes.js index 40dcfd879a3..b75e04d1ac4 100644 --- a/browser/components/customizableui/test/browser_886323_buildArea_removable_nodes.js +++ b/browser/components/customizableui/test/browser_886323_buildArea_removable_nodes.js @@ -34,7 +34,7 @@ add_task(function() { assertAreaPlacements(kLazyAreaId, [], "Placements should no longer include widget."); is(btn.parentNode.id, gNavBar.customizationTarget.id, "Button shouldn't actually have moved as it's not removable"); - let btn = document.getElementById(kButtonId); + btn = document.getElementById(kButtonId); if (btn) btn.remove(); CustomizableUI.removeWidgetFromArea(kButtonId); CustomizableUI.unregisterArea(kLazyAreaId); diff --git a/browser/components/customizableui/test/browser_888817_currentset_updating.js b/browser/components/customizableui/test/browser_888817_currentset_updating.js index fec615145d8..ef43761023a 100644 --- a/browser/components/customizableui/test/browser_888817_currentset_updating.js +++ b/browser/components/customizableui/test/browser_888817_currentset_updating.js @@ -12,7 +12,7 @@ add_task(function() { ok(!CustomizableUI.inDefaultState, "Making the bookmarks toolbar visible takes it out of the default state"); let navbar = document.getElementById(CustomizableUI.AREA_NAVBAR); - let personalbar = document.getElementById(CustomizableUI.AREA_BOOKMARKS); + personalbar = document.getElementById(CustomizableUI.AREA_BOOKMARKS); let navbarCurrentset = navbar.getAttribute("currentset") || navbar.currentSet; let personalbarCurrentset = personalbar.getAttribute("currentset") || personalbar.currentSet; diff --git a/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js b/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js index c73c52617d4..faf56348ad8 100644 --- a/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js +++ b/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js @@ -89,7 +89,7 @@ add_task(function() { let hiddenPanelPromise = promiseOverflowHidden(window); EventUtils.synthesizeKey("VK_ESCAPE", {}); yield hiddenPanelPromise; - let navbar = document.getElementById(CustomizableUI.AREA_NAVBAR); + navbar = document.getElementById(CustomizableUI.AREA_NAVBAR); window.resizeTo(this.originalWindowWidth, window.outerHeight); yield waitForCondition(() => !navbar.hasAttribute("overflowing")); ok(!navbar.hasAttribute("overflowing"), "Should not have an overflowing toolbar."); diff --git a/browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js b/browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js index f8c62ca642a..bf6788b2f9b 100644 --- a/browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js +++ b/browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js @@ -35,7 +35,7 @@ add_task(function() { let spec = {id: kUnregisterAreaTestWidget, type: 'button', removable: true, label: "areaType test", tooltiptext: "areaType test"}; CustomizableUI.createWidget(spec); - let toolbarNode = createToolbarWithPlacements(kToolbarName, [kUnregisterAreaTestWidget]); + toolbarNode = createToolbarWithPlacements(kToolbarName, [kUnregisterAreaTestWidget]); CustomizableUI.unregisterArea(kToolbarName); toolbarNode.remove(); w = CustomizableUI.getWidget(spec.id); diff --git a/browser/components/customizableui/test/browser_962884_opt_in_disable_hyphens.js b/browser/components/customizableui/test/browser_962884_opt_in_disable_hyphens.js index 4be004b9827..65787b39e94 100644 --- a/browser/components/customizableui/test/browser_962884_opt_in_disable_hyphens.js +++ b/browser/components/customizableui/test/browser_962884_opt_in_disable_hyphens.js @@ -31,7 +31,7 @@ add_task(function() { isnot(characterEncoding.getAttribute("auto-hyphens"), "off", "Hyphens should not be disabled if the ­ character is not present in the label"); multilineText = document.getAnonymousElementByAttribute(characterEncoding, "class", "toolbarbutton-multiline-text"); - let multilineTextCS = getComputedStyle(multilineText); + multilineTextCS = getComputedStyle(multilineText); is(multilineTextCS.MozHyphens, "auto", "-moz-hyphens should be set to auto by default.") hiddenPanelPromise = promisePanelHidden(window); @@ -48,8 +48,8 @@ add_task(function() { gCustomizeMode.addToPanel(characterEncoding); is(characterEncoding.getAttribute("auto-hyphens"), "off", "Hyphens should be disabled if the ­ character is present in the label in customization mode"); - let multilineText = document.getAnonymousElementByAttribute(characterEncoding, "class", "toolbarbutton-multiline-text"); - let multilineTextCS = getComputedStyle(multilineText); + multilineText = document.getAnonymousElementByAttribute(characterEncoding, "class", "toolbarbutton-multiline-text"); + multilineTextCS = getComputedStyle(multilineText); is(multilineTextCS.MozHyphens, "manual", "-moz-hyphens should be set to manual when the ­ character is present in customization mode.") yield endCustomizing(); diff --git a/browser/components/customizableui/test/browser_987492_window_api.js b/browser/components/customizableui/test/browser_987492_window_api.js index 3f6581416ac..1718303e146 100644 --- a/browser/components/customizableui/test/browser_987492_window_api.js +++ b/browser/components/customizableui/test/browser_987492_window_api.js @@ -45,7 +45,7 @@ add_task(function* testOpenCloseWindow() { is(newWindow, closedWindow, "Closed window should match previously opened window"); CustomizableUI.removeListener(closeListener); - let windows = []; + windows = []; for (let win of CustomizableUI.windows) windows.push(win); is(windows.length, 1, "Should have one customizable window"); diff --git a/browser/components/customizableui/test/browser_987640_charEncoding.js b/browser/components/customizableui/test/browser_987640_charEncoding.js index 9db0e08c21b..5c78abfeb1f 100644 --- a/browser/components/customizableui/test/browser_987640_charEncoding.js +++ b/browser/components/customizableui/test/browser_987640_charEncoding.js @@ -48,7 +48,7 @@ add_task(function() { yield tabLoadPromise; yield PanelUI.show(); charEncodingButton.click(); - let checkedButtons = characterEncodingView.querySelectorAll("toolbarbutton[checked='true']"); + checkedButtons = characterEncodingView.querySelectorAll("toolbarbutton[checked='true']"); is(checkedButtons[0].getAttribute("label"), "Unicode", "The encoding was reset to Unicode"); }); diff --git a/browser/components/customizableui/test/browser_bootstrapped_custom_toolbar.js b/browser/components/customizableui/test/browser_bootstrapped_custom_toolbar.js index b565ac6194e..af4316b1343 100644 --- a/browser/components/customizableui/test/browser_bootstrapped_custom_toolbar.js +++ b/browser/components/customizableui/test/browser_bootstrapped_custom_toolbar.js @@ -50,13 +50,13 @@ function checkRestoredPresence(aWidgetID, aLegacy) { CustomizableUI.unregisterArea(testBar.id); testBar.remove(); - let placement = CustomizableUI.getPlacementOfWidget(aWidgetID); + placement = CustomizableUI.getPlacementOfWidget(aWidgetID); is(placement, null, "Expected " + aWidgetID + " to be in the palette"); testBar = createTestBar(aLegacy); yield startCustomizing(); - let placement = CustomizableUI.getPlacementOfWidget(aWidgetID); + placement = CustomizableUI.getPlacementOfWidget(aWidgetID); is(placement.area, kTestBarID, "Expected " + aWidgetID + " to be in the test toolbar"); yield endCustomizing(); diff --git a/browser/components/loop/test/mochitest/browser_CardDavImporter.js b/browser/components/loop/test/mochitest/browser_CardDavImporter.js index 4913ecb2799..ac6b2cd7789 100644 --- a/browser/components/loop/test/mochitest/browser_CardDavImporter.js +++ b/browser/components/loop/test/mochitest/browser_CardDavImporter.js @@ -327,7 +327,7 @@ add_task(function* test_CardDavImport() { }); Assert.equal(error.message, "401 Auth Failure", "Auth error should propagate"); - let error = yield new Promise ((resolve, reject) => { + error = yield new Promise ((resolve, reject) => { info("Initiating import"); importer.startImport({ "host": "example.invalid", @@ -342,7 +342,7 @@ add_task(function* test_CardDavImport() { mockDb.getByServiceId = function(serviceId, callback) { callback(new Error("getByServiceId failed")); }; - let error = yield new Promise ((resolve, reject) => { + error = yield new Promise ((resolve, reject) => { info("Initiating import"); importer.startImport({ "host": "example.com", @@ -354,7 +354,7 @@ add_task(function* test_CardDavImport() { Assert.equal(error.message, "getByServiceId failed", "Database error should propagate"); mockDb.getByServiceId = tmp; - let error = yield new Promise ((resolve, reject) => { + error = yield new Promise ((resolve, reject) => { info("Initiating import"); importer.startImport({ "host": "example.com", diff --git a/browser/components/loop/test/mochitest/browser_LoopContacts.js b/browser/components/loop/test/mochitest/browser_LoopContacts.js index 07901a68ad1..7e52b80aeba 100644 --- a/browser/components/loop/test/mochitest/browser_LoopContacts.js +++ b/browser/components/loop/test/mochitest/browser_LoopContacts.js @@ -193,7 +193,7 @@ add_task(function* () { yield deferred.promise; info("Get a single contact by id."); - let deferred = Promise.defer(); + deferred = Promise.defer(); LoopContacts.getByServiceId(2, (err, contact) => { Assert.ok(!err, "There shouldn't be an error"); compareContacts(contact, kContacts[1]); @@ -202,7 +202,7 @@ add_task(function* () { yield deferred.promise; info("Get a couple of contacts."); - let deferred = Promise.defer(); + deferred = Promise.defer(); let toRetrieve = [contacts[0], contacts[2], contacts[3]]; LoopContacts.getMany(toRetrieve.map(contact => contact._guid), (err, result) => { Assert.ok(!err, "There shouldn't be an error"); diff --git a/browser/components/places/tests/unit/test_421483.js b/browser/components/places/tests/unit/test_421483.js index ac0c733679c..2f3a4e7b7a9 100644 --- a/browser/components/places/tests/unit/test_421483.js +++ b/browser/components/places/tests/unit/test_421483.js @@ -46,7 +46,7 @@ add_task(function remove_smart_bookmark_and_restore() { PlacesUtils.bookmarks.removeItem(smartBookmarkItemIds[0]); Services.prefs.setIntPref("browser.places.smartBookmarksVersion", 0); gluesvc.ensurePlacesDefaultQueriesInitialized(); - let smartBookmarkItemIds = + smartBookmarkItemIds = PlacesUtils.annotations.getItemsWithAnnotation(SMART_BOOKMARKS_ANNO); do_check_eq(smartBookmarkItemIds.length, smartBookmarksCount); do_log_info("check that pref has been bumped up"); diff --git a/browser/components/preferences/tests/browser_chunk_permissions.js b/browser/components/preferences/tests/browser_chunk_permissions.js index 4bd387229c5..cdc9deff557 100644 --- a/browser/components/preferences/tests/browser_chunk_permissions.js +++ b/browser/components/preferences/tests/browser_chunk_permissions.js @@ -121,11 +121,11 @@ var tests = [ }, run: function() { let testSite1 = getSiteItem(TEST_URI_1.host); - ok(!testSite2, "test site 1 was not removed from sites list"); + ok(testSite1, "test site 1 was not removed from sites list"); let testSite2 = getSiteItem(TEST_URI_2.host); ok(!testSite2, "test site 2 was pre-removed from sites list"); let testSite3 = getSiteItem(TEST_URI_3.host); - ok(!testSite2, "test site 3 was not removed from sites list"); + ok(testSite3, "test site 3 was not removed from sites list"); runNextTest(); } diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js index 68be197a1b3..d1695e046e9 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_DownloadLastDirWithCPS.js @@ -238,8 +238,8 @@ function runTest() { // And give it time to close executeSoon(moveAlong); yield; - let pbWin = yield createWindow({private: true}); - let pbDownloadLastDir = new DownloadLastDir(pbWin); + pbWin = yield createWindow({private: true}); + pbDownloadLastDir = new DownloadLastDir(pbWin); is((yield checkDownloadLastDir(pbDownloadLastDir, dir1)).path, dir1.path, "uri1 should return the expected last directory"); diff --git a/browser/components/search/test/browser_426329.js b/browser/components/search/test/browser_426329.js index d73ac2c152b..01e6470b647 100644 --- a/browser/components/search/test/browser_426329.js +++ b/browser/components/search/test/browser_426329.js @@ -251,7 +251,7 @@ add_task(function testDropInternalText() { // were merged so that if testDropInternalText failed it wouldn't cause testDropLink // to fail unexplainably. yield prepareTest(); - let promisePreventPopup = promiseEvent(searchBar, "popupshowing", true); + promisePreventPopup = promiseEvent(searchBar, "popupshowing", true); ChromeUtils.synthesizeDrop(searchBar.searchButton, searchBar.searchButton, [[ {type: "text/uri-list", data: "http://www.mozilla.org" } ]], "copy", window); yield promisePreventPopup; is(searchBar.value, "More Text", "drop text/uri-list on searchbar shouldn't change anything"); diff --git a/browser/components/sessionstore/test/browser_463205.js b/browser/components/sessionstore/test/browser_463205.js index a2d6f791db1..6ff193721e5 100644 --- a/browser/components/sessionstore/test/browser_463205.js +++ b/browser/components/sessionstore/test/browser_463205.js @@ -27,7 +27,7 @@ add_task(function test_check_urls_before_restoring() { ss.setTabState(tab, getState("http://example.com/")); yield promiseTabRestored(tab); - let value = yield getInputValue(browser, {id: "text"}); + value = yield getInputValue(browser, {id: "text"}); is(value, "", "value was not restored"); // Cleanup. diff --git a/browser/components/sessionstore/test/browser_662743.js b/browser/components/sessionstore/test/browser_662743.js index 849a931b7be..9e34d6c2da3 100644 --- a/browser/components/sessionstore/test/browser_662743.js +++ b/browser/components/sessionstore/test/browser_662743.js @@ -89,7 +89,7 @@ function testTabRestoreData(aFormData, aExpectedValue, aCallback) { let restoredFormData = restoredTabState.formdata; let selectIdFormData = restoredFormData.id.select_id; - let value = restoredFormData.id.select_id.value; + value = restoredFormData.id.select_id.value; // test format ok("id" in restoredFormData || "xpath" in restoredFormData, diff --git a/browser/components/sessionstore/test/browser_attributes.js b/browser/components/sessionstore/test/browser_attributes.js index 2e8e9d01a86..a87c869b4ad 100644 --- a/browser/components/sessionstore/test/browser_attributes.js +++ b/browser/components/sessionstore/test/browser_attributes.js @@ -34,7 +34,7 @@ function runTests() { tab.setAttribute("custom", "foobar"); ss.persistTabAttribute("custom"); - let {attributes} = JSON.parse(ss.getTabState(tab)); + ({attributes} = JSON.parse(ss.getTabState(tab))); is(attributes.custom, "foobar", "'custom' attribute is correct"); // Make sure we're backwards compatible and restore old 'image' attributes. @@ -55,7 +55,7 @@ function runTests() { yield whenTabRestored(tab); // Ensure no 'image' or 'pending' attributes are stored. - let {attributes} = JSON.parse(ss.getTabState(tab)); + ({attributes} = JSON.parse(ss.getTabState(tab))); ok(!("image" in attributes), "'image' attribute not saved"); ok(!("pending" in attributes), "'pending' attribute not saved"); is(attributes.custom, "foobaz", "'custom' attribute is correct"); diff --git a/browser/components/sessionstore/test/browser_broadcast.js b/browser/components/sessionstore/test/browser_broadcast.js index f7a9e697522..752982ecb8a 100644 --- a/browser/components/sessionstore/test/browser_broadcast.js +++ b/browser/components/sessionstore/test/browser_broadcast.js @@ -59,8 +59,8 @@ add_task(function flush_on_duplicate() { "sessionStorage data has been flushed when duplicating tabs"); yield promiseTabRestored(tab2); - gBrowser.removeTab(tab2) - let [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window)); + gBrowser.removeTab(tab2); + [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window)); is(storage["http://example.com"].test, "on-duplicate", "sessionStorage data has been flushed when duplicating tabs"); diff --git a/browser/components/sessionstore/test/browser_dynamic_frames.js b/browser/components/sessionstore/test/browser_dynamic_frames.js index 4029be3dd86..8bc42ecd07e 100644 --- a/browser/components/sessionstore/test/browser_dynamic_frames.js +++ b/browser/components/sessionstore/test/browser_dynamic_frames.js @@ -77,7 +77,7 @@ add_task(function () { yield promiseBrowserLoaded(browser, false /* don't ignore subframes */); SyncHandlers.get(browser).flush(); - let {entries} = JSON.parse(ss.getTabState(tab)); + ({entries} = JSON.parse(ss.getTabState(tab))); // Check URLs. ok(entries[0].url.startsWith("data:text/html"), "correct 1st root url"); diff --git a/browser/components/sessionstore/test/browser_formdata.js b/browser/components/sessionstore/test/browser_formdata.js index f82324f47b9..77f95aeda99 100644 --- a/browser/components/sessionstore/test/browser_formdata.js +++ b/browser/components/sessionstore/test/browser_formdata.js @@ -43,7 +43,7 @@ add_task(function test_formdata() { Services.prefs.setIntPref("browser.sessionstore.privacy_level", 1); yield createAndRemoveTab(); - let [{state: {formdata}}] = JSON.parse(ss.getClosedTabData(window)); + [{state: {formdata}}] = JSON.parse(ss.getClosedTabData(window)); is(formdata.id.txt, OUTER_VALUE, "outer value is correct"); ok(!formdata.children, "inner value was *not* stored"); @@ -51,7 +51,7 @@ add_task(function test_formdata() { Services.prefs.setIntPref("browser.sessionstore.privacy_level", 2); yield createAndRemoveTab(); - let [{state: {formdata}}] = JSON.parse(ss.getClosedTabData(window)); + [{state: {formdata}}] = JSON.parse(ss.getClosedTabData(window)); ok(!formdata, "form data has *not* been stored"); // Restore the default privacy level. @@ -176,13 +176,13 @@ add_task(function test_nested() { "formdata for iframe stored correctly"); // Restore the closed tab. - let tab = ss.undoCloseTab(window, 0); - let browser = tab.linkedBrowser; + tab = ss.undoCloseTab(window, 0); + browser = tab.linkedBrowser; yield promiseTabRestored(tab); // Check that the input field has the right value. SyncHandlers.get(browser).flush(); - let {formdata} = JSON.parse(ss.getTabState(tab)); + ({formdata} = JSON.parse(ss.getTabState(tab))); is(JSON.stringify(formdata), JSON.stringify(FORM_DATA), "formdata for iframe restored correctly"); @@ -224,8 +224,8 @@ add_task(function test_design_mode() { yield promiseTabRestored(tab); // Check that the innerHTML value was restored. - let html = yield getInnerHTML(browser); - let expected = "

Mmozilla

"; + html = yield getInnerHTML(browser); + expected = "

Mmozilla

"; is(html, expected, "editable document has been restored correctly"); // Cleanup. diff --git a/browser/components/sessionstore/test/browser_label_and_icon.js b/browser/components/sessionstore/test/browser_label_and_icon.js index e883c4bd154..d65161dbf07 100644 --- a/browser/components/sessionstore/test/browser_label_and_icon.js +++ b/browser/components/sessionstore/test/browser_label_and_icon.js @@ -31,7 +31,7 @@ add_task(function test_label_and_icon() { browser = null; // Open a new tab to restore into. - let tab = gBrowser.addTab("about:blank"); + tab = gBrowser.addTab("about:blank"); ss.setTabState(tab, state); yield promiseTabRestoring(tab); diff --git a/browser/components/sessionstore/test/browser_privatetabs.js b/browser/components/sessionstore/test/browser_privatetabs.js index 63aaf740859..d69b205f73c 100644 --- a/browser/components/sessionstore/test/browser_privatetabs.js +++ b/browser/components/sessionstore/test/browser_privatetabs.js @@ -92,13 +92,13 @@ add_task(function () { is(ss.getClosedTabCount(win), 0, "no tabs to restore"); // Create a new tab in the new window that will load the frame script. - let tab = win.gBrowser.addTab("about:mozilla"); - let browser = tab.linkedBrowser; + tab = win.gBrowser.addTab("about:mozilla"); + browser = tab.linkedBrowser; yield promiseBrowserLoaded(browser); SyncHandlers.get(browser).flush(); // Check that we consider the tab as private. - let state = JSON.parse(ss.getTabState(tab)); + state = JSON.parse(ss.getTabState(tab)); ok(state.isPrivate, "tab considered private"); // Check that all private tabs are removed when the non-private diff --git a/browser/components/sessionstore/test/browser_sessionHistory.js b/browser/components/sessionstore/test/browser_sessionHistory.js index 17b92ec8b8e..cc7ec9641c8 100644 --- a/browser/components/sessionstore/test/browser_sessionHistory.js +++ b/browser/components/sessionstore/test/browser_sessionHistory.js @@ -52,7 +52,7 @@ add_task(function test_purge() { // Check that we are left with a single shistory entry. SyncHandlers.get(browser).flush(); - let {entries} = JSON.parse(ss.getTabState(tab)); + ({entries} = JSON.parse(ss.getTabState(tab))); is(entries.length, 1, "there is one shistory entry"); // Cleanup. @@ -81,7 +81,7 @@ add_task(function test_hashchange() { // Check that we now have two shistory entries. SyncHandlers.get(browser).flush(); - let {entries} = JSON.parse(ss.getTabState(tab)); + ({entries} = JSON.parse(ss.getTabState(tab))); is(entries.length, 2, "there are two shistory entries"); // Cleanup. @@ -144,7 +144,7 @@ add_task(function test_subframes() { // Check shistory. SyncHandlers.get(browser).flush(); - let {entries} = JSON.parse(ss.getTabState(tab)); + ({entries} = JSON.parse(ss.getTabState(tab))); is(entries.length, 2, "there now are two shistory entries"); is(entries[1].children.length, 1, "the second entry has one child"); @@ -158,7 +158,7 @@ add_task(function test_subframes() { // Check shistory. SyncHandlers.get(browser).flush(); - let {entries} = JSON.parse(ss.getTabState(tab)); + ({entries} = JSON.parse(ss.getTabState(tab))); is(entries.length, 2, "there now are two shistory entries"); is(entries[1].children.length, 1, "the second entry has one child"); @@ -186,7 +186,7 @@ add_task(function test_about_page_navigate() { // Check that we have changed the history entry. SyncHandlers.get(browser).flush(); - let {entries} = JSON.parse(ss.getTabState(tab)); + ({entries} = JSON.parse(ss.getTabState(tab))); is(entries.length, 1, "there is one shistory entry"); is(entries[0].url, "about:robots", "url is correct"); @@ -215,7 +215,7 @@ add_task(function test_pushstate_replacestate() { // Check that we have added the history entry. SyncHandlers.get(browser).flush(); - let {entries} = JSON.parse(ss.getTabState(tab)); + ({entries} = JSON.parse(ss.getTabState(tab))); is(entries.length, 2, "there is another shistory entry"); is(entries[1].url, "http://example.com/test-entry/", "url is correct"); @@ -225,7 +225,7 @@ add_task(function test_pushstate_replacestate() { // Check that we have modified the history entry. SyncHandlers.get(browser).flush(); - let {entries} = JSON.parse(ss.getTabState(tab)); + ({entries} = JSON.parse(ss.getTabState(tab))); is(entries.length, 2, "there is still two shistory entries"); is(entries[1].url, "http://example.com/test-entry/test-entry2/", "url is correct"); diff --git a/browser/components/sessionstore/test/browser_sessionStorage.js b/browser/components/sessionstore/test/browser_sessionStorage.js index 41d6700c306..c0db9255485 100644 --- a/browser/components/sessionstore/test/browser_sessionStorage.js +++ b/browser/components/sessionstore/test/browser_sessionStorage.js @@ -34,7 +34,7 @@ add_task(function session_storage() { yield modifySessionStorage2(browser, {test: "modified2"}); SyncHandlers.get(browser).flush(); - let {storage} = JSON.parse(ss.getTabState(tab)); + ({storage} = JSON.parse(ss.getTabState(tab))); is(storage["http://example.com"].test, "modified2", "sessionStorage data for example.com has been serialized correctly"); is(storage["http://mochi.test:8888"].test, "modified", @@ -48,7 +48,7 @@ add_task(function session_storage() { // Flush to make sure chrome received all data. SyncHandlers.get(browser2).flush(); - let {storage} = JSON.parse(ss.getTabState(tab2)); + ({storage} = JSON.parse(ss.getTabState(tab2))); is(storage["http://example.com"].test, "modified2", "sessionStorage data for example.com has been duplicated correctly"); is(storage["http://mochi.test:8888"].test, "modified", @@ -59,7 +59,7 @@ add_task(function session_storage() { yield modifySessionStorage(browser2, {test: "modified3"}); SyncHandlers.get(browser2).flush(); - let {storage} = JSON.parse(ss.getTabState(tab2)); + ({storage} = JSON.parse(ss.getTabState(tab2))); is(storage["http://example.com"].test, "modified2", "sessionStorage data for example.com has been duplicated correctly"); is(storage["http://mochi.test:8888"].test, "modified3", @@ -70,7 +70,7 @@ add_task(function session_storage() { yield promiseBrowserLoaded(browser2); SyncHandlers.get(browser2).flush(); - let {storage} = JSON.parse(ss.getTabState(tab2)); + ({storage} = JSON.parse(ss.getTabState(tab2))); is(storage["http://mochi.test:8888"].test, "modified3", "navigating retains correct storage data"); ok(!storage["http://example.com"], "storage data was discarded"); @@ -130,11 +130,11 @@ add_task(function respect_privacy_level() { // Disable saving data for encrypted sites. Services.prefs.setIntPref("browser.sessionstore.privacy_level", 1); - let tab = gBrowser.addTab(URL + "&secure"); + tab = gBrowser.addTab(URL + "&secure"); yield promiseBrowserLoaded(tab.linkedBrowser); gBrowser.removeTab(tab); - let [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window)); + [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window)); is(storage["http://mochi.test:8888"].test, OUTER_VALUE, "http sessionStorage data has been saved"); ok(!storage["https://example.com"], @@ -144,14 +144,14 @@ add_task(function respect_privacy_level() { Services.prefs.setIntPref("browser.sessionstore.privacy_level", 2); // Check that duplicating a tab copies all private data. - let tab = gBrowser.addTab(URL + "&secure"); + tab = gBrowser.addTab(URL + "&secure"); yield promiseBrowserLoaded(tab.linkedBrowser); let tab2 = gBrowser.duplicateTab(tab); yield promiseTabRestored(tab2); gBrowser.removeTab(tab); // With privacy_level=2 the |tab| shouldn't have any sessionStorage data. - let [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window)); + [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window)); ok(!storage, "sessionStorage data has *not* been saved"); // Restore the default privacy level and close the duplicated tab. @@ -159,7 +159,7 @@ add_task(function respect_privacy_level() { gBrowser.removeTab(tab2); // With privacy_level=0 the duplicated |tab2| should persist all data. - let [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window)); + [{state: {storage}}] = JSON.parse(ss.getClosedTabData(window)); is(storage["http://mochi.test:8888"].test, OUTER_VALUE, "http sessionStorage data has been saved"); is(storage["https://example.com"].test, INNER_VALUE, diff --git a/browser/components/tabview/test/browser_tabview_bug631752.js b/browser/components/tabview/test/browser_tabview_bug631752.js index 04475cb1b09..3ab7631e26a 100644 --- a/browser/components/tabview/test/browser_tabview_bug631752.js +++ b/browser/components/tabview/test/browser_tabview_bug631752.js @@ -19,7 +19,7 @@ function test() { let dragTabItem = function (tabItem) { let doc = cw.document.documentElement; - let tabItem = groupItem.getChild(0); + tabItem = groupItem.getChild(0); let container = tabItem.container; let aspectRange = getAspectRange(); diff --git a/browser/components/translation/test/unit/test_healthreport.js b/browser/components/translation/test/unit/test_healthreport.js index c4e7df454ce..ea58c5b6e65 100644 --- a/browser/components/translation/test/unit/test_healthreport.js +++ b/browser/components/translation/test/unit/test_healthreport.js @@ -146,14 +146,14 @@ add_task(function* test_record_translation() { yield provider.recordTranslation("es", "en", 4, now); values = yield m.getValues(); - let day = values.days.getDay(now); + day = values.days.getDay(now); Assert.ok(day.has("pageTranslatedCount")); Assert.equal(day.get("pageTranslatedCount"), 4); Assert.ok(day.has("charactersTranslatedCount")); Assert.equal(day.get("charactersTranslatedCount"), 1007); Assert.ok(day.has("pageTranslatedCountsByLanguage")); - let countsByLanguage = JSON.parse(day.get("pageTranslatedCountsByLanguage")); + countsByLanguage = JSON.parse(day.get("pageTranslatedCountsByLanguage")); Assert.ok("fr" in countsByLanguage); Assert.equal(countsByLanguage["fr"]["total"], 3); Assert.equal(countsByLanguage["fr"]["es"], 2); diff --git a/browser/devtools/canvasdebugger/test/browser_canvas-actor-test-10.js b/browser/devtools/canvasdebugger/test/browser_canvas-actor-test-10.js index bf29eb65960..a24333d7d32 100644 --- a/browser/devtools/canvasdebugger/test/browser_canvas-actor-test-10.js +++ b/browser/devtools/canvasdebugger/test/browser_canvas-actor-test-10.js @@ -73,7 +73,7 @@ function ifTestingSupported() { is(new Uint8Array(secondScreenshot.pixels.buffer)[3], 255, "The second screenshot has the correct alpha component."); - let gl = debuggee.gl; + gl = debuggee.gl; is(gl.getParameter(gl.FRAMEBUFFER_BINDING), debuggee.customFramebuffer, "The debuggee's gl context framebuffer still wasn't changed."); is(gl.getParameter(gl.RENDERBUFFER_BINDING), debuggee.customRenderbuffer, diff --git a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-call-search.js b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-call-search.js index c7c3edd1c90..7aff7985f20 100644 --- a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-call-search.js +++ b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-call-search.js @@ -44,7 +44,7 @@ function ifTestingSupported() { "The visible item's caller has the expected value."); let secondRecordingFinished = once(window, EVENTS.SNAPSHOT_RECORDING_FINISHED); - let callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED); + callListPopulated = once(window, EVENTS.CALL_LIST_POPULATED); SnapshotsListView._onRecordButtonClick(); yield secondRecordingFinished; diff --git a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-slider-02.js b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-slider-02.js index 120149bde29..4565250f594 100644 --- a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-slider-02.js +++ b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-slider-02.js @@ -34,9 +34,9 @@ function ifTestingSupported() { yield once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED); ok(true, "The full-sized screenshot was displayed for the item at index 1."); - let thumbnailImageElementSet = waitForMozSetImageElement(window); + thumbnailImageElementSet = waitForMozSetImageElement(window); $("#calls-slider").value = 2; - let thumbnailPixels = yield thumbnailImageElementSet; + thumbnailPixels = yield thumbnailImageElementSet; ok(sameArray(thumbnailPixels, thumbnails[1].pixels), "The screenshot element should have a thumbnail as an immediate background."); @@ -44,9 +44,9 @@ function ifTestingSupported() { yield once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED); ok(true, "The full-sized screenshot was displayed for the item at index 2."); - let thumbnailImageElementSet = waitForMozSetImageElement(window); + thumbnailImageElementSet = waitForMozSetImageElement(window); $("#calls-slider").value = 7; - let thumbnailPixels = yield thumbnailImageElementSet; + thumbnailPixels = yield thumbnailImageElementSet; ok(sameArray(thumbnailPixels, thumbnails[3].pixels), "The screenshot element should have a thumbnail as an immediate background."); @@ -54,9 +54,9 @@ function ifTestingSupported() { yield once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED); ok(true, "The full-sized screenshot was displayed for the item at index 7."); - let thumbnailImageElementSet = waitForMozSetImageElement(window); + thumbnailImageElementSet = waitForMozSetImageElement(window); $("#calls-slider").value = 4; - let thumbnailPixels = yield thumbnailImageElementSet; + thumbnailPixels = yield thumbnailImageElementSet; ok(sameArray(thumbnailPixels, thumbnails[2].pixels), "The screenshot element should have a thumbnail as an immediate background."); @@ -64,9 +64,9 @@ function ifTestingSupported() { yield once(window, EVENTS.CALL_SCREENSHOT_DISPLAYED); ok(true, "The full-sized screenshot was displayed for the item at index 4."); - let thumbnailImageElementSet = waitForMozSetImageElement(window); + thumbnailImageElementSet = waitForMozSetImageElement(window); $("#calls-slider").value = 0; - let thumbnailPixels = yield thumbnailImageElementSet; + thumbnailPixels = yield thumbnailImageElementSet; ok(sameArray(thumbnailPixels, thumbnails[0].pixels), "The screenshot element should have a thumbnail as an immediate background."); diff --git a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-snapshot-select.js b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-snapshot-select.js index 462442bf89b..e6830e9b4c3 100644 --- a/browser/devtools/canvasdebugger/test/browser_canvas-frontend-snapshot-select.js +++ b/browser/devtools/canvasdebugger/test/browser_canvas-frontend-snapshot-select.js @@ -53,7 +53,7 @@ function ifTestingSupported() { "The first draw call should now be selected in the snapshot."); let firstSnapshotTarget = SnapshotsListView.getItemAtIndex(0).target; - let snapshotSelected = waitForSnapshotSelection(); + snapshotSelected = waitForSnapshotSelection(); EventUtils.sendMouseEvent({ type: "mousedown" }, firstSnapshotTarget, window); yield snapshotSelected; diff --git a/browser/devtools/commandline/test/browser_cmd_csscoverage_util.js b/browser/devtools/commandline/test/browser_cmd_csscoverage_util.js index 8accc4e61a3..9f3857c652c 100644 --- a/browser/devtools/commandline/test/browser_cmd_csscoverage_util.js +++ b/browser/devtools/commandline/test/browser_cmd_csscoverage_util.js @@ -17,7 +17,7 @@ function testDeconstructRuleId() { is(rule.column, 20, "1 column"); // This is the harder case with a URL containing a '|' - let rule = csscoverage.deconstructRuleId("http://thing/blah?q=a|b|11|22"); + rule = csscoverage.deconstructRuleId("http://thing/blah?q=a|b|11|22"); is(rule.url, "http://thing/blah?q=a|b", "2 url"); is(rule.line, 11, "2 line"); is(rule.column, 22, "2 column"); diff --git a/browser/devtools/debugger/test/browser_dbg_break-on-dom-04.js b/browser/devtools/debugger/test/browser_dbg_break-on-dom-04.js index 10a09be9260..af79be02cb7 100644 --- a/browser/devtools/debugger/test/browser_dbg_break-on-dom-04.js +++ b/browser/devtools/debugger/test/browser_dbg_break-on-dom-04.js @@ -45,7 +45,7 @@ function test() { testEventGroup("mouseEvents", false); testEventArrays("change,click,keydown,keyup", "change"); - let updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED); + updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED); EventUtils.sendMouseEvent({ type: "click" }, getItemCheckboxNode(0), gDebugger); yield updated; diff --git a/browser/devtools/debugger/test/browser_dbg_break-on-dom-05.js b/browser/devtools/debugger/test/browser_dbg_break-on-dom-05.js index ff3ba11e77e..a5b9840b6e2 100644 --- a/browser/devtools/debugger/test/browser_dbg_break-on-dom-05.js +++ b/browser/devtools/debugger/test/browser_dbg_break-on-dom-05.js @@ -46,7 +46,7 @@ function test() { testEventGroup("mouseEvents", false); testEventArrays("change,click,keydown,keyup", "change"); - let updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED); + updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED); EventUtils.sendMouseEvent({ type: "click" }, getGroupCheckboxNode("interactionEvents"), gDebugger); yield updated; @@ -59,7 +59,7 @@ function test() { testEventGroup("mouseEvents", false); testEventArrays("change,click,keydown,keyup", ""); - let updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED); + updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED); EventUtils.sendMouseEvent({ type: "click" }, getGroupCheckboxNode("keyboardEvents"), gDebugger); yield updated; @@ -72,7 +72,7 @@ function test() { testEventGroup("mouseEvents", false); testEventArrays("change,click,keydown,keyup", "keydown,keyup"); - let updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED); + updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED); EventUtils.sendMouseEvent({ type: "click" }, getGroupCheckboxNode("keyboardEvents"), gDebugger); yield updated; diff --git a/browser/devtools/debugger/test/browser_dbg_break-on-dom-06.js b/browser/devtools/debugger/test/browser_dbg_break-on-dom-06.js index 877697584de..76ba19ff700 100644 --- a/browser/devtools/debugger/test/browser_dbg_break-on-dom-06.js +++ b/browser/devtools/debugger/test/browser_dbg_break-on-dom-06.js @@ -58,7 +58,7 @@ function test() { testEventGroup("mouseEvents", false); testEventArrays("change,click,keydown,keyup", "change,click,keydown"); - let updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED); + updated = waitForDebuggerEvents(aPanel, gDebugger.EVENTS.EVENT_BREAKPOINTS_UPDATED); EventUtils.sendMouseEvent({ type: "click" }, getItemCheckboxNode(0), gDebugger); EventUtils.sendMouseEvent({ type: "click" }, getItemCheckboxNode(1), gDebugger); EventUtils.sendMouseEvent({ type: "click" }, getItemCheckboxNode(2), gDebugger); diff --git a/browser/devtools/debugger/test/browser_dbg_cmd-blackbox.js b/browser/devtools/debugger/test/browser_dbg_cmd-blackbox.js index a3e2935b415..797efc1a499 100644 --- a/browser/devtools/debugger/test/browser_dbg_cmd-blackbox.js +++ b/browser/devtools/debugger/test/browser_dbg_cmd-blackbox.js @@ -42,7 +42,7 @@ function spawnTest() { // test Un-Black-Box Source yield cmd("dbg unblackbox " + BLACKBOXME_URL); - let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL); + bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL); ok(!bbButton.checked, "Should be able to stop black boxing a specific source."); @@ -50,7 +50,7 @@ function spawnTest() { yield cmd("dbg blackbox --glob *blackboxing_t*.js", 2, [/blackboxing_three\.js/g, /blackboxing_two\.js/g]); - let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL); + bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL); ok(!bbButton.checked, "blackboxme should not be black boxed because it doesn't match the glob."); bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXONE_URL); @@ -67,7 +67,7 @@ function spawnTest() { // test Un-Black-Box Glob yield cmd("dbg unblackbox --glob *blackboxing_t*.js", 2); - let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXTWO_URL); + bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXTWO_URL); ok(!bbButton.checked, "blackbox_two should be un-black boxed because it matches the glob."); bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXTHREE_URL); @@ -78,7 +78,7 @@ function spawnTest() { yield cmd("dbg blackbox --invert --glob *blackboxing_t*.js", 3, [/blackboxing_three\.js/g, /blackboxing_two\.js/g]); - let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL); + bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL); ok(bbButton.checked, "blackboxme should be black boxed because it doesn't match the glob."); bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXONE_URL); @@ -98,7 +98,7 @@ function spawnTest() { // test Un-Black-Box Invert yield cmd("dbg unblackbox --invert --glob *blackboxing_t*.js", 3); - let bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL); + bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXME_URL); ok(!bbButton.checked, "blackboxme should be un-black boxed because it does not match the glob."); bbButton = yield selectSourceAndGetBlackBoxButton(panel, BLACKBOXONE_URL); diff --git a/browser/devtools/debugger/test/browser_dbg_controller-evaluate-01.js b/browser/devtools/debugger/test/browser_dbg_controller-evaluate-01.js index f492cbd46c4..b5d69eb65e6 100644 --- a/browser/devtools/debugger/test/browser_dbg_controller-evaluate-01.js +++ b/browser/devtools/debugger/test/browser_dbg_controller-evaluate-01.js @@ -62,7 +62,7 @@ function test() { ok(true, "Evaluating in the topmost frame works properly."); // Eval in a different frame, while paused. - let updatedView = waitForDebuggerEvents(panel, events.FETCHED_SCOPES); + updatedView = waitForDebuggerEvents(panel, events.FETCHED_SCOPES); try { yield frames.evaluate("foo", { depth: 3 }); // oldest frame } catch (result) { diff --git a/browser/devtools/debugger/test/browser_dbg_file-reload.js b/browser/devtools/debugger/test/browser_dbg_file-reload.js index 45d4c081d98..9ab0e1f9123 100644 --- a/browser/devtools/debugger/test/browser_dbg_file-reload.js +++ b/browser/devtools/debugger/test/browser_dbg_file-reload.js @@ -43,7 +43,7 @@ function test() { ok(gEditor.getText().contains("bacon"), "The newly shown source contains bacon. Mmm, delicious!"); - let { source } = gSources.selectedItem.attachment; + ({ source } = gSources.selectedItem.attachment); let [, secondText] = yield gControllerSources.getText(source); let secondNumber = parseFloat(secondText.match(/\d\.\d+/)[0]); diff --git a/browser/devtools/debugger/test/browser_dbg_optimized-out-vars.js b/browser/devtools/debugger/test/browser_dbg_optimized-out-vars.js index e53cacf99a1..7191a85f7fd 100644 --- a/browser/devtools/debugger/test/browser_dbg_optimized-out-vars.js +++ b/browser/devtools/debugger/test/browser_dbg_optimized-out-vars.js @@ -6,7 +6,7 @@ function test() { Task.spawn(function* () { const TAB_URL = EXAMPLE_URL + "doc_closure-optimized-out.html"; - let panel, debuggee, gDebugger, sources; + let gDebugger, sources; let [, debuggee, panel] = yield initDebugger(TAB_URL); gDebugger = panel.panelWin; diff --git a/browser/devtools/debugger/test/browser_dbg_paused-keybindings.js b/browser/devtools/debugger/test/browser_dbg_paused-keybindings.js index 603e34b9aec..8b707bddd4b 100644 --- a/browser/devtools/debugger/test/browser_dbg_paused-keybindings.js +++ b/browser/devtools/debugger/test/browser_dbg_paused-keybindings.js @@ -7,7 +7,7 @@ function test() { Task.spawn(function* () { const TAB_URL = EXAMPLE_URL + "doc_inline-script.html"; - let panel, debuggee, gDebugger, searchBox; + let gDebugger, searchBox; let [, debuggee, panel] = yield initDebugger(TAB_URL); gDebugger = panel.panelWin; diff --git a/browser/devtools/debugger/test/browser_dbg_pretty-print-05.js b/browser/devtools/debugger/test/browser_dbg_pretty-print-05.js index 0ef9c876ea3..0415ea1e808 100644 --- a/browser/devtools/debugger/test/browser_dbg_pretty-print-05.js +++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-05.js @@ -44,7 +44,8 @@ function test() { "The promise was correctly rejected with a meaningful message."); } - let [source, text] = yield gControllerSources.getText(source); + let text; + [source, text] = yield gControllerSources.getText(source); is(gSources.selectedValue, TAB_URL, "The correct source is still selected."); ok(gEditor.getText().contains("myFunction"), diff --git a/browser/devtools/debugger/test/browser_dbg_pretty-print-06.js b/browser/devtools/debugger/test/browser_dbg_pretty-print-06.js index cbf3b01fdae..dacd4715bad 100644 --- a/browser/devtools/debugger/test/browser_dbg_pretty-print-06.js +++ b/browser/devtools/debugger/test/browser_dbg_pretty-print-06.js @@ -60,7 +60,8 @@ function test() { "The promise was correctly rejected with a meaningful message."); } - let [source, text] = yield gControllerSources.getText(source); + let text; + [source, text] = yield gControllerSources.getText(source); is(gSources.selectedValue, JS_URL, "The correct source is still selected."); ok(gEditor.getText().contains("myFunction"), diff --git a/browser/devtools/debugger/test/browser_dbg_variables-view-data.js b/browser/devtools/debugger/test/browser_dbg_variables-view-data.js index 2e68772a21a..c95d6855de0 100644 --- a/browser/devtools/debugger/test/browser_dbg_variables-view-data.js +++ b/browser/devtools/debugger/test/browser_dbg_variables-view-data.js @@ -303,7 +303,7 @@ function testSecondLevelContents() { let objectItem6 = someProp6.get("p6"); let objectItem7 = someProp6.get("p7"); let objectItem8 = someProp6.get("p8"); - let __proto__ = someProp6.get("__proto__"); + __proto__ = someProp6.get("__proto__"); is(objectItem0.visible, true, "The first object item visible state is correct."); is(objectItem1.visible, true, "The second object item visible state is correct."); diff --git a/browser/devtools/debugger/test/browser_dbg_variables-view-override-01.js b/browser/devtools/debugger/test/browser_dbg_variables-view-override-01.js index d068594de10..1e8bf6f726c 100644 --- a/browser/devtools/debugger/test/browser_dbg_variables-view-override-01.js +++ b/browser/devtools/debugger/test/browser_dbg_variables-view-override-01.js @@ -83,7 +83,7 @@ function test() { // Test getOwnerScopeForVariableOrProperty with second-degree properties. let protoVar1 = argsVar1.get("__proto__"); - let fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES); + fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES); protoVar1.expand(); yield fetched; @@ -98,7 +98,7 @@ function test() { // Only need to wait for a single FETCHED_VARIABLES event, just for the // global scope, because the other local scopes already have the // arguments and variables available as evironment bindings. - let fetched = waitForDebuggerEvents(panel, events.FETCHED_VARIABLES); + fetched = waitForDebuggerEvents(panel, events.FETCHED_VARIABLES); secondScope.expand(); thirdScope.expand(); globalScope.expand(); @@ -118,7 +118,7 @@ function test() { // from non-topmost scopes. let argsVar2 = secondScope.get("arguments"); - let fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES); + fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES); argsVar2.expand(); yield fetched; @@ -128,7 +128,7 @@ function test() { "The getOwnerScopeForVariableOrProperty method works properly (7)."); let argsVar3 = thirdScope.get("arguments"); - let fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES); + fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES); argsVar3.expand(); yield fetched; @@ -141,7 +141,7 @@ function test() { // from non-topmost scopes. let protoVar2 = argsVar2.get("__proto__"); - let fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES); + fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES); protoVar2.expand(); yield fetched; @@ -151,7 +151,7 @@ function test() { "The getOwnerScopeForVariableOrProperty method works properly (9)."); let protoVar3 = argsVar3.get("__proto__"); - let fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES); + fetched = waitForDebuggerEvents(panel, events.FETCHED_PROPERTIES); protoVar3.expand(); yield fetched; diff --git a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-10.js b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-10.js index 19d15590406..8e5efe1a3c3 100644 --- a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-10.js +++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-10.js @@ -49,7 +49,7 @@ function test() { } }); - let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); + expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); yield openVarPopup(panel, { line: 14, ch: 15 }); yield expressionsEvaluated; diff --git a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-11.js b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-11.js index 8aa5f4670d4..ad357b91cc9 100644 --- a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-11.js +++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-11.js @@ -50,25 +50,25 @@ function test() { ok(true, "The new watch expressions were re-evaluated and the panel got hidden (1)."); // Inspect non primitive value variable. - let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); + expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); yield openVarPopup(panel, { line: 16, ch: 12 }, true); yield expressionsEvaluated; ok(true, "The watch expressions were re-evaluated when a new panel opened (1)."); - let popupHiding = once(tooltip, "popuphiding"); - let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); + popupHiding = once(tooltip, "popuphiding"); + expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); testExpressionButton(label, className, "b"); yield promise.all([popupHiding, expressionsEvaluated]); ok(true, "The new watch expressions were re-evaluated and the panel got hidden (2)."); // Inspect property of an object. - let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); + expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); yield openVarPopup(panel, { line: 17, ch: 10 }); yield expressionsEvaluated; ok(true, "The watch expressions were re-evaluated when a new panel opened (2)."); - let popupHiding = once(tooltip, "popuphiding"); - let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); + popupHiding = once(tooltip, "popuphiding"); + expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); testExpressionButton(label, className, "b.a"); yield promise.all([popupHiding, expressionsEvaluated]); ok(true, "The new watch expressions were re-evaluated and the panel got hidden (3)."); diff --git a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-12.js b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-12.js index 79e035d7beb..6cf3c70a6d5 100644 --- a/browser/devtools/debugger/test/browser_dbg_variables-view-popup-12.js +++ b/browser/devtools/debugger/test/browser_dbg_variables-view-popup-12.js @@ -41,26 +41,26 @@ function test() { ok(true, "The new watch expressions were re-evaluated and the panel got hidden (1)."); // Inspect property of an object. - let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); + expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); yield openVarPopup(panel, { line: 17, ch: 10 }); yield expressionsEvaluated; ok(true, "The watch expressions were re-evaluated when a new panel opened (1)."); - let popupHiding = once(tooltip, "popuphiding"); - let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); + popupHiding = once(tooltip, "popuphiding"); + expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); tooltip.querySelector("button").click(); verifyContent("b.a", 2); yield promise.all([popupHiding, expressionsEvaluated]); ok(true, "The new watch expressions were re-evaluated and the panel got hidden (2)."); // Re-inspect primitive value variable. - let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); + expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); yield openVarPopup(panel, { line: 15, ch: 12 }); yield expressionsEvaluated; ok(true, "The watch expressions were re-evaluated when a new panel opened (2)."); - let popupHiding = once(tooltip, "popuphiding"); - let expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); + popupHiding = once(tooltip, "popuphiding"); + expressionsEvaluated = waitForDebuggerEvents(panel, events.FETCHED_WATCH_EXPRESSIONS); tooltip.querySelector("button").click(); verifyContent("b.a", 2); yield promise.all([popupHiding, expressionsEvaluated]); diff --git a/browser/devtools/framework/test/browser_toolbox_theme_registration.js b/browser/devtools/framework/test/browser_toolbox_theme_registration.js index 9a065ffcf9f..5f268156478 100644 --- a/browser/devtools/framework/test/browser_toolbox_theme_registration.js +++ b/browser/devtools/framework/test/browser_toolbox_theme_registration.js @@ -65,13 +65,13 @@ function applyTheme() // Select test theme. testThemeOption.click(); - let color = panelWin.getComputedStyle(testThemeOption).color; + color = panelWin.getComputedStyle(testThemeOption).color; is(color, "rgb(255, 0, 0)", "style applied"); // Select light theme lightThemeOption.click(); - let color = panelWin.getComputedStyle(testThemeOption).color; + color = panelWin.getComputedStyle(testThemeOption).color; isnot(color, "rgb(255, 0, 0)", "style unapplied"); // Select test theme again. diff --git a/browser/devtools/inspector/test/browser_inspector_breadcrumbs_highlight_hover.js b/browser/devtools/inspector/test/browser_inspector_breadcrumbs_highlight_hover.js index 10affc4caa7..6fd38ac431d 100644 --- a/browser/devtools/inspector/test/browser_inspector_breadcrumbs_highlight_hover.js +++ b/browser/devtools/inspector/test/browser_inspector_breadcrumbs_highlight_hover.js @@ -21,12 +21,12 @@ let test = asyncTest(function*() { ok(isHighlighting(), "The highlighter is shown on a markup container hover"); is(getHighlitNode(), getNode("body"), "The highlighter highlights the right node"); - let onNodeHighlighted = toolbox.once("node-highlight"); - let button = bcButtons.childNodes[2]; + onNodeHighlighted = toolbox.once("node-highlight"); + button = bcButtons.childNodes[2]; EventUtils.synthesizeMouseAtCenter(button, {type: "mousemove"}, button.ownerDocument.defaultView); yield onNodeHighlighted; ok(isHighlighting(), "The highlighter is shown on a markup container hover"); is(getHighlitNode(), getNode("span"), "The highlighter highlights the right node"); gBrowser.removeCurrentTab(); -}); \ No newline at end of file +}); diff --git a/browser/devtools/inspector/test/browser_inspector_highlighter-02.js b/browser/devtools/inspector/test/browser_inspector_highlighter-02.js index 32f762e077c..22533a3bdc4 100644 --- a/browser/devtools/inspector/test/browser_inspector_highlighter-02.js +++ b/browser/devtools/inspector/test/browser_inspector_highlighter-02.js @@ -32,7 +32,7 @@ let test = asyncTest(function*() { info("Selecting the zero width height DIV"); let zeroWidthHeight = getNode("#widthHeightZero-div"); - let onBoxModelUpdate = waitForBoxModelUpdate(); + onBoxModelUpdate = waitForBoxModelUpdate(); yield selectAndHighlightNode(zeroWidthHeight, inspector); yield onBoxModelUpdate; diff --git a/browser/devtools/markupview/test/browser_markupview_highlight_hover_03.js b/browser/devtools/markupview/test/browser_markupview_highlight_hover_03.js index 0c2d3e9d1ac..d30768c0c3a 100644 --- a/browser/devtools/markupview/test/browser_markupview_highlight_hover_03.js +++ b/browser/devtools/markupview/test/browser_markupview_highlight_hover_03.js @@ -42,13 +42,13 @@ let test = asyncTest(function*() { let onUpdated = inspector.once("inspector-updated"); EventUtils.synthesizeKey("VK_DOWN", {}); yield onUpdated; - let onUpdated = inspector.once("inspector-updated"); + onUpdated = inspector.once("inspector-updated"); EventUtils.synthesizeKey("VK_DOWN", {}); yield onUpdated; yield isHighlighting("#two", " is highlighted"); info("Navigate back to with the keyboard"); - let onUpdated = inspector.once("inspector-updated"); + onUpdated = inspector.once("inspector-updated"); EventUtils.synthesizeKey("VK_UP", {}); yield onUpdated; yield isHighlighting("#one", " is highlighted again"); diff --git a/browser/devtools/markupview/test/browser_markupview_tag_edit_03.js b/browser/devtools/markupview/test/browser_markupview_tag_edit_03.js index 3ea8637be84..e1a71da8e9f 100644 --- a/browser/devtools/markupview/test/browser_markupview_tag_edit_03.js +++ b/browser/devtools/markupview/test/browser_markupview_tag_edit_03.js @@ -30,8 +30,8 @@ let test = asyncTest(function*() { yield mutated; info("Checking that the tagname change was done"); - let node = content.document.querySelector("#retag-me"); - let container = yield getContainerForSelector("#retag-me", inspector); + node = content.document.querySelector("#retag-me"); + container = yield getContainerForSelector("#retag-me", inspector); is(node.tagName, "P", "We've got #retag-me, it should now be a P"); ok(container.expanded, "It is still expanded"); ok(container.selected, "It is still selected"); diff --git a/browser/devtools/netmonitor/test/browser_net_post-data-03.js b/browser/devtools/netmonitor/test/browser_net_post-data-03.js index 94ada0e5c52..620111abed3 100644 --- a/browser/devtools/netmonitor/test/browser_net_post-data-03.js +++ b/browser/devtools/netmonitor/test/browser_net_post-data-03.js @@ -54,8 +54,8 @@ function test() { yield waitFor(aMonitor.panelWin, TAB_UPDATED); - let tab = document.querySelectorAll("#details-pane tab")[2]; - let tabpanel = document.querySelectorAll("#details-pane tabpanel")[2]; + tab = document.querySelectorAll("#details-pane tab")[2]; + tabpanel = document.querySelectorAll("#details-pane tabpanel")[2]; let formDataScope = tabpanel.querySelectorAll(".variables-view-scope")[0]; is(tab.getAttribute("selected"), "true", diff --git a/browser/devtools/profiler/test/browser_profiler_data-massaging-01.js b/browser/devtools/profiler/test/browser_profiler_data-massaging-01.js index dac9da56ef0..571f9b8c3f9 100644 --- a/browser/devtools/profiler/test/browser_profiler_data-massaging-01.js +++ b/browser/devtools/profiler/test/browser_profiler_data-massaging-01.js @@ -33,7 +33,7 @@ let test = Task.async(function*() { // Perform the second recording... yield front.startRecording(); - let profilingStartTime = front._profilingStartTime; + profilingStartTime = front._profilingStartTime; info("Started profiling at: " + profilingStartTime); busyWait(WAIT_TIME); // allow the profiler module to sample more cpu activity diff --git a/browser/devtools/profiler/test/browser_profiler_jump-to-debugger-02.js b/browser/devtools/profiler/test/browser_profiler_jump-to-debugger-02.js index b156bf43387..7330a680b2b 100644 --- a/browser/devtools/profiler/test/browser_profiler_jump-to-debugger-02.js +++ b/browser/devtools/profiler/test/browser_profiler_jump-to-debugger-02.js @@ -30,7 +30,7 @@ let test = Task.async(function*() { profilerWin.viewSourceInDebugger(SIMPLE_URL, 14); yield whenSourceShown; - let debuggerPanel = toolbox.getPanel("jsdebugger"); + debuggerPanel = toolbox.getPanel("jsdebugger"); ok(debuggerPanel, "The debugger panel was reselected."); is(DebuggerView.Sources.selectedValue, SIMPLE_URL, diff --git a/browser/devtools/profiler/test/browser_profiler_shared-connection-03.js b/browser/devtools/profiler/test/browser_profiler_shared-connection-03.js index 335db36f9d2..36aaa5fa50d 100644 --- a/browser/devtools/profiler/test/browser_profiler_shared-connection-03.js +++ b/browser/devtools/profiler/test/browser_profiler_shared-connection-03.js @@ -18,7 +18,7 @@ let test = Task.async(function*() { ok(nsIProfilerModule.IsActive(), "The built-in profiler module should now be active."); - let result = yield front._request("profiler", "stopProfiler"); + result = yield front._request("profiler", "stopProfiler"); is(result.started, false, "The request finished successfully and the profiler should've been stopped."); ok(!nsIProfilerModule.IsActive(), diff --git a/browser/devtools/profiler/test/browser_profiler_tree-abstract-01.js b/browser/devtools/profiler/test/browser_profiler_tree-abstract-01.js index 59168414899..9ca1523aff2 100644 --- a/browser/devtools/profiler/test/browser_profiler_tree-abstract-01.js +++ b/browser/devtools/profiler/test/browser_profiler_tree-abstract-01.js @@ -90,7 +90,7 @@ let test = Task.async(function*() { let receivedFocusEvent = treeRoot.once("focus"); EventUtils.sendMouseEvent({ type: "mousedown" }, fooItem.target); - let eventItem = yield receivedFocusEvent; + eventItem = yield receivedFocusEvent; is(eventItem, fooItem, "The 'focus' event target is correct."); is(document.commandDispatcher.focusedElement, fooItem.target, @@ -99,7 +99,7 @@ let test = Task.async(function*() { let receivedDblClickEvent = treeRoot.once("focus"); EventUtils.sendMouseEvent({ type: "dblclick" }, barItem.target); - let eventItem = yield receivedDblClickEvent; + eventItem = yield receivedDblClickEvent; is(eventItem, barItem, "The 'dblclick' event target is correct."); is(document.commandDispatcher.focusedElement, barItem.target, diff --git a/browser/devtools/profiler/test/browser_profiler_tree-view-06.js b/browser/devtools/profiler/test/browser_profiler_tree-view-06.js index 6b4b0010dce..1b3648dabe8 100644 --- a/browser/devtools/profiler/test/browser_profiler_tree-view-06.js +++ b/browser/devtools/profiler/test/browser_profiler_tree-view-06.js @@ -29,7 +29,7 @@ let test = Task.async(function*() { let receivedZoomEvent = treeRoot.once("zoom"); EventUtils.sendMouseEvent({ type: "mousedown" }, C.target.querySelector(".call-tree-zoom")); - let eventItem = yield receivedZoomEvent; + eventItem = yield receivedZoomEvent; is(eventItem, C, "The 'zoom' event target is correct."); finish(); diff --git a/browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_01.js b/browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_01.js index e95f0af2261..45ba13359a0 100644 --- a/browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_01.js +++ b/browser/devtools/projecteditor/test/browser_projecteditor_contextmenu_01.js @@ -18,10 +18,10 @@ let test = asyncTest(function*() { ok (textEditorContextMenuPopup, "The menu has loaded in the projecteditor document"); let projecteditor2 = yield addProjectEditorTabForTempDirectory(); - let contextMenuPopup = projecteditor2.document.getElementById("context-menu-popup"); - let textEditorContextMenuPopup = projecteditor2.document.getElementById("texteditor-context-popup"); + contextMenuPopup = projecteditor2.document.getElementById("context-menu-popup"); + textEditorContextMenuPopup = projecteditor2.document.getElementById("texteditor-context-popup"); ok (!contextMenuPopup, "The menu has NOT loaded in the projecteditor document"); ok (!textEditorContextMenuPopup, "The menu has NOT loaded in the projecteditor document"); ok (content.document.querySelector("#context-menu-popup"), "The menu has loaded in the specified element"); ok (content.document.querySelector("#texteditor-context-popup"), "The menu has loaded in the specified element"); -}); \ No newline at end of file +}); diff --git a/browser/devtools/projecteditor/test/browser_projecteditor_editors_image.js b/browser/devtools/projecteditor/test/browser_projecteditor_editors_image.js index d9fa43ad38c..b122932cd15 100644 --- a/browser/devtools/projecteditor/test/browser_projecteditor_editors_image.js +++ b/browser/devtools/projecteditor/test/browser_projecteditor_editors_image.js @@ -58,8 +58,8 @@ function testEditor(projecteditor, filePath) { projecteditor.projectTree.selectResource(resource); yield onceEditorActivated(projecteditor); - let editor = projecteditor.currentEditor; - let images = editor.elt.querySelectorAll("image"); + editor = projecteditor.currentEditor; + images = editor.elt.querySelectorAll("image"); ok (images.length, 1, "There is one image inside the editor"); is (images[0], editor.image, "The image property is set correctly with the DOM"); is (editor.image.getAttribute("src"), resource.uri, "The image has the resource URL"); diff --git a/browser/devtools/projecteditor/test/browser_projecteditor_external_change.js b/browser/devtools/projecteditor/test/browser_projecteditor_external_change.js index 38014c1dd9d..033965cab74 100644 --- a/browser/devtools/projecteditor/test/browser_projecteditor_external_change.js +++ b/browser/devtools/projecteditor/test/browser_projecteditor_external_change.js @@ -50,7 +50,7 @@ function testChangeUnsavedFileExternally(projecteditor, filePath, newData) { projecteditor.projectTree.selectResource(resource); yield onceEditorActivated(projecteditor); - let editor = projecteditor.currentEditor; + editor = projecteditor.currentEditor; info ("Checking to make sure the editor is now populated correctly"); is (editor.editor.getText(), "foobar", "Editor has not been updated with new file contents"); @@ -76,7 +76,7 @@ function testChangeFileExternally(projecteditor, filePath, newData) { projecteditor.projectTree.selectResource(resource); yield onceEditorActivated(projecteditor); - let editor = projecteditor.currentEditor; + editor = projecteditor.currentEditor; info ("Checking to make sure the editor is now populated correctly"); is (editor.editor.getText(), newData, "Editor has been updated with correct file contents"); diff --git a/browser/devtools/projecteditor/test/browser_projecteditor_menubar_01.js b/browser/devtools/projecteditor/test/browser_projecteditor_menubar_01.js index 1a0181a0158..c3fd452c841 100644 --- a/browser/devtools/projecteditor/test/browser_projecteditor_menubar_01.js +++ b/browser/devtools/projecteditor/test/browser_projecteditor_menubar_01.js @@ -19,10 +19,10 @@ let test = asyncTest(function*() { let projecteditor2 = yield addProjectEditorTabForTempDirectory(); let menubar = projecteditor2.menubar; - let fileMenu = projecteditor2.document.getElementById("file-menu"); - let editMenu = projecteditor2.document.getElementById("edit-menu"); + fileMenu = projecteditor2.document.getElementById("file-menu"); + editMenu = projecteditor2.document.getElementById("edit-menu"); ok (!fileMenu, "The menu has NOT loaded in the projecteditor document"); ok (!editMenu, "The menu has NOT loaded in the projecteditor document"); ok (content.document.querySelector("#file-menu"), "The menu has loaded in the specified element"); ok (content.document.querySelector("#edit-menu"), "The menu has loaded in the specified element"); -}); \ No newline at end of file +}); diff --git a/browser/devtools/responsivedesign/test/browser_responsiveui.js b/browser/devtools/responsivedesign/test/browser_responsiveui.js index 5450df63ec8..c82117102dd 100644 --- a/browser/devtools/responsivedesign/test/browser_responsiveui.js +++ b/browser/devtools/responsivedesign/test/browser_responsiveui.js @@ -190,10 +190,10 @@ function test() { is(content.innerWidth, expectedWidth, "Size correctly updated (width)."); is(content.innerHeight, expectedHeight, "Size correctly updated (height)."); is(instance.menulist.selectedIndex, -1, "Custom menuitem cannot be selected"); - let label = instance.menulist.firstChild.firstChild.getAttribute("label"); - let value = instance.menulist.value; - isnot(label, value, "Label from the menulist item is different than the value of the menulist") - let [width, height] = extractSizeFromString(label); + label = instance.menulist.firstChild.firstChild.getAttribute("label"); + value = instance.menulist.value; + isnot(label, value, "Label from the menulist item is different than the value of the menulist"); + [width, height] = extractSizeFromString(label); is(width, expectedWidth, "Label updated (width)."); is(height, expectedHeight, "Label updated (height)."); [width, height] = extractSizeFromString(value); diff --git a/browser/devtools/shadereditor/test/browser_se_shaders-edit-02.js b/browser/devtools/shadereditor/test/browser_se_shaders-edit-02.js index ca6bb3a8014..aee5d6041de 100644 --- a/browser/devtools/shadereditor/test/browser_se_shaders-edit-02.js +++ b/browser/devtools/shadereditor/test/browser_se_shaders-edit-02.js @@ -36,7 +36,7 @@ function ifWebGLSupported() { "An assignment error is contained in the linkage status."); fsEditor.replaceText("vec4", { line: 2, ch: 14 }, { line: 2, ch: 18 }); - let [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED); + [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED); ok(error, "The new fragment shader source was compiled with errors."); @@ -53,11 +53,11 @@ function ifWebGLSupported() { yield ensurePixelIs(gFront, { x: 511, y: 511 }, { r: 0, g: 255, b: 0, a: 255 }, true); vsEditor.replaceText("vec4", { line: 7, ch: 22 }, { line: 7, ch: 26 }); - let [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED); + [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED); ok(!error, "The new vertex shader source was compiled successfully."); fsEditor.replaceText("vec3", { line: 2, ch: 14 }, { line: 2, ch: 18 }); - let [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED); + [, error] = yield onceSpread(panel.panelWin, EVENTS.SHADER_COMPILED); ok(!error, "The new fragment shader source was compiled successfully."); yield ensurePixelIs(gFront, { x: 0, y: 0 }, { r: 255, g: 0, b: 0, a: 255 }, true); diff --git a/browser/devtools/shadereditor/test/browser_webgl-actor-test-07.js b/browser/devtools/shadereditor/test/browser_webgl-actor-test-07.js index ebc68f1e58b..62f564b002b 100644 --- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-07.js +++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-07.js @@ -33,15 +33,15 @@ function ifWebGLSupported() { yield ensurePixelIs(front, { x: 128, y: 128 }, { r: 255, g: 0, b: 0, a: 255 }, true); yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 0, b: 0, a: 255 }, true); - let vertSource = yield vertexShader.getText(); - let fragSource = yield fragmentShader.getText(); + vertSource = yield vertexShader.getText(); + fragSource = yield fragmentShader.getText(); ok(vertSource.contains("2.0"), "The vertex shader source is correct after changing it."); ok(!fragSource.contains("0.5"), "The fragment shader source is correct after changing the vertex shader."); let newFragSource = fragSource.replace("1.0", "0.5"); - let status = yield fragmentShader.compile(newFragSource); + status = yield fragmentShader.compile(newFragSource); ok(!status, "The new fragment shader source was compiled without errors."); @@ -49,8 +49,8 @@ function ifWebGLSupported() { yield ensurePixelIs(front, { x: 128, y: 128 }, { r: 255, g: 0, b: 0, a: 127 }, true); yield ensurePixelIs(front, { x: 511, y: 511 }, { r: 0, g: 0, b: 0, a: 255 }, true); - let vertSource = yield vertexShader.getText(); - let fragSource = yield fragmentShader.getText(); + vertSource = yield vertexShader.getText(); + fragSource = yield fragmentShader.getText(); ok(vertSource.contains("2.0"), "The vertex shader source is correct after changing the fragment shader."); ok(fragSource.contains("0.5"), diff --git a/browser/devtools/shadereditor/test/browser_webgl-actor-test-14.js b/browser/devtools/shadereditor/test/browser_webgl-actor-test-14.js index 95ae1e0cb43..9f40ba32859 100644 --- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-14.js +++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-14.js @@ -28,9 +28,9 @@ function ifWebGLSupported() { yield ensurePixelIs(front, { x: 127, y: 127 }, { r: 0, g: 255, b: 255, a: 255 }, true, "#canvas2"); ok(true, "The first fragment shader was changed."); - let oldFragSource = yield secondFragmentShader.getText(); - let newFragSource = oldFragSource.replace("vec4(uColor", "vec4(0.75, 0.75, 0.75"); - let status = yield secondFragmentShader.compile(newFragSource); + oldFragSource = yield secondFragmentShader.getText(); + newFragSource = oldFragSource.replace("vec4(uColor", "vec4(0.75, 0.75, 0.75"); + status = yield secondFragmentShader.compile(newFragSource); ok(!status, "The second new fragment shader source was compiled without errors."); diff --git a/browser/devtools/shadereditor/test/browser_webgl-actor-test-16.js b/browser/devtools/shadereditor/test/browser_webgl-actor-test-16.js index 85ebc77f123..6da8a94cfe2 100644 --- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-16.js +++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-16.js @@ -32,7 +32,7 @@ function ifWebGLSupported() { navigate(target, MULTIPLE_CONTEXTS_URL); let [secondProgram, thirdProgram] = yield getPrograms(front, 2); - let programs = yield front.getPrograms(); + programs = yield front.getPrograms(); is(programs.length, 2, "The second and third programs should be returned by a call to getPrograms()."); is(programs[0], secondProgram, @@ -40,7 +40,7 @@ function ifWebGLSupported() { is(programs[1], thirdProgram, "The third programs was correctly retrieved from the cache."); - let allPrograms = yield front._getAllPrograms(); + allPrograms = yield front._getAllPrograms(); is(allPrograms.length, 3, "Should be three programs in cache."); @@ -53,11 +53,11 @@ function ifWebGLSupported() { reload(target); yield promise.all([programsLinked, globalDestroyed, globalCreated]); - let allPrograms = yield front._getAllPrograms(); + allPrograms = yield front._getAllPrograms(); is(allPrograms.length, 3, "Should be 3 programs total in cache."); - let programs = yield front.getPrograms(); + programs = yield front.getPrograms(); is(programs.length, 1, "There should be 1 cached program actor now."); @@ -68,18 +68,18 @@ function ifWebGLSupported() { yield navigateInHistory(target, "forward"); - let globalDestroyed = once(front, "global-created"); - let globalCreated = once(front, "global-destroyed"); - let programsLinked = getPrograms(front, 2); + globalDestroyed = once(front, "global-created"); + globalCreated = once(front, "global-destroyed"); + programsLinked = getPrograms(front, 2); reload(target); yield promise.all([programsLinked, globalDestroyed, globalCreated]); - let allPrograms = yield front._getAllPrograms(); + allPrograms = yield front._getAllPrograms(); is(allPrograms.length, 3, "Should be 3 programs total in cache."); - let programs = yield front.getPrograms(); + programs = yield front.getPrograms(); is(programs.length, 2, "There should be 2 cached program actors now."); diff --git a/browser/devtools/shadereditor/test/browser_webgl-actor-test-18.js b/browser/devtools/shadereditor/test/browser_webgl-actor-test-18.js index 89b39626165..3d6ff9b1898 100644 --- a/browser/devtools/shadereditor/test/browser_webgl-actor-test-18.js +++ b/browser/devtools/shadereditor/test/browser_webgl-actor-test-18.js @@ -20,7 +20,7 @@ function ifWebGLSupported() { is(pixel.b, 0, "correct `b` value for first canvas.") is(pixel.a, 255, "correct `a` value for first canvas.") - let pixel = yield front.getPixel({ selector: "#canvas2", position: { x: 0, y: 0 }}); + pixel = yield front.getPixel({ selector: "#canvas2", position: { x: 0, y: 0 }}); is(pixel.r, 0, "correct `r` value for second canvas.") is(pixel.g, 255, "correct `g` value for second canvas.") is(pixel.b, 255, "correct `b` value for second canvas.") diff --git a/browser/devtools/shared/test/browser_cubic-bezier-02.js b/browser/devtools/shared/test/browser_cubic-bezier-02.js index 550ec0b6bcc..dc46f835a22 100644 --- a/browser/devtools/shared/test/browser_cubic-bezier-02.js +++ b/browser/devtools/shared/test/browser_cubic-bezier-02.js @@ -45,7 +45,7 @@ function* pointsCanBeDragged(widget) { is(bezier.P1[1], 1, "The new P1 progress coordinate is correct"); info("Listening for the update event"); - let onUpdated = widget.once("updated"); + onUpdated = widget.once("updated"); info("Generating a mousedown/move/up on P2"); widget._onPointMouseDown({target: widget.p2}); @@ -54,7 +54,7 @@ function* pointsCanBeDragged(widget) { EventUtils.synthesizeMouse(content.document.documentElement, 200, 300, {type: "mouseup"}, content.window); - let bezier = yield onUpdated; + bezier = yield onUpdated; is(bezier.P2[0], 1, "The new P2 time coordinate is correct"); is(bezier.P2[1], 0, "The new P2 progress coordinate is correct"); } @@ -76,12 +76,12 @@ function* curveCanBeClicked(widget) { is(bezier.P2[1], 0, "P2 progress coordinate remained unchanged"); info("Listening for the update event"); - let onUpdated = widget.once("updated"); + onUpdated = widget.once("updated"); info("Click close to P2"); widget._onCurveClick({pageX: 150, pageY: 250}); - let bezier = yield onUpdated; + bezier = yield onUpdated; is(bezier.P2[0], 0.75, "The new P2 time coordinate is correct"); is(bezier.P2[1], 0.25, "The new P2 progress coordinate is correct"); is(bezier.P1[0], 0.25, "P1 time coordinate remained unchanged"); @@ -99,45 +99,45 @@ function* pointsCanBeMovedWithKeyboard(widget) { is(bezier.P1[1], 0.75, "The new P1 progress coordinate is correct"); info("Moving P1 to the left, fast"); - let onUpdated = widget.once("updated"); + onUpdated = widget.once("updated"); widget._onPointKeyDown(getKeyEvent(widget.p1, 37, true)); - let bezier = yield onUpdated; + bezier = yield onUpdated; is(bezier.P1[0], 0.085, "The new P1 time coordinate is correct"); is(bezier.P1[1], 0.75, "The new P1 progress coordinate is correct"); info("Moving P1 to the right, fast"); - let onUpdated = widget.once("updated"); + onUpdated = widget.once("updated"); widget._onPointKeyDown(getKeyEvent(widget.p1, 39, true)); - let bezier = yield onUpdated; + bezier = yield onUpdated; is(bezier.P1[0], 0.235, "The new P1 time coordinate is correct"); is(bezier.P1[1], 0.75, "The new P1 progress coordinate is correct"); info("Moving P1 to the bottom"); - let onUpdated = widget.once("updated"); + onUpdated = widget.once("updated"); widget._onPointKeyDown(getKeyEvent(widget.p1, 40)); - let bezier = yield onUpdated; + bezier = yield onUpdated; is(bezier.P1[0], 0.235, "The new P1 time coordinate is correct"); is(bezier.P1[1], 0.735, "The new P1 progress coordinate is correct"); info("Moving P1 to the bottom, fast"); - let onUpdated = widget.once("updated"); + onUpdated = widget.once("updated"); widget._onPointKeyDown(getKeyEvent(widget.p1, 40, true)); - let bezier = yield onUpdated; + bezier = yield onUpdated; is(bezier.P1[0], 0.235, "The new P1 time coordinate is correct"); is(bezier.P1[1], 0.585, "The new P1 progress coordinate is correct"); info("Moving P1 to the top, fast"); - let onUpdated = widget.once("updated"); + onUpdated = widget.once("updated"); widget._onPointKeyDown(getKeyEvent(widget.p1, 38, true)); - let bezier = yield onUpdated; + bezier = yield onUpdated; is(bezier.P1[0], 0.235, "The new P1 time coordinate is correct"); is(bezier.P1[1], 0.735, "The new P1 progress coordinate is correct"); info("Checking that keyboard events also work with P2"); info("Moving P2 to the left"); - let onUpdated = widget.once("updated"); + onUpdated = widget.once("updated"); widget._onPointKeyDown(getKeyEvent(widget.p2, 37)); - let bezier = yield onUpdated; + bezier = yield onUpdated; is(bezier.P2[0], 0.735, "The new P2 time coordinate is correct"); is(bezier.P2[1], 0.25, "The new P2 progress coordinate is correct"); } diff --git a/browser/devtools/shared/test/browser_cubic-bezier-03.js b/browser/devtools/shared/test/browser_cubic-bezier-03.js index 8b19f347276..93d21a0d35e 100644 --- a/browser/devtools/shared/test/browser_cubic-bezier-03.js +++ b/browser/devtools/shared/test/browser_cubic-bezier-03.js @@ -55,9 +55,9 @@ function* coordinatesCanBeChangedByProvidingAValue(widget) { is(bezier.P2[1], 1, "The new P2 progress coordinate is correct"); info("Setting a custom cubic-bezier css value"); - let onUpdated = widget.once("updated"); + onUpdated = widget.once("updated"); widget.cssCubicBezierValue = "cubic-bezier(.25,-0.5, 1, 1.45)"; - let bezier = yield onUpdated; + bezier = yield onUpdated; ok(true, "The updated event was fired as a result of setting cssValue"); is(bezier.P1[0], .25, "The new P1 time coordinate is correct"); diff --git a/browser/devtools/shared/test/browser_layoutHelpers-getBoxQuads.js b/browser/devtools/shared/test/browser_layoutHelpers-getBoxQuads.js index ed66bccd203..af5360699b5 100644 --- a/browser/devtools/shared/test/browser_layoutHelpers-getBoxQuads.js +++ b/browser/devtools/shared/test/browser_layoutHelpers-getBoxQuads.js @@ -171,7 +171,7 @@ function takesScrollingIntoAccount(doc, helper) { scrolledNode.scrollTop = 0; subScrolledNode.scrollTop = 0; - let quad = helper.getAdjustedQuads(innerNode, "content"); + quad = helper.getAdjustedQuads(innerNode, "content"); is(quad.p1.x, 0, "p1.x of the scrolled node is correct after scrolling up"); is(quad.p1.y, 0, "p1.y of the scrolled node is correct after scrolling up"); } diff --git a/browser/devtools/shared/test/browser_outputparser.js b/browser/devtools/shared/test/browser_outputparser.js index eee8f2add33..d49f8b67604 100644 --- a/browser/devtools/shared/test/browser_outputparser.js +++ b/browser/devtools/shared/test/browser_outputparser.js @@ -42,7 +42,7 @@ function testParseCssProperty() { target.innerHTML = ""; - let frag = parser.parseCssProperty("background-image", "linear-gradient(to right, #F60 10%, rgba(0,0,0,1))", { + frag = parser.parseCssProperty("background-image", "linear-gradient(to right, #F60 10%, rgba(0,0,0,1))", { colorSwatchClass: "test-colorswatch", colorClass: "test-color" }); diff --git a/browser/devtools/shared/test/browser_tableWidget_basic.js b/browser/devtools/shared/test/browser_tableWidget_basic.js index 9d9840ec5d2..ba0ac4c8363 100644 --- a/browser/devtools/shared/test/browser_tableWidget_basic.js +++ b/browser/devtools/shared/test/browser_tableWidget_basic.js @@ -339,12 +339,12 @@ function testAPI() { // Calling it again should sort by it in descending manner table.sortBy("col2"); - let cell = table.tbody.children[2].firstChild.lastChild.previousSibling; + cell = table.tbody.children[2].firstChild.lastChild.previousSibling; checkDescendingOrder(cell); // Calling it again should sort by it in ascending manner table.sortBy("col2"); - let cell = table.tbody.children[2].firstChild.children[2]; + cell = table.tbody.children[2].firstChild.children[2]; checkAscendingOrder(cell); table.clear(); @@ -352,13 +352,13 @@ function testAPI() { // testing if sorting works should sort by ascending manner table.sortBy("col4"); - let cell = table.tbody.children[6].firstChild.children[1]; + cell = table.tbody.children[6].firstChild.children[1]; is(cell.textContent, "domnode", "DOMNode sorted correctly"); checkAscendingOrder(cell.nextSibling); // Calling it again should sort it in descending order table.sortBy("col4"); - let cell = table.tbody.children[6].firstChild.children[9]; + cell = table.tbody.children[6].firstChild.children[9]; is(cell.textContent, "domnode", "DOMNode sorted correctly"); checkDescendingOrder(cell.previousSibling); } diff --git a/browser/devtools/shared/test/browser_tableWidget_keyboard_interaction.js b/browser/devtools/shared/test/browser_tableWidget_keyboard_interaction.js index 04e7ce91a1f..0ec5355e029 100644 --- a/browser/devtools/shared/test/browser_tableWidget_keyboard_interaction.js +++ b/browser/devtools/shared/test/browser_tableWidget_keyboard_interaction.js @@ -147,7 +147,7 @@ let testKeyboardInteraction = Task.async(function*() { info("Pressing down key to select next row"); event = table.once(TableWidget.EVENTS.ROW_SELECTED); EventUtils.sendKey("DOWN", doc.defaultView); - let id = yield event; + id = yield event; is(id, "id2", "Correct row was selected after pressing down"); ok(node.classList.contains("theme-selected"), "row has selected class"); let nodes = doc.querySelectorAll(".theme-selected"); @@ -166,7 +166,7 @@ let testKeyboardInteraction = Task.async(function*() { id = yield event; is(id, "id3", "Correct row was selected after pressing down"); ok(node.classList.contains("theme-selected"), "row has selected class"); - let nodes = doc.querySelectorAll(".theme-selected"); + nodes = doc.querySelectorAll(".theme-selected"); for (let i = 0; i < nodes.length; i++) { is(nodes[i].getAttribute("data-id"), "id3", "Correct cell selected in all columns"); @@ -183,7 +183,7 @@ let testKeyboardInteraction = Task.async(function*() { id = yield event; is(id, "id2", "Correct row was selected after pressing down"); ok(node.classList.contains("theme-selected"), "row has selected class"); - let nodes = doc.querySelectorAll(".theme-selected"); + nodes = doc.querySelectorAll(".theme-selected"); for (let i = 0; i < nodes.length; i++) { is(nodes[i].getAttribute("data-id"), "id2", "Correct cell selected in all columns"); @@ -202,7 +202,7 @@ let testKeyboardInteraction = Task.async(function*() { id = yield event; is(id, "id1", "Correct row was selected after pressing down"); ok(node.classList.contains("theme-selected"), "row has selected class"); - let nodes = doc.querySelectorAll(".theme-selected"); + nodes = doc.querySelectorAll(".theme-selected"); for (let i = 0; i < nodes.length; i++) { is(nodes[i].getAttribute("data-id"), "id1", "Correct cell selected in all columns"); @@ -219,7 +219,7 @@ let testKeyboardInteraction = Task.async(function*() { id = yield event; is(id, "id9", "Correct row was selected after pressing down"); ok(node.classList.contains("theme-selected"), "row has selected class"); - let nodes = doc.querySelectorAll(".theme-selected"); + nodes = doc.querySelectorAll(".theme-selected"); for (let i = 0; i < nodes.length; i++) { is(nodes[i].getAttribute("data-id"), "id9", "Correct cell selected in all columns"); diff --git a/browser/devtools/shared/test/browser_tableWidget_mouse_interaction.js b/browser/devtools/shared/test/browser_tableWidget_mouse_interaction.js index 39a03de4cc4..efdc8ee0721 100644 --- a/browser/devtools/shared/test/browser_tableWidget_mouse_interaction.js +++ b/browser/devtools/shared/test/browser_tableWidget_mouse_interaction.js @@ -147,13 +147,13 @@ let testMouseInteraction = Task.async(function*() { is(id, "id1", "Correct row was selected"); info("clicking on third row to select it"); - let event = table.once(TableWidget.EVENTS.ROW_SELECTED); + event = table.once(TableWidget.EVENTS.ROW_SELECTED); let node2 = table.tbody.firstChild.firstChild.children[3]; // node should not have selected class ok(!node2.classList.contains("theme-selected"), "New node should not have selected class before clicking"); click(node2); - let id = yield event; + id = yield event; ok(node2.classList.contains("theme-selected"), "New node has selected class after clicking"); is(id, "id3", "Correct table path is emitted for new node") @@ -162,15 +162,15 @@ let testMouseInteraction = Task.async(function*() { "Old node should not have selected class after the click on new node"); // clicking on table header to sort by it - let event = table.once(TableWidget.EVENTS.COLUMN_SORTED); - let node = table.tbody.children[6].firstChild.children[0]; + event = table.once(TableWidget.EVENTS.COLUMN_SORTED); + node = table.tbody.children[6].firstChild.children[0]; info("clicking on the 4th coulmn header to sort the table by it"); ok(!node.hasAttribute("sorted"), "Node should not have sorted attribute before clicking"); ok(doc.querySelector("[sorted]"), "Although, something else should be sorted on"); isnot(doc.querySelector("[sorted]"), node, "Which is not equal to this node"); click(node); - let id = yield event; + id = yield event; is(id, "col4", "Correct column was sorted on"); ok(node.hasAttribute("sorted"), "Node should now have sorted attribute after clicking"); @@ -181,13 +181,13 @@ let testMouseInteraction = Task.async(function*() { // test context menu opening. // hiding second column // event listener for popupshown - let event = Promise.defer(); + event = Promise.defer(); table.menupopup.addEventListener("popupshown", function onPopupShown(e) { table.menupopup.removeEventListener("popupshown", onPopupShown); event.resolve(); }) info("right clicking on the first column header"); - let node = table.tbody.firstChild.firstChild.firstChild; + node = table.tbody.firstChild.firstChild.firstChild; click(node, 2); yield event.promise; is(table.menupopup.querySelectorAll("[disabled]").length, 1, @@ -197,52 +197,52 @@ let testMouseInteraction = Task.async(function*() { "Which is the unique column"); // popup should be open now // clicking on second column label - let event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU); - let node = table.menupopup.querySelector("[data-id='col2']"); + event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU); + node = table.menupopup.querySelector("[data-id='col2']"); info("selecting to hide the second column"); ok(!table.tbody.children[2].hasAttribute("hidden"), "Column is not hidden before hiding it"); click(node); - let id = yield event; + id = yield event; is(id, "col2", "Correct column was triggered to be hidden"); is(table.tbody.children[2].getAttribute("hidden"), "true", "Column is hidden after hiding it"); // hiding third column // event listener for popupshown - let event = Promise.defer(); + event = Promise.defer(); table.menupopup.addEventListener("popupshown", function onPopupShown(e) { table.menupopup.removeEventListener("popupshown", onPopupShown); event.resolve(); }) info("right clicking on the first column header"); - let node = table.tbody.firstChild.firstChild.firstChild; + node = table.tbody.firstChild.firstChild.firstChild; click(node, 2); yield event.promise; is(table.menupopup.querySelectorAll("[disabled]").length, 1, "Only 1 menuitem is disabled"); // popup should be open now // clicking on second column label - let event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU); - let node = table.menupopup.querySelector("[data-id='col3']"); + event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU); + node = table.menupopup.querySelector("[data-id='col3']"); info("selecting to hide the second column"); ok(!table.tbody.children[4].hasAttribute("hidden"), "Column is not hidden before hiding it"); click(node); - let id = yield event; + id = yield event; is(id, "col3", "Correct column was triggered to be hidden"); is(table.tbody.children[4].getAttribute("hidden"), "true", "Column is hidden after hiding it"); // opening again to see if 2 items are disabled now // event listener for popupshown - let event = Promise.defer(); + event = Promise.defer(); table.menupopup.addEventListener("popupshown", function onPopupShown(e) { table.menupopup.removeEventListener("popupshown", onPopupShown); event.resolve(); }) info("right clicking on the first column header"); - let node = table.tbody.firstChild.firstChild.firstChild; + node = table.tbody.firstChild.firstChild.firstChild; click(node, 2); yield event.promise; is(table.menupopup.querySelectorAll("[disabled]").length, 2, @@ -257,37 +257,37 @@ let testMouseInteraction = Task.async(function*() { // showing back 2nd column // popup should be open now // clicking on second column label - let event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU); - let node = table.menupopup.querySelector("[data-id='col2']"); + event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU); + node = table.menupopup.querySelector("[data-id='col2']"); info("selecting to hide the second column"); is(table.tbody.children[2].getAttribute("hidden"), "true", "Column is hidden before unhiding it"); click(node); - let id = yield event; + id = yield event; is(id, "col2", "Correct column was triggered to be hidden"); ok(!table.tbody.children[2].hasAttribute("hidden"), "Column is not hidden after unhiding it"); // showing back 3rd column // event listener for popupshown - let event = Promise.defer(); + event = Promise.defer(); table.menupopup.addEventListener("popupshown", function onPopupShown(e) { table.menupopup.removeEventListener("popupshown", onPopupShown); event.resolve(); }) info("right clicking on the first column header"); - let node = table.tbody.firstChild.firstChild.firstChild; + node = table.tbody.firstChild.firstChild.firstChild; click(node, 2); yield event.promise; // popup should be open now // clicking on second column label - let event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU); - let node = table.menupopup.querySelector("[data-id='col3']"); + event = table.once(TableWidget.EVENTS.HEADER_CONTEXT_MENU); + node = table.menupopup.querySelector("[data-id='col3']"); info("selecting to hide the second column"); is(table.tbody.children[4].getAttribute("hidden"), "true", "Column is hidden before unhiding it"); click(node); - let id = yield event; + id = yield event; is(id, "col3", "Correct column was triggered to be hidden"); ok(!table.tbody.children[4].hasAttribute("hidden"), "Column is not hidden after unhiding it"); diff --git a/browser/devtools/shared/test/browser_treeWidget_keyboard_interaction.js b/browser/devtools/shared/test/browser_treeWidget_keyboard_interaction.js index 9668020ca1d..6a7a5b492d7 100644 --- a/browser/devtools/shared/test/browser_treeWidget_keyboard_interaction.js +++ b/browser/devtools/shared/test/browser_treeWidget_keyboard_interaction.js @@ -124,7 +124,7 @@ let testKeyboardInteraction = Task.async(function*() { event = Promise.defer(); tree.once("select", pass); EventUtils.sendKey("DOWN", content); - let [name, data, attachment] = yield event.promise; + [name, data, attachment] = yield event.promise; is(data.length, 2, "Correct level item was selected after second down keypress"); is(data[0], "level1", "Correct parent level"); is(data[1], "level2", "Correct second level"); @@ -133,7 +133,7 @@ let testKeyboardInteraction = Task.async(function*() { event = Promise.defer(); tree.once("select", pass); EventUtils.sendKey("DOWN", content); - let [name, data, attachment] = yield event.promise; + [name, data, attachment] = yield event.promise; is(data.length, 3, "Correct level item was selected after third down keypress"); is(data[0], "level1", "Correct parent level"); is(data[1], "level2", "Correct second level"); @@ -143,7 +143,7 @@ let testKeyboardInteraction = Task.async(function*() { event = Promise.defer(); tree.once("select", pass); EventUtils.sendKey("DOWN", content); - let [name, data, attachment] = yield event.promise; + [name, data, attachment] = yield event.promise; is(data.length, 2, "Correct level item was selected after fourth down keypress"); is(data[0], "level1", "Correct parent level"); is(data[1], "level2-1", "Correct second level"); @@ -173,7 +173,7 @@ let testKeyboardInteraction = Task.async(function*() { node = tree.root.children.firstChild.nextSibling.firstChild; ok(node.hasAttribute("expanded"), "Parent is expanded"); EventUtils.sendKey("LEFT", content); - let [name, data] = yield event.promise; + [name, data] = yield event.promise; is(data.length, 3, "Correct level item was selected after second left keypress"); is(data[0], "level1", "Correct parent level"); is(data[1], "level2", "Correct second level"); @@ -186,7 +186,7 @@ let testKeyboardInteraction = Task.async(function*() { event = Promise.defer(); tree.once("select", pass); EventUtils.sendKey("DOWN", content); - let [name, data, attachment] = yield event.promise; + [name, data, attachment] = yield event.promise; is(data.length, 2, "Correct level item was selected after fifth down keypress"); is(data[0], "level1", "Correct parent level"); is(data[1], "level2-1", "Correct second level"); diff --git a/browser/devtools/shared/test/browser_treeWidget_mouse_interaction.js b/browser/devtools/shared/test/browser_treeWidget_mouse_interaction.js index ef99dd6ddfe..ca18deb08a1 100644 --- a/browser/devtools/shared/test/browser_treeWidget_mouse_interaction.js +++ b/browser/devtools/shared/test/browser_treeWidget_mouse_interaction.js @@ -123,7 +123,7 @@ let testMouseInteraction = Task.async(function*() { ok(!node2.hasAttribute("expanded"), "New node is not expanded before clicking"); tree.once("select", pass); click(node2); - let [name, data, attachment] = yield event.promise; + [name, data, attachment] = yield event.promise; ok(node2.classList.contains("theme-selected"), "New node has selected class after clicking"); is(data[0], "level1", "Correct tree path is emitted for new node") diff --git a/browser/devtools/shared/test/unit/test_bezierCanvas.js b/browser/devtools/shared/test/unit/test_bezierCanvas.js index fde8f4be49b..9dd945a22ae 100644 --- a/browser/devtools/shared/test/unit/test_bezierCanvas.js +++ b/browser/devtools/shared/test/unit/test_bezierCanvas.js @@ -35,8 +35,8 @@ function offsetsGetterReturnsData() { do_print("offsets getter returns data according to current padding"); - let b = new BezierCanvas(getCanvasMock(), getCubicBezier(), [0, 0]); - let offsets = b.offsets; + b = new BezierCanvas(getCanvasMock(), getCubicBezier(), [0, 0]); + offsets = b.offsets; do_check_eq(offsets[0].top, "400px"); do_check_eq(offsets[0].left, "0px"); @@ -57,14 +57,14 @@ function convertsOffsetsToCoordinates() { do_check_eq(coordinates[0], 0); do_check_eq(coordinates[1], 1.5); - let coordinates = b.offsetsToCoordinates({style: { + coordinates = b.offsetsToCoordinates({style: { left: "0px", top: "300px" }}); do_check_eq(coordinates[0], 0); do_check_eq(coordinates[1], 0); - let coordinates = b.offsetsToCoordinates({style: { + coordinates = b.offsetsToCoordinates({style: { left: "200px", top: "100px" }}); diff --git a/browser/devtools/shared/test/unit/test_cubicBezier.js b/browser/devtools/shared/test/unit/test_cubicBezier.js index 1be674384d5..3b282353682 100644 --- a/browser/devtools/shared/test/unit/test_cubicBezier.js +++ b/browser/devtools/shared/test/unit/test_cubicBezier.js @@ -63,8 +63,8 @@ function coordinatesToStringOutputsAString() { let string = c.coordinates.toString(); do_check_eq(string, "0,1,.5,-2"); - let c = new CubicBezier([1, 1, 1, 1]); - let string = c.coordinates.toString(); + c = new CubicBezier([1, 1, 1, 1]); + string = c.coordinates.toString(); do_check_eq(string, "1,1,1,1"); } diff --git a/browser/devtools/styleeditor/test/browser_styleeditor_cmd_edit.js b/browser/devtools/styleeditor/test/browser_styleeditor_cmd_edit.js index 56c21b09239..ffd8fdc06b4 100644 --- a/browser/devtools/styleeditor/test/browser_styleeditor_cmd_edit.js +++ b/browser/devtools/styleeditor/test/browser_styleeditor_cmd_edit.js @@ -193,7 +193,7 @@ function spawnTest() { }, ]); - let toolbox = gDevTools.getToolbox(options.target); + toolbox = gDevTools.getToolbox(options.target); ok(toolbox != null, "toolbox is open"); let styleEditor = toolbox.getCurrentPanel(); diff --git a/browser/devtools/styleeditor/test/browser_styleeditor_new.js b/browser/devtools/styleeditor/test/browser_styleeditor_new.js index 238e40acfa9..453dc58f06b 100644 --- a/browser/devtools/styleeditor/test/browser_styleeditor_new.js +++ b/browser/devtools/styleeditor/test/browser_styleeditor_new.js @@ -73,7 +73,7 @@ function testInitialState(aEditor) { ok(aEditor.sourceEditor.hasFocus(), "new editor has focus"); - let summary = aEditor.summary; + summary = aEditor.summary; let ruleCount = summary.querySelector(".stylesheet-rule-count").textContent; is(parseInt(ruleCount), 0, "new editor initially shows 0 rules"); diff --git a/browser/devtools/styleinspector/test/browser_computedview_keybindings_02.js b/browser/devtools/styleinspector/test/browser_computedview_keybindings_02.js index b3e23fa7a04..60a9dea4d6c 100644 --- a/browser/devtools/styleinspector/test/browser_computedview_keybindings_02.js +++ b/browser/devtools/styleinspector/test/browser_computedview_keybindings_02.js @@ -50,7 +50,7 @@ let test = asyncTest(function*() { ok(secondStyleSelectors.childNodes.length > 0, "Matched selectors expanded"); info("Tab back up and test the same thing, with space"); - let onExpanded = inspector.once("computed-view-property-expanded"); + onExpanded = inspector.once("computed-view-property-expanded"); EventUtils.synthesizeKey("VK_TAB", {shiftKey: true}); EventUtils.synthesizeKey("VK_SPACE", {}); yield onExpanded; diff --git a/browser/devtools/styleinspector/test/browser_ruleview_add-property-cancel_02.js b/browser/devtools/styleinspector/test/browser_ruleview_add-property-cancel_02.js index 6e7ba61cbd1..bb7b047caa0 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_add-property-cancel_02.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_add-property-cancel_02.js @@ -45,7 +45,7 @@ let test = asyncTest(function*() { info("Pressing return to commit and focus the new value field"); let onValueFocus = once(elementRuleEditor.element, "focus", true); - let onModifications = elementRuleEditor.rule._applyingModifications; + onModifications = elementRuleEditor.rule._applyingModifications; EventUtils.synthesizeKey("VK_RETURN", {}, view.doc.defaultView); yield onValueFocus; yield onModifications; @@ -62,7 +62,7 @@ let test = asyncTest(function*() { editor.input.value = "red"; info("Escaping out of the field"); - let onModifications = elementRuleEditor.rule._applyingModifications; + onModifications = elementRuleEditor.rule._applyingModifications; EventUtils.synthesizeKey("VK_ESCAPE", {}, view.doc.defaultView); yield onModifications; @@ -70,7 +70,7 @@ let test = asyncTest(function*() { let focusedElement = inplaceEditor(elementRuleEditor.rule.textProps[0].editor.valueSpan).input; is(focusedElement, focusedElement.ownerDocument.activeElement, "Correct element has focus"); - let onModifications = elementRuleEditor.rule._applyingModifications; + onModifications = elementRuleEditor.rule._applyingModifications; EventUtils.synthesizeKey("VK_ESCAPE", {}, view.doc.defaultView); yield onModifications; diff --git a/browser/devtools/styleinspector/test/browser_ruleview_add-property_01.js b/browser/devtools/styleinspector/test/browser_ruleview_add-property_01.js index bf4f2733766..009962a37d7 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_add-property_01.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_add-property_01.js @@ -68,7 +68,7 @@ function* testCreateNew(view) { info("Entering a value and bluring the field to expect a rule change"); editor.input.value = "#XYZ"; let onBlur = once(editor.input, "blur"); - let onModifications = elementRuleEditor.rule._applyingModifications; + onModifications = elementRuleEditor.rule._applyingModifications; editor.input.blur(); yield onBlur; yield onModifications; diff --git a/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js b/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js index 05ed35995f8..f1995bceff0 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_01.js @@ -54,7 +54,7 @@ function* testImageTooltipAfterColorChange(swatch, url, ruleView) { // After a color change, the property is re-populated, we need to get the new // dom node url = getRuleViewProperty(ruleView, "body", "background").valueSpan.querySelector(".theme-link"); - let anchor = yield isHoverTooltipTarget(ruleView.tooltips.previewTooltip, url); + anchor = yield isHoverTooltipTarget(ruleView.tooltips.previewTooltip, url); ok(anchor, "The image preview tooltip is shown on the url span"); is(anchor, url, "The anchor returned by the showOnHover callback is correct"); } diff --git a/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_02.js b/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_02.js index 5ada0738a14..28bd8729cad 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_02.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_colorpicker-and-image-tooltip_02.js @@ -49,13 +49,13 @@ function* testColorChangeIsntRevertedWhenOtherTooltipIsShown(ruleView) { info("Open the image preview tooltip"); let value = getRuleViewProperty(ruleView, "body", "background").valueSpan; let url = value.querySelector(".theme-link"); - let onShown = ruleView.tooltips.previewTooltip.once("shown"); + onShown = ruleView.tooltips.previewTooltip.once("shown"); let anchor = yield isHoverTooltipTarget(ruleView.tooltips.previewTooltip, url); ruleView.tooltips.previewTooltip.show(anchor); yield onShown; info("Image tooltip is shown, verify that the swatch is still correct"); - let swatch = value.querySelector(".ruleview-colorswatch"); + swatch = value.querySelector(".ruleview-colorswatch"); is(swatch.style.backgroundColor, "rgb(0, 0, 0)", "The swatch's color is correct"); is(swatch.nextSibling.textContent, "#000", "The color name is correct"); } diff --git a/browser/devtools/styleinspector/test/browser_ruleview_edit-property_01.js b/browser/devtools/styleinspector/test/browser_ruleview_edit-property_01.js index b10ab5b7853..86f366d82d7 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_edit-property_01.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_edit-property_01.js @@ -65,7 +65,7 @@ function* testEditProperty(view, name, value, browser) { info("Entering a new value, including ; to commit and blur the value"); let onBlur = once(input, "blur"); - let onModifications = idRuleEditor.rule._applyingModifications; + onModifications = idRuleEditor.rule._applyingModifications; for (let ch of value + ";") { EventUtils.sendChar(ch, view.doc.defaultView); } diff --git a/browser/devtools/styleinspector/test/browser_ruleview_edit-property_02.js b/browser/devtools/styleinspector/test/browser_ruleview_edit-property_02.js index 3d967e612a0..90ac30a0a43 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_edit-property_02.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_edit-property_02.js @@ -76,7 +76,7 @@ function* testEditProperty(inspector, ruleView) { is(newValue, "red", "border-color should have been set."); info("Entering property name \"color\" followed by a colon to focus the value"); - let onFocus = once(idRuleEditor.element, "focus", true); + onFocus = once(idRuleEditor.element, "focus", true); for (let ch of "color:") { EventUtils.sendChar(ch, ruleView.doc.defaultView); } @@ -86,7 +86,7 @@ function* testEditProperty(inspector, ruleView) { editor = inplaceEditor(ruleView.doc.activeElement); info("Entering a value following by a semi-colon to commit it"); - let onBlur = once(editor.input, "blur"); + onBlur = once(editor.input, "blur"); for (let ch of "red;") { EventUtils.sendChar(ch, ruleView.doc.defaultView); } @@ -119,7 +119,7 @@ function* testDisableProperty(inspector, ruleView) { propEditor.enable.click(); yield idRuleEditor.rule._applyingModifications; - let newValue = yield executeInContent("Test:GetRulePropertyValue", { + newValue = yield executeInContent("Test:GetRulePropertyValue", { styleSheetIndex: 0, ruleIndex: 0, name: "border-color" diff --git a/browser/devtools/styleinspector/test/browser_ruleview_keybindings.js b/browser/devtools/styleinspector/test/browser_ruleview_keybindings.js index 42448f1b78e..4db7a4d3b90 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_keybindings.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_keybindings.js @@ -27,17 +27,17 @@ let test = asyncTest(function*() { editor.input.value = "color"; info("Typing ENTER to focus the next field: property value"); - let onFocus = once(brace.parentNode, "focus", true); + onFocus = once(brace.parentNode, "focus", true); EventUtils.sendKey("return"); yield onFocus; ok(true, "The value field was focused"); info("Entering a property value"); - let editor = getCurrentInplaceEditor(view); + editor = getCurrentInplaceEditor(view); editor.input.value = "green"; info("Typing ENTER again should focus a new property name"); - let onFocus = once(brace.parentNode, "focus", true); + onFocus = once(brace.parentNode, "focus", true); EventUtils.sendKey("return"); yield onFocus; ok(true, "The new property name field was focused"); diff --git a/browser/devtools/styleinspector/test/browser_ruleview_pseudo-element.js b/browser/devtools/styleinspector/test/browser_ruleview_pseudo-element.js index 612185bd92f..b4246209035 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_pseudo-element.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_pseudo-element.js @@ -110,7 +110,7 @@ function* testTopLeft(inspector, view) { is(defaultView.getComputedStyle(element).getPropertyValue("padding-top"), "32px", "Added property should not apply to element"); - let firstProp = elementRuleView.addProperty("background-color", "rgb(0, 0, 255)", ""); + firstProp = elementRuleView.addProperty("background-color", "rgb(0, 0, 255)", ""); yield elementRule._applyingModifications; is(defaultView.getComputedStyle(element).getPropertyValue("background-color"), "rgb(0, 0, 255)", diff --git a/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_01.js b/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_01.js index 9c66c36dbdc..db9a71f048e 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_01.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-attribute-change_01.js @@ -38,7 +38,7 @@ let test = asyncTest(function*() { checkRuleViewContent(view, ["element", ".testclass"]); info("Reverting the ID attribute change"); - let ruleViewRefreshed = inspector.once("rule-view-refreshed"); + ruleViewRefreshed = inspector.once("rule-view-refreshed"); testElement.setAttribute("id", "testid"); yield ruleViewRefreshed; diff --git a/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-style-change.js b/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-style-change.js index 1848267f616..5f7b8938f22 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-style-change.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_refresh-on-style-change.js @@ -34,7 +34,7 @@ let test = asyncTest(function*() { is(textAlign, "right", "The rule view shows the new text align."); let color = getRuleViewPropertyValue(view, "element", "color"); is(color, "lightgoldenrodyellow", "The rule view shows the new color.") - let fontSize = getRuleViewPropertyValue(view, "element", "font-size"); + fontSize = getRuleViewPropertyValue(view, "element", "font-size"); is(fontSize, "3em", "The rule view shows the new font size."); let textTransform = getRuleViewPropertyValue(view, "element", "text-transform"); is(textTransform, "uppercase", "The rule view shows the new text transform."); diff --git a/browser/devtools/styleinspector/test/browser_ruleview_selector-highlighter_02.js b/browser/devtools/styleinspector/test/browser_ruleview_selector-highlighter_02.js index bf19c63a959..f51698a57d5 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_selector-highlighter_02.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_selector-highlighter_02.js @@ -63,7 +63,7 @@ let test = asyncTest(function*() { info("Checking that the right NodeFront reference and options are passed"); yield selectNode("p", inspector); - let selectorSpan = getRuleViewSelector(rView, "p").firstElementChild; + selectorSpan = getRuleViewSelector(rView, "p").firstElementChild; rView.highlighters._onMouseMove({target: selectorSpan}); is(HighlighterFront.nodeFront.tagName, "P", "The right NodeFront is passed to the highlighter (1)"); @@ -71,7 +71,7 @@ let test = asyncTest(function*() { "The right selector option is passed to the highlighter (1)"); yield selectNode("body", inspector); - let selectorSpan = getRuleViewSelector(rView, "body").firstElementChild; + selectorSpan = getRuleViewSelector(rView, "body").firstElementChild; rView.highlighters._onMouseMove({target: selectorSpan}); is(HighlighterFront.nodeFront.tagName, "BODY", "The right NodeFront is passed to the highlighter (2)"); diff --git a/browser/devtools/styleinspector/test/browser_ruleview_urls-clickable.js b/browser/devtools/styleinspector/test/browser_ruleview_urls-clickable.js index 3427e82800b..24b710041e6 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_urls-clickable.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_urls-clickable.js @@ -31,7 +31,7 @@ function* selectNodes(inspector, ruleView) { is(relativeLink.getAttribute("href"), TEST_IMAGE, "href matches"); yield selectNode(relative2, inspector); - let relativeLink = ruleView.doc.querySelector(".ruleview-propertycontainer a"); + relativeLink = ruleView.doc.querySelector(".ruleview-propertycontainer a"); ok(relativeLink, "Link exists for relative2 node"); is(relativeLink.getAttribute("href"), TEST_IMAGE, "href matches"); diff --git a/browser/devtools/styleinspector/test/browser_ruleview_user-agent-styles.js b/browser/devtools/styleinspector/test/browser_ruleview_user-agent-styles.js index 9c7e526f890..e9a9cf591c2 100644 --- a/browser/devtools/styleinspector/test/browser_ruleview_user-agent-styles.js +++ b/browser/devtools/styleinspector/test/browser_ruleview_user-agent-styles.js @@ -66,16 +66,16 @@ function* userAgentStylesVisible(inspector, view) { yield selectNode("pre", inspector); yield compareAppliedStylesWithUI(inspector, view, "ua"); - let userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable); - let uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable); + userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable); + uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable); is (userRules.length, 1, "Correct number of user rules"); ok (uaRules.length > 0, "Has UA rules"); yield selectNode("a", inspector); yield compareAppliedStylesWithUI(inspector, view, "ua"); - let userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable); - let uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable); + userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable); + uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable); is (userRules.length, 1, "Correct number of user rules"); ok (userRules.some(rule=> rule.matchedSelectors.length === 0), @@ -103,16 +103,16 @@ function* userAgentStylesNotVisible(inspector, view) { yield selectNode("pre", inspector); yield compareAppliedStylesWithUI(inspector, view); - let userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable); - let uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable); + userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable); + uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable); is (userRules.length, 1, "Correct number of user rules"); is (uaRules.length, 0, "No UA rules"); yield selectNode("a", inspector); yield compareAppliedStylesWithUI(inspector, view); - let userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable); - let uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable); + userRules = view._elementStyle.rules.filter(rule=>rule.editor.isEditable); + uaRules = view._elementStyle.rules.filter(rule=>!rule.editor.isEditable); is (userRules.length, 1, "Correct number of user rules"); is (uaRules.length, 0, "No UA rules"); } diff --git a/browser/devtools/styleinspector/test/browser_styleinspector_csslogic-content-stylesheets.js b/browser/devtools/styleinspector/test/browser_styleinspector_csslogic-content-stylesheets.js index 6284e52c04a..30a702bfea6 100644 --- a/browser/devtools/styleinspector/test/browser_styleinspector_csslogic-content-stylesheets.js +++ b/browser/devtools/styleinspector/test/browser_styleinspector_csslogic-content-stylesheets.js @@ -34,8 +34,8 @@ let test = asyncTest(function*() { allowXUL(); yield addTab(TEST_URI_XUL); - let {toolbox, inspector, view} = yield openRuleView(); - let target = getNode("#target"); + ({toolbox, inspector, view} = yield openRuleView()); + target = getNode("#target"); yield selectNode("#target", inspector); yield checkSheets(target); diff --git a/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-background-image.js b/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-background-image.js index d8e0c4962a8..a9fcd6d7d61 100644 --- a/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-background-image.js +++ b/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-background-image.js @@ -42,7 +42,7 @@ let test = asyncTest(function*() { yield testTooltipAppearsEvenInEditMode(view); info("Switching over to the computed-view"); - let {view} = yield openComputedView(); + ({view} = yield openComputedView()); info("Testing that the background-image computed style has a tooltip too"); yield testComputedView(view); diff --git a/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-closes-on-new-selection.js b/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-closes-on-new-selection.js index c6abd58ede7..57da400761c 100644 --- a/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-closes-on-new-selection.js +++ b/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-closes-on-new-selection.js @@ -16,7 +16,7 @@ let test = asyncTest(function*() { yield testRuleView(view, inspector); info("Testing computed view tooltip closes on new selection"); - let {view} = yield openComputedView(); + ({view} = yield openComputedView()); yield testComputedView(view, inspector); }); diff --git a/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-longhand-fontfamily.js b/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-longhand-fontfamily.js index fcfa74e20f4..57877824fcb 100644 --- a/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-longhand-fontfamily.js +++ b/browser/devtools/styleinspector/test/browser_styleinspector_tooltip-longhand-fontfamily.js @@ -32,7 +32,7 @@ let test = asyncTest(function*() { yield testRuleView(view, inspector.selection.nodeFront); info("Opening the computed view"); - let {toolbox, inspector, view} = yield openComputedView(); + ({toolbox, inspector, view} = yield openComputedView()); yield testComputedView(view, inspector.selection.nodeFront); diff --git a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-01.js b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-01.js index 5183857aced..04bda255d44 100644 --- a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-01.js +++ b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-01.js @@ -31,12 +31,12 @@ let test = asyncTest(function*() { is(h, h2, "The same instance of highlighter is returned everytime in the rule-view"); let {view: cView} = yield openComputedView(); - let overlay = cView.highlighters; + overlay = cView.highlighters; ok(!overlay.highlighters[TYPE], "No highlighter exists in the computed-view"); - let h = yield overlay._getHighlighter(TYPE); + h = yield overlay._getHighlighter(TYPE); ok(overlay.highlighters[TYPE], "The highlighter has been created in the computed-view"); is(h, overlay.highlighters[TYPE], "The right highlighter has been created"); - let h2 = yield overlay._getHighlighter(TYPE); + h2 = yield overlay._getHighlighter(TYPE); is(h, h2, "The same instance of highlighter is returned everytime in the computed-view"); }); diff --git a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-02.js b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-02.js index 826615fcc8e..24d64936aae 100644 --- a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-02.js +++ b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-02.js @@ -36,28 +36,28 @@ let test = asyncTest(function*() { ok(!hs.promises[TYPE], "No highlighter is being created in the rule-view (2)"); info("Faking a mousemove on a transform property"); - let {valueSpan} = getRuleViewProperty(rView, "body", "transform"); + ({valueSpan} = getRuleViewProperty(rView, "body", "transform")); hs._onMouseMove({target: valueSpan}); ok(hs.promises[TYPE], "The highlighter is being initialized"); let h = yield hs.promises[TYPE]; is(h, hs.highlighters[TYPE], "The initialized highlighter is the right one"); let {view: cView} = yield openComputedView(); - let hs = cView.highlighters; + hs = cView.highlighters; ok(!hs.highlighters[TYPE], "No highlighter exists in the computed-view (1)"); ok(!hs.promises[TYPE], "No highlighter is being created in the computed-view (1)"); info("Faking a mousemove on a non-transform property"); - let {valueSpan} = getComputedViewProperty(cView, "color"); + ({valueSpan} = getComputedViewProperty(cView, "color")); hs._onMouseMove({target: valueSpan}); ok(!hs.highlighters[TYPE], "No highlighter exists in the computed-view (2)"); ok(!hs.promises[TYPE], "No highlighter is being created in the computed-view (2)"); info("Faking a mousemove on a transform property"); - let {valueSpan} = getComputedViewProperty(cView, "transform"); + ({valueSpan} = getComputedViewProperty(cView, "transform")); hs._onMouseMove({target: valueSpan}); ok(hs.promises[TYPE], "The highlighter is being initialized"); - let h = yield hs.promises[TYPE]; + h = yield hs.promises[TYPE]; is(h, hs.highlighters[TYPE], "The initialized highlighter is the right one"); }); diff --git a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-03.js b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-03.js index eb57783dd60..8c90118b741 100644 --- a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-03.js +++ b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-03.js @@ -73,19 +73,19 @@ let test = asyncTest(function*() { info("Checking that the right NodeFront reference is passed"); yield selectNode("html", inspector); - let {valueSpan} = getRuleViewProperty(rView, "html", "transform"); + ({valueSpan} = getRuleViewProperty(rView, "html", "transform")); rView.highlighters._onMouseMove({target: valueSpan}); is(HighlighterFront.nodeFront.tagName, "HTML", "The right NodeFront is passed to the highlighter (1)"); yield selectNode("body", inspector); - let {valueSpan} = getRuleViewProperty(rView, "body", "transform"); + ({valueSpan} = getRuleViewProperty(rView, "body", "transform")); rView.highlighters._onMouseMove({target: valueSpan}); is(HighlighterFront.nodeFront.tagName, "BODY", "The right NodeFront is passed to the highlighter (2)"); info("Checking that the highlighter gets hidden when hovering a non-transform property"); - let {valueSpan} = getRuleViewProperty(rView, "body", "color"); + ({valueSpan} = getRuleViewProperty(rView, "body", "color")); rView.highlighters._onMouseMove({target: valueSpan}); ok(!HighlighterFront.isShown, "The highlighter is hidden"); }); diff --git a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-04.js b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-04.js index 7b39122e349..9d5dbfed69a 100644 --- a/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-04.js +++ b/browser/devtools/styleinspector/test/browser_styleinspector_transform-highlighter-04.js @@ -48,13 +48,13 @@ let test = asyncTest(function*() { yield classRuleEditor.rule._applyingModifications; info("Faking a mousemove on the disabled property"); - let {valueSpan} = getRuleViewProperty(rView, ".test", "transform"); + ({valueSpan} = getRuleViewProperty(rView, ".test", "transform")); hs._onMouseMove({target: valueSpan}); ok(!hs.highlighters[TYPE], "No highlighter was created for the disabled property"); ok(!hs.promises[TYPE], "And no highlighter is being initialized either"); info("Faking a mousemove on the now unoverriden property"); - let {valueSpan} = getRuleViewProperty(rView, "div", "transform"); + ({valueSpan} = getRuleViewProperty(rView, "div", "transform")); hs._onMouseMove({target: valueSpan}); ok(hs.promises[TYPE], "The highlighter is being initialized now"); let h = yield hs.promises[TYPE]; diff --git a/browser/devtools/webaudioeditor/test/browser_audionode-actor-get-set-param.js b/browser/devtools/webaudioeditor/test/browser_audionode-actor-get-set-param.js index 3122b8a433b..da17619edb6 100644 --- a/browser/devtools/webaudioeditor/test/browser_audionode-actor-get-set-param.js +++ b/browser/devtools/webaudioeditor/test/browser_audionode-actor-get-set-param.js @@ -19,17 +19,17 @@ function spawnTest () { let type = yield oscNode.getParam("type"); ise(type, "sine", "AudioNode:getParam correctly fetches non-AudioParam"); - let type = yield oscNode.getParam("not-a-valid-param"); + type = yield oscNode.getParam("not-a-valid-param"); ok(type.type === "undefined", "AudioNode:getParam correctly returns a grip value for `undefined` for an invalid param."); let resSuccess = yield oscNode.setParam("frequency", 220); - let freq = yield oscNode.getParam("frequency"); + freq = yield oscNode.getParam("frequency"); ise(freq, 220, "AudioNode:setParam correctly sets a `number` AudioParam"); is(resSuccess, undefined, "AudioNode:setParam returns undefined for correctly set AudioParam"); resSuccess = yield oscNode.setParam("type", "square"); - let type = yield oscNode.getParam("type"); + type = yield oscNode.getParam("type"); ise(type, "square", "AudioNode:setParam correctly sets a `string` non-AudioParam"); is(resSuccess, undefined, "AudioNode:setParam returns undefined for correctly set AudioParam"); diff --git a/browser/devtools/webaudioeditor/test/browser_wa_reset-01.js b/browser/devtools/webaudioeditor/test/browser_wa_reset-01.js index b5769daeaac..e7151dfe7ad 100644 --- a/browser/devtools/webaudioeditor/test/browser_wa_reset-01.js +++ b/browser/devtools/webaudioeditor/test/browser_wa_reset-01.js @@ -40,8 +40,8 @@ function spawnTest() { is($("#content").hidden, false, "The tool's content should not be hidden anymore."); - let navigating = once(target, "will-navigate"); - let started = once(gFront, "start-context"); + navigating = once(target, "will-navigate"); + started = once(gFront, "start-context"); reload(target); diff --git a/browser/devtools/webaudioeditor/test/browser_wa_reset-02.js b/browser/devtools/webaudioeditor/test/browser_wa_reset-02.js index 29fe7bbd0ab..79242c2a16e 100644 --- a/browser/devtools/webaudioeditor/test/browser_wa_reset-02.js +++ b/browser/devtools/webaudioeditor/test/browser_wa_reset-02.js @@ -24,12 +24,12 @@ function spawnTest() { reload(target); - let [actors] = yield Promise.all([ + [actors] = yield Promise.all([ get3(gFront, "create-node"), waitForGraphRendered(panelWin, 3, 2) ]); - let { nodes, edges } = countGraphObjects(panelWin); + ({ nodes, edges } = countGraphObjects(panelWin)); ise(nodes, 3, "after reload, should only be 3 nodes."); ise(edges, 2, "after reload, should only be 2 edges."); diff --git a/browser/devtools/webaudioeditor/test/browser_wa_reset-03.js b/browser/devtools/webaudioeditor/test/browser_wa_reset-03.js index 04c1092dfb1..96dd9c95a4c 100644 --- a/browser/devtools/webaudioeditor/test/browser_wa_reset-03.js +++ b/browser/devtools/webaudioeditor/test/browser_wa_reset-03.js @@ -29,11 +29,11 @@ function spawnTest() { reload(target); - let [actors] = yield Promise.all([ + [actors] = yield Promise.all([ get3(gFront, "create-node"), waitForGraphRendered(panelWin, 3, 2) ]); - let nodeIds = actors.map(actor => actor.actorID); + nodeIds = actors.map(actor => actor.actorID); ok(!WebAudioInspectorView.isVisible(), "InspectorView hidden on start."); ise(WebAudioInspectorView.getCurrentAudioNode(), null, diff --git a/browser/devtools/webaudioeditor/test/browser_wa_reset-04.js b/browser/devtools/webaudioeditor/test/browser_wa_reset-04.js index 6722980524a..00a1eb92b4d 100644 --- a/browser/devtools/webaudioeditor/test/browser_wa_reset-04.js +++ b/browser/devtools/webaudioeditor/test/browser_wa_reset-04.js @@ -37,7 +37,7 @@ function spawnTest() { is($("#content").hidden, true, "The tool's content should still be hidden."); - let navigating = once(target, "will-navigate"); + navigating = once(target, "will-navigate"); let started = once(gFront, "start-context"); reload(target); diff --git a/browser/devtools/webaudioeditor/test/browser_webaudio-actor-connect-param.js b/browser/devtools/webaudioeditor/test/browser_webaudio-actor-connect-param.js index af407822553..7239a8a6e9c 100644 --- a/browser/devtools/webaudioeditor/test/browser_webaudio-actor-connect-param.js +++ b/browser/devtools/webaudioeditor/test/browser_webaudio-actor-connect-param.js @@ -7,7 +7,7 @@ function spawnTest () { let [target, debuggee, front] = yield initBackend(CONNECT_PARAM_URL); - let [_, _, [destNode, carrierNode, modNode, gainNode], _, connectParam] = yield Promise.all([ + let [, , [destNode, carrierNode, modNode, gainNode], , connectParam] = yield Promise.all([ front.setup({ reload: true }), once(front, "start-context"), getN(front, "create-node", 4), diff --git a/browser/devtools/webaudioeditor/test/browser_webaudio-actor-destroy-node.js b/browser/devtools/webaudioeditor/test/browser_webaudio-actor-destroy-node.js index 88dc96be0ac..d6e15952ad3 100644 --- a/browser/devtools/webaudioeditor/test/browser_webaudio-actor-destroy-node.js +++ b/browser/devtools/webaudioeditor/test/browser_webaudio-actor-destroy-node.js @@ -9,7 +9,7 @@ function spawnTest () { let [target, debuggee, front] = yield initBackend(DESTROY_NODES_URL); let waitUntilDestroyed = getN(front, "destroy-node", 10); - let [_, _, created] = yield Promise.all([ + let [, , created] = yield Promise.all([ front.setup({ reload: true }), once(front, "start-context"), // Should create 1 destination node and 10 disposable buffer nodes diff --git a/browser/devtools/webaudioeditor/test/browser_webaudio-actor-simple.js b/browser/devtools/webaudioeditor/test/browser_webaudio-actor-simple.js index 86dead3bc10..3dd444e571c 100644 --- a/browser/devtools/webaudioeditor/test/browser_webaudio-actor-simple.js +++ b/browser/devtools/webaudioeditor/test/browser_webaudio-actor-simple.js @@ -26,7 +26,7 @@ function spawnTest () { is(source.actorID, oscNode.actorID, "WebAudioActor:connect-node returns correct actor with ID on source (osc->gain)"); is(dest.actorID, gainNode.actorID, "WebAudioActor:connect-node returns correct actor with ID on dest (osc->gain)"); - let { source, dest } = connect2; + ({ source, dest } = connect2); is(source.actorID, gainNode.actorID, "WebAudioActor:connect-node returns correct actor with ID on source (gain->dest)"); is(dest.actorID, destNode.actorID, "WebAudioActor:connect-node returns correct actor with ID on dest (gain->dest)"); diff --git a/browser/devtools/webconsole/test/browser_webconsole_bug_586388_select_all.js b/browser/devtools/webconsole/test/browser_webconsole_bug_586388_select_all.js index 649d468f033..ec30d62bc6a 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_bug_586388_select_all.js +++ b/browser/devtools/webconsole/test/browser_webconsole_bug_586388_select_all.js @@ -80,7 +80,7 @@ function test() { selectAllItem.doCommand(); - let selectedCount = hud.ui.output.getSelectedMessages().length; + selectedCount = hud.ui.output.getSelectedMessages().length; is(selectedCount, outputNode.childNodes.length, "all console messages are selected after performing a select-all " + "operation from the context menu"); diff --git a/browser/devtools/webconsole/test/browser_webconsole_network_panel.js b/browser/devtools/webconsole/test/browser_webconsole_network_panel.js index 65ea953f720..82f9d1ef976 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_network_panel.js +++ b/browser/devtools/webconsole/test/browser_webconsole_network_panel.js @@ -360,7 +360,7 @@ function testGen() { responseImageCached: true }); - let imgNode = networkPanel.document.getElementById("responseImageCachedNode"); + imgNode = networkPanel.document.getElementById("responseImageCachedNode"); is(imgNode.getAttribute("src"), "data:image/png;base64," + TEST_IMG_BASE64, "Displayed image is correct"); diff --git a/browser/devtools/webconsole/test/browser_webconsole_split.js b/browser/devtools/webconsole/test/browser_webconsole_split.js index e7d5fa8c5a2..30ae9ce7085 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_split.js +++ b/browser/devtools/webconsole/test/browser_webconsole_split.js @@ -117,7 +117,7 @@ function test() // Make sure splitting console does nothing while webconsole is opened toolbox.toggleSplitConsole(); - let currentUIState = getCurrentUIState(); + currentUIState = getCurrentUIState(); ok (!currentUIState.splitterVisibility, "Splitter is hidden when console is opened."); is (currentUIState.deckHeight, 0, "Deck has a height == 0 when console is opened."); @@ -176,7 +176,7 @@ function test() toolbox.toggleSplitConsole(); - let currentUIState = getCurrentUIState(); + currentUIState = getCurrentUIState(); ok (currentUIState.splitterVisibility, "Splitter is visible when console is split"); ok (currentUIState.deckHeight > 0, "Deck has a height > 0 when console is split"); @@ -189,7 +189,7 @@ function test() toolbox.toggleSplitConsole(); - let currentUIState = getCurrentUIState(); + currentUIState = getCurrentUIState(); ok (!currentUIState.splitterVisibility, "Splitter is hidden after toggling"); is (currentUIState.deckHeight, currentUIState.containerHeight, "Deck has a height > 0 after toggling"); diff --git a/browser/devtools/webconsole/test/browser_webconsole_split_focus.js b/browser/devtools/webconsole/test/browser_webconsole_split_focus.js index 3246311074c..51d7b9a79a9 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_split_focus.js +++ b/browser/devtools/webconsole/test/browser_webconsole_split_focus.js @@ -33,7 +33,7 @@ function test() { ok(toolbox.splitConsole, "Split console is now visible"); // Use the binding element since jsterm.inputNode is a XUL textarea element. - let activeElement = getActiveElement(toolbox.doc); + activeElement = getActiveElement(toolbox.doc); activeElement = activeElement.ownerDocument.getBindingParent(activeElement); let inputNode = toolbox.getPanel("webconsole").hud.jsterm.inputNode; is(activeElement, inputNode, "Split console input is focused by default"); @@ -42,7 +42,7 @@ function test() { info ("Making sure that the search box is refocused after closing the split console"); // Use the binding element since inspector.searchBox is a XUL element. - let activeElement = getActiveElement(inspector.panelDoc); + activeElement = getActiveElement(inspector.panelDoc); activeElement = activeElement.ownerDocument.getBindingParent(activeElement); is (activeElement, inspector.searchBox, "Search box is focused"); diff --git a/browser/devtools/webconsole/test/browser_webconsole_split_persist.js b/browser/devtools/webconsole/test/browser_webconsole_split_persist.js index d08ee0e4968..d9116f2b1ce 100644 --- a/browser/devtools/webconsole/test/browser_webconsole_split_persist.js +++ b/browser/devtools/webconsole/test/browser_webconsole_split_persist.js @@ -30,8 +30,8 @@ function test() { yield toolbox.destroy(); info("Opening a tab while there is a true user setting on split console pref"); - let {tab} = yield loadTab(TEST_URI); - let target = TargetFactory.forTab(tab); + ({tab} = yield loadTab(TEST_URI)); + target = TargetFactory.forTab(tab); toolbox = yield gDevTools.showToolbox(target, "inspector"); ok(toolbox.splitConsole, "Split console is visible by default."); @@ -63,8 +63,8 @@ function test() { info("Opening a tab while there is a false user setting on split console pref"); - let {tab} = yield loadTab(TEST_URI); - let target = TargetFactory.forTab(tab); + ({tab} = yield loadTab(TEST_URI)); + target = TargetFactory.forTab(tab); toolbox = yield gDevTools.showToolbox(target, "inspector"); ok(!toolbox.splitConsole, "Split console is hidden by default."); diff --git a/browser/devtools/webconsole/test/head.js b/browser/devtools/webconsole/test/head.js index 0a38806fb77..fee01e8797d 100644 --- a/browser/devtools/webconsole/test/head.js +++ b/browser/devtools/webconsole/test/head.js @@ -348,19 +348,19 @@ function finishTest() return; } - let hud = HUDService.getHudByWindow(content); - if (!hud) { + let contentHud = HUDService.getHudByWindow(content); + if (!contentHud) { finish(); return; } - if (hud.jsterm) { - hud.jsterm.clearOutput(true); + if (contentHud.jsterm) { + contentHud.jsterm.clearOutput(true); } - closeConsole(hud.target.tab, finish); + closeConsole(contentHud.target.tab, finish); - hud = null; + contentHud = null; } function tearDown() diff --git a/browser/devtools/webide/test/test_newapp.html b/browser/devtools/webide/test/test_newapp.html index c727507ae01..29c6db8b652 100644 --- a/browser/devtools/webide/test/test_newapp.html +++ b/browser/devtools/webide/test/test_newapp.html @@ -28,7 +28,7 @@ }); let project = win.AppManager.selectedProject; - let tmpDir = FileUtils.getDir("TmpD", ["webidetmpapp"]); + tmpDir = FileUtils.getDir("TmpD", ["webidetmpapp"]); ok(tmpDir.isDirectory(), "Directory created"); is(project.location, tmpDir.path, "Location is valid (and lowercase)"); is(project.name, "webideTmpApp", "name field has been updated"); diff --git a/browser/experiments/test/xpcshell/test_activate.js b/browser/experiments/test/xpcshell/test_activate.js index cf702d67e79..931901a8a72 100644 --- a/browser/experiments/test/xpcshell/test_activate.js +++ b/browser/experiments/test/xpcshell/test_activate.js @@ -126,7 +126,7 @@ add_task(function* test_startStop() { Assert.equal(addons[0].userDisabled, false, "The add-on is not userDisabled."); Assert.ok(addons[0].isActive, "The add-on is active."); - let result = yield experiment.shouldStop(); + result = yield experiment.shouldStop(); Assert.equal(result.shouldStop, false, "shouldStop should be false."); Assert.equal(experiment.enabled, true, "Experiment should be enabled."); addons = yield getExperimentAddons(); @@ -156,7 +156,7 @@ add_task(function* test_startStop() { // Make sure "ignore hashes" mode works. gPolicy.ignoreHashes = true; - let changes = yield experiment.start(); + changes = yield experiment.start(); Assert.equal(changes, experiment.ADDON_CHANGE_INSTALL); yield experiment.stop(); gPolicy.ignoreHashes = false; diff --git a/browser/experiments/test/xpcshell/test_api.js b/browser/experiments/test/xpcshell/test_api.js index 16e66ac6974..c5da2a40c3c 100644 --- a/browser/experiments/test/xpcshell/test_api.js +++ b/browser/experiments/test/xpcshell/test_api.js @@ -1632,7 +1632,7 @@ add_task(function* test_foreignUninstallAndRestart() { yield AddonTestUtils.uninstallAddonByID(EXPERIMENT1_ID); yield experiments._mainTask; - let addons = yield getExperimentAddons(); + addons = yield getExperimentAddons(); Assert.equal(addons.length, 0, "Experiment add-on should have been removed."); experimentList = yield experiments.getExperiments(); @@ -1645,7 +1645,7 @@ add_task(function* test_foreignUninstallAndRestart() { experiments = new Experiments.Experiments(gPolicy); yield experiments.updateManifest(); - let addons = yield getExperimentAddons(); + addons = yield getExperimentAddons(); Assert.equal(addons.length, 0, "No experiment add-ons installed."); experimentList = yield experiments.getExperiments(); diff --git a/browser/modules/test/browser_ContentSearch.js b/browser/modules/test/browser_ContentSearch.js index c4629860dee..eea890af130 100644 --- a/browser/modules/test/browser_ContentSearch.js +++ b/browser/modules/test/browser_ContentSearch.js @@ -59,7 +59,7 @@ add_task(function* SetCurrentEngine() { }); Services.search.currentEngine = oldCurrentEngine; - let msg = yield waitForTestMsg("CurrentEngine"); + msg = yield waitForTestMsg("CurrentEngine"); checkMsg(msg, { type: "CurrentEngine", data: yield currentEngineObj(oldCurrentEngine), diff --git a/browser/modules/test/browser_UITour2.js b/browser/modules/test/browser_UITour2.js index 3bc9eed7e76..40efaaaae1f 100644 --- a/browser/modules/test/browser_UITour2.js +++ b/browser/modules/test/browser_UITour2.js @@ -78,7 +78,7 @@ let tests = [ gContentAPI.removePinnedTab(); isnot(gBrowser.tabs[0], tab, "First tab should not be the pinned tab"); - let tabInfo = UITour.pinnedTabs.get(window); + tabInfo = UITour.pinnedTabs.get(window); is(tabInfo, null, "Should not have any data about the removed pinned tab after removePinnedTab()"); gContentAPI.addPinnedTab(); diff --git a/caps/tests/mochitest/test_disableScript.xul b/caps/tests/mochitest/test_disableScript.xul index 4e77091ae9a..fe9dc11047f 100644 --- a/caps/tests/mochitest/test_disableScript.xul +++ b/caps/tests/mochitest/test_disableScript.xul @@ -98,7 +98,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840488 } function testList(expectEnabled, win, list, idx) { - let idx = idx || 0; + idx = idx || 0; let deferred = Promise.defer(); let target = list[idx] + path; info("Testing scriptability for: " + target + ". expecting " + expectEnabled); diff --git a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm.js b/dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm.js index 57059c09086..213122c1dac 100644 --- a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm.js +++ b/dom/cellbroadcast/tests/marionette/test_cellbroadcast_gsm.js @@ -114,7 +114,7 @@ function testReceiving_GSM_Language_and_Body() { let promise = Promise.resolve(); let testDcs = []; - dcs = 0; + let dcs = 0; while (dcs <= 0xFF) { try { let dcsInfo = { dcs: dcs }; @@ -123,7 +123,7 @@ function testReceiving_GSM_Language_and_Body() { testDcs.push(dcsInfo); } catch (e) { // Unsupported coding group, skip. - let dcs = (dcs & PDU_DCS_CODING_GROUP_BITS) + 0x10; + dcs = (dcs & PDU_DCS_CODING_GROUP_BITS) + 0x10; } dcs++; } diff --git a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts.js b/dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts.js index 2df6b3d1a75..c0daf399ca9 100644 --- a/dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts.js +++ b/dom/cellbroadcast/tests/marionette/test_cellbroadcast_umts.js @@ -130,7 +130,7 @@ function testReceiving_UMTS_Language_and_Body() { let promise = Promise.resolve(); let testDcs = []; - dcs = 0; + let dcs = 0; while (dcs <= 0xFF) { try { let dcsInfo = { dcs: dcs }; @@ -139,7 +139,7 @@ function testReceiving_UMTS_Language_and_Body() { testDcs.push(dcsInfo); } catch (e) { // Unsupported coding group, skip. - let dcs = (dcs & PDU_DCS_CODING_GROUP_BITS) + 0x10; + dcs = (dcs & PDU_DCS_CODING_GROUP_BITS) + 0x10; } dcs++; } diff --git a/dom/indexedDB/test/error_events_abort_transactions_iframe.html b/dom/indexedDB/test/error_events_abort_transactions_iframe.html index 858cf241c5a..7be3de42fd7 100644 --- a/dom/indexedDB/test/error_events_abort_transactions_iframe.html +++ b/dom/indexedDB/test/error_events_abort_transactions_iframe.html @@ -96,12 +96,12 @@ is(event.target.error.name, "ConstraintError", "Right error"); is(originalRequest.transaction, null, "request.transaction should now be null"); - let request = indexedDB.open(window.location.pathname, 1); + request = indexedDB.open(window.location.pathname, 1); request.onerror = errorHandler; request.onupgradeneeded = grabEventAndContinueHandler; - let event = yield undefined; + event = yield undefined; - let db = event.target.result; + db = event.target.result; event.target.transaction.oncomplete = grabEventAndContinueHandler; event.target.transaction.onabort = unexpectedSuccessHandler; @@ -109,7 +109,7 @@ is(db.version, "1", "Correct version"); is(db.objectStoreNames.length, 0, "Correct objectStoreNames length"); - let objectStore = db.createObjectStore("foo"); + objectStore = db.createObjectStore("foo"); is(db.objectStoreNames.length, 1, "Correct objectStoreNames length"); ok(db.objectStoreNames.contains("foo"), "Has correct objectStore"); @@ -153,14 +153,14 @@ db.close(); - let request = indexedDB.open(window.location.pathname, 2); + request = indexedDB.open(window.location.pathname, 2); request.onerror = errorHandler; request.onupgradeneeded = grabEventAndContinueHandler; - let event = yield undefined; + event = yield undefined; - let db = event.target.result; + db = event.target.result; - let trans = event.target.transaction; + trans = event.target.transaction; trans.oncomplete = unexpectedSuccessHandler; is(db.version, "2", "Correct version"); @@ -169,7 +169,7 @@ ok(db.objectStoreNames.contains("bar"), "Has correct objectStore"); let createdObjectStore = db.createObjectStore("newlyCreated"); - let objectStore = trans.objectStore("foo"); + objectStore = trans.objectStore("foo"); let deletedObjectStore = trans.objectStore("bar"); deletedObjectStore.deleteIndex("foo"); db.deleteObjectStore("bar"); diff --git a/dom/indexedDB/test/exceptions_in_events_iframe.html b/dom/indexedDB/test/exceptions_in_events_iframe.html index 9f8a6be2f9c..24929648ebb 100644 --- a/dom/indexedDB/test/exceptions_in_events_iframe.html +++ b/dom/indexedDB/test/exceptions_in_events_iframe.html @@ -76,13 +76,13 @@ // Test 2: Throwing during a request's success handler should abort the // transaction. - let request = indexedDB.open(window.location.pathname, 1); + request = indexedDB.open(window.location.pathname, 1); request.onerror = errorHandler; request.onblocked = errorHandler; request.onupgradeneeded = grabEventAndContinueHandler; request.onsuccess = unexpectedSuccessHandler; let openrequest = request; - let event = yield undefined; + event = yield undefined; request.onupgradeneeded = unexpectedSuccessHandler; @@ -121,17 +121,17 @@ // Test 3: Throwing during a request's error handler should abort the // transaction, even if preventDefault is called on the error event. - let request = indexedDB.open(window.location.pathname, 1); + request = indexedDB.open(window.location.pathname, 1); request.onerror = errorHandler; request.onblocked = errorHandler; request.onupgradeneeded = grabEventAndContinueHandler; request.onsuccess = unexpectedSuccessHandler; - let openrequest = request; - let event = yield undefined; + openrequest = request; + event = yield undefined; request.onupgradeneeded = unexpectedSuccessHandler; - let db = event.target.result; + db = event.target.result; db.onerror = function(event) { event.preventDefault(); }; @@ -142,7 +142,7 @@ is(db.version, 1, "Correct version"); is(db.objectStoreNames.length, 0, "Correct objectStoreNames length"); - let objectStore = db.createObjectStore("foo"); + objectStore = db.createObjectStore("foo"); is(db.objectStoreNames.length, 1, "Correct objectStoreNames length"); ok(db.objectStoreNames.contains("foo"), "Has correct objectStore"); diff --git a/dom/indexedDB/test/test_blob_simple.html b/dom/indexedDB/test/test_blob_simple.html index 9714788ec41..e7e4407197a 100644 --- a/dom/indexedDB/test/test_blob_simple.html +++ b/dom/indexedDB/test/test_blob_simple.html @@ -132,7 +132,7 @@ info("Retrieve blobs from database via index and verify contents."); - let index = db.transaction("foo").objectStore("foo").index("foo"); + index = db.transaction("foo").objectStore("foo").index("foo"); index.get(INDEX_KEY).onsuccess = grabEventAndContinueHandler; event = yield undefined; @@ -248,16 +248,16 @@ info("Stored blob back into database"); - let fileReader = new FileReader(); + fileReader = new FileReader(); fileReader.onload = grabEventAndContinueHandler; fileReader.readAsText(blobFromDB); event = yield undefined; is(event.target.result, BLOB_DATA.join(""), "Correct text"); - let blobURL = URL.createObjectURL(blobFromDB); + blobURL = URL.createObjectURL(blobFromDB); - let xhr = new XMLHttpRequest(); + xhr = new XMLHttpRequest(); xhr.open("GET", blobURL); xhr.onload = grabEventAndContinueHandler; xhr.send(); diff --git a/dom/indexedDB/test/test_file_transaction_abort.html b/dom/indexedDB/test/test_file_transaction_abort.html index 2f1911751b0..8c08c65177d 100644 --- a/dom/indexedDB/test/test_file_transaction_abort.html +++ b/dom/indexedDB/test/test_file_transaction_abort.html @@ -32,14 +32,14 @@ let db = event.target.result; db.onerror = errorHandler; - objectStore = db.createObjectStore(objectStoreName, { }); + let objectStore = db.createObjectStore(objectStoreName, { }); event = yield undefined; is(event.type, "success", "Got correct event type"); let trans = db.transaction([objectStoreName], READ_WRITE); - let objectStore = trans.objectStore(objectStoreName); + objectStore = trans.objectStore(objectStoreName); request = objectStore.add(fileData.file, fileData.key); request.onsuccess = grabEventAndContinueHandler; diff --git a/dom/indexedDB/test/test_filehandle_store_snapshot.html b/dom/indexedDB/test/test_filehandle_store_snapshot.html index 12d48de91f8..82d14256f26 100644 --- a/dom/indexedDB/test/test_filehandle_store_snapshot.html +++ b/dom/indexedDB/test/test_filehandle_store_snapshot.html @@ -59,7 +59,7 @@ let file = event.target.result; let trans = db.transaction([objectStoreName], READ_WRITE); - let objectStore = trans.objectStore(objectStoreName); + objectStore = trans.objectStore(objectStoreName); request = objectStore.add(file, 42); request.onsuccess = grabEventAndContinueHandler; diff --git a/dom/indexedDB/test/test_persistenceType.html b/dom/indexedDB/test/test_persistenceType.html index 6b164c00217..773a84d6569 100644 --- a/dom/indexedDB/test/test_persistenceType.html +++ b/dom/indexedDB/test/test_persistenceType.html @@ -80,7 +80,7 @@ request.onerror = errorHandler; request.onupgradeneeded = grabEventAndContinueHandler; request.onsuccess = grabEventAndContinueHandler; - let event = yield undefined; + event = yield undefined; is(event.type, "upgradeneeded", "Got correct event type"); diff --git a/dom/indexedDB/test/unit/test_autoIncrement_indexes.js b/dom/indexedDB/test/unit/test_autoIncrement_indexes.js index 32fc4f693a3..ce2d5d55279 100644 --- a/dom/indexedDB/test/unit/test_autoIncrement_indexes.js +++ b/dom/indexedDB/test/unit/test_autoIncrement_indexes.js @@ -31,7 +31,7 @@ function testSteps() event = yield undefined; - let objectStore = db.transaction("foo").objectStore("foo"); + objectStore = db.transaction("foo").objectStore("foo"); let first = objectStore.index("first"); let second = objectStore.index("second"); let third = objectStore.index("third"); diff --git a/dom/indexedDB/test/unit/test_complex_keyPaths.js b/dom/indexedDB/test/unit/test_complex_keyPaths.js index 95e5ad44a20..24375813d55 100644 --- a/dom/indexedDB/test/unit/test_complex_keyPaths.js +++ b/dom/indexedDB/test/unit/test_complex_keyPaths.js @@ -164,8 +164,8 @@ function testSteps() let store = db.createObjectStore("indexStore"); let indexes = {}; for (let i = 0; i < keyPaths.length; i++) { - let test = " for index test " + JSON.stringify(info); let info = keyPaths[i]; + let test = " for index test " + JSON.stringify(info); let indexName = JSON.stringify(info.keyPath); if (!indexes[indexName]) { try { diff --git a/dom/indexedDB/test/unit/test_create_index_with_integer_keys.js b/dom/indexedDB/test/unit/test_create_index_with_integer_keys.js index 3232e4608ab..d14b5041192 100644 --- a/dom/indexedDB/test/unit/test_create_index_with_integer_keys.js +++ b/dom/indexedDB/test/unit/test_create_index_with_integer_keys.js @@ -26,10 +26,10 @@ function testSteps() yield undefined; db.close(); - let request = indexedDB.open(this.window ? window.location.pathname : "Splendid Test", 2); + request = indexedDB.open(this.window ? window.location.pathname : "Splendid Test", 2); request.onerror = errorHandler; request.onupgradeneeded = grabEventAndContinueHandler; - let event = yield undefined; + event = yield undefined; let db2 = event.target.result; db2.onerror = errorHandler; diff --git a/dom/indexedDB/test/unit/test_create_objectStore.js b/dom/indexedDB/test/unit/test_create_objectStore.js index 81b753257f7..215723c2692 100644 --- a/dom/indexedDB/test/unit/test_create_objectStore.js +++ b/dom/indexedDB/test/unit/test_create_objectStore.js @@ -113,7 +113,6 @@ function testSteps() is(ex.code, DOMException.INVALID_ACCESS_ERR, "should throw right exception"); // Can't handle autoincrement and array keypath - let ex; try { db.createObjectStore("storefail", { keyPath: ["a"], autoIncrement: true }); } diff --git a/dom/indexedDB/test/unit/test_deleteDatabase.js b/dom/indexedDB/test/unit/test_deleteDatabase.js index 270b50a4bdf..7c9f7652258 100644 --- a/dom/indexedDB/test/unit/test_deleteDatabase.js +++ b/dom/indexedDB/test/unit/test_deleteDatabase.js @@ -35,7 +35,7 @@ function testSteps() ok(event.target.result instanceof IDBDatabase, "Result should be a database"); is(db.objectStoreNames.length, 1, "Expect an objectStore here"); - let request = indexedDB.open(name, 10); + request = indexedDB.open(name, 10); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; @@ -66,7 +66,7 @@ function testSteps() db.onversionchange = closeDBs; db2.onversionchange = closeDBs; - let request = indexedDB.deleteDatabase(name); + request = indexedDB.deleteDatabase(name); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; @@ -78,7 +78,7 @@ function testSteps() is(event.target, request, "event has right target"); ok(event.target.result === undefined, "event should have no result"); - let request = indexedDB.open(name, 1); + request = indexedDB.open(name, 1); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; @@ -87,14 +87,14 @@ function testSteps() is(event.target.result.objectStoreNames.length, 0, "DB should have no object stores"); - let request = indexedDB.deleteDatabase("thisDatabaseHadBetterNotExist"); + request = indexedDB.deleteDatabase("thisDatabaseHadBetterNotExist"); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; event = yield undefined; ok(true, "deleteDatabase on a non-existent database succeeded"); - let request = indexedDB.open("thisDatabaseHadBetterNotExist"); + request = indexedDB.open("thisDatabaseHadBetterNotExist"); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; diff --git a/dom/indexedDB/test/unit/test_deleteDatabase_interactions.js b/dom/indexedDB/test/unit/test_deleteDatabase_interactions.js index d15a1efc823..90058e11a8a 100644 --- a/dom/indexedDB/test/unit/test_deleteDatabase_interactions.js +++ b/dom/indexedDB/test/unit/test_deleteDatabase_interactions.js @@ -35,7 +35,7 @@ function testSteps() db.close(); - let request = indexedDB.deleteDatabase(name); + request = indexedDB.deleteDatabase(name); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; diff --git a/dom/indexedDB/test/unit/test_index_empty_keyPath.js b/dom/indexedDB/test/unit/test_index_empty_keyPath.js index a2f9e5a91d2..9fbcfc9c970 100644 --- a/dom/indexedDB/test/unit/test_index_empty_keyPath.js +++ b/dom/indexedDB/test/unit/test_index_empty_keyPath.js @@ -47,29 +47,29 @@ function testSteps() objectStore = trans.objectStore("data"); index = objectStore.index("set"); - let request = index.get("bar"); + request = index.get("bar"); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; - let event = yield undefined; + event = yield undefined; is(event.target.result, "bar", "Got correct result"); - let request = objectStore.add("foopy", 4); + request = objectStore.add("foopy", 4); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; yield undefined; - let request = index.get("foopy"); + request = index.get("foopy"); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; - let event = yield undefined; + event = yield undefined; is(event.target.result, "foopy", "Got correct result"); - let request = objectStore.add("foopy", 5); + request = objectStore.add("foopy", 5); request.addEventListener("error", new ExpectError("ConstraintError", true)); request.onsuccess = unexpectedSuccessHandler; diff --git a/dom/indexedDB/test/unit/test_indexes.js b/dom/indexedDB/test/unit/test_indexes.js index 3b9f73fc588..aaf536febe4 100644 --- a/dom/indexedDB/test/unit/test_indexes.js +++ b/dom/indexedDB/test/unit/test_indexes.js @@ -252,7 +252,7 @@ function testSteps() ok(true, "Test group 5"); keyIndex = 2; - let keyRange = IDBKeyRange.bound("Bob", "Ron", true); + keyRange = IDBKeyRange.bound("Bob", "Ron", true); request = objectStore.index("name").openKeyCursor(keyRange); request.onerror = errorHandler; @@ -278,7 +278,7 @@ function testSteps() ok(true, "Test group 6"); keyIndex = 1; - let keyRange = IDBKeyRange.bound("Bob", "Ron", false, true); + keyRange = IDBKeyRange.bound("Bob", "Ron", false, true); request = objectStore.index("name").openKeyCursor(keyRange); request.onerror = errorHandler; diff --git a/dom/indexedDB/test/unit/test_multientry.js b/dom/indexedDB/test/unit/test_multientry.js index cc57a5566eb..dc95acf942c 100644 --- a/dom/indexedDB/test/unit/test_multientry.js +++ b/dom/indexedDB/test/unit/test_multientry.js @@ -143,7 +143,6 @@ function testSteps() index = store.createIndex("myindex", "x", { multiEntry: true, unique: true }); is(index.multiEntry, true, "index created with multiEntry"); - let i; let indexes; for (i = 0; i < tests.length; ++i) { let test = tests[i]; diff --git a/dom/indexedDB/test/unit/test_names_sorted.js b/dom/indexedDB/test/unit/test_names_sorted.js index 643fec2a8d6..eac03a84a64 100644 --- a/dom/indexedDB/test/unit/test_names_sorted.js +++ b/dom/indexedDB/test/unit/test_names_sorted.js @@ -74,15 +74,15 @@ function testSteps() db.close(); - let request = indexedDB.open(name, 1); + request = indexedDB.open(name, 1); request.onerror = errorHandler; request.onsuccess = grabEventAndContinueHandler; request.onupgradeneeded = unexpectedSuccessHandler; - let event = yield undefined; + event = yield undefined; - let db = event.target.result; + db = event.target.result; - let objectStoreNames = [] + objectStoreNames = [] for (let i = 0; i < objectStoreInfo.length; i++) { let info = objectStoreInfo[i]; objectStoreNames.push(info.name); @@ -99,7 +99,7 @@ function testSteps() } } - let trans = db.transaction(objectStoreNames); + trans = db.transaction(objectStoreNames); for (let i = 0; i < objectStoreInfo.length; i++) { let info = objectStoreInfo[i]; diff --git a/dom/indexedDB/test/unit/test_objectStore_openKeyCursor.js b/dom/indexedDB/test/unit/test_objectStore_openKeyCursor.js index 6c46cac4e51..747820458b8 100644 --- a/dom/indexedDB/test/unit/test_objectStore_openKeyCursor.js +++ b/dom/indexedDB/test/unit/test_objectStore_openKeyCursor.js @@ -327,7 +327,7 @@ function testSteps() { is(seenKeys.length, allKeys.length - 9, "Saw the right number of keys"); - let match = true; + match = true; for (let i = 0, j = 0; i < seenKeys.length; i++) { if (seenKeys[i] !== allKeys[i + j]) { match = false; @@ -383,7 +383,7 @@ function testSteps() { is(seenKeys.length, allKeys.length - 9, "Saw the right number of keys"); - let match = true; + match = true; for (let i = 0, j = 0; i < seenKeys.length; i++) { if (seenKeys[i] !== allKeys[i + j]) { match = false; diff --git a/dom/indexedDB/test/unit/test_open_for_principal.js b/dom/indexedDB/test/unit/test_open_for_principal.js index 19103e32268..0c885194001 100644 --- a/dom/indexedDB/test/unit/test_open_for_principal.js +++ b/dom/indexedDB/test/unit/test_open_for_principal.js @@ -56,7 +56,7 @@ function testSteps() request.onerror = errorHandler; request.onupgradeneeded = grabEventAndContinueHandler; request.onsuccess = grabEventAndContinueHandler; - let event = yield undefined; + event = yield undefined; is(event.type, "upgradeneeded", "Got correct event type"); diff --git a/dom/indexedDB/test/unit/test_overlapping_transactions.js b/dom/indexedDB/test/unit/test_overlapping_transactions.js index 6dc58cac45d..2606d7aea51 100644 --- a/dom/indexedDB/test/unit/test_overlapping_transactions.js +++ b/dom/indexedDB/test/unit/test_overlapping_transactions.js @@ -22,7 +22,7 @@ function testSteps() for (let i in objectStores) { db.createObjectStore(objectStores[i], { autoIncrement: true }); } - let event = yield undefined; + event = yield undefined; is(db.objectStoreNames.length, objectStores.length, "Correct objectStoreNames list"); diff --git a/dom/indexedDB/test/unit/test_persistenceType.js b/dom/indexedDB/test/unit/test_persistenceType.js index 3b8038f626c..2347beda99c 100644 --- a/dom/indexedDB/test/unit/test_persistenceType.js +++ b/dom/indexedDB/test/unit/test_persistenceType.js @@ -64,7 +64,7 @@ function testSteps() request.onerror = errorHandler; request.onupgradeneeded = grabEventAndContinueHandler; request.onsuccess = grabEventAndContinueHandler; - let event = yield undefined; + event = yield undefined; is(event.type, "success", "Got correct event type"); diff --git a/dom/indexedDB/test/unit/test_remove_objectStore.js b/dom/indexedDB/test/unit/test_remove_objectStore.js index 81366b122b3..74ae01e8936 100644 --- a/dom/indexedDB/test/unit/test_remove_objectStore.js +++ b/dom/indexedDB/test/unit/test_remove_objectStore.js @@ -39,12 +39,12 @@ function testSteps() db.close(); - let request = indexedDB.open(name, 2); + request = indexedDB.open(name, 2); request.onerror = errorHandler; request.onupgradeneeded = grabEventAndContinueHandler; - let event = yield undefined; + event = yield undefined; - let db = event.target.result; + db = event.target.result; let trans = event.target.transaction; let oldObjectStore = trans.objectStore(objectStoreName); @@ -83,12 +83,12 @@ function testSteps() db.close(); - let request = indexedDB.open(name, 3); + request = indexedDB.open(name, 3); request.onerror = errorHandler; request.onupgradeneeded = grabEventAndContinueHandler; - let event = yield undefined; + event = yield undefined; - let db = event.target.result; + db = event.target.result; objectStore = db.createObjectStore(objectStoreName, { keyPath: "foo" }); diff --git a/dom/indexedDB/test/unit/test_temporary_storage.js b/dom/indexedDB/test/unit/test_temporary_storage.js index 5ba3609e467..671c8771f3f 100644 --- a/dom/indexedDB/test/unit/test_temporary_storage.js +++ b/dom/indexedDB/test/unit/test_temporary_storage.js @@ -200,7 +200,7 @@ function testSteps() is(event.type, "success", "Got correct event type"); - let db = event.target.result; + db = event.target.result; checkUsage(3); yield undefined; diff --git a/dom/indexedDB/test/unit/test_transaction_error.js b/dom/indexedDB/test/unit/test_transaction_error.js index 8d65a406a6f..c88f4c89faa 100644 --- a/dom/indexedDB/test/unit/test_transaction_error.js +++ b/dom/indexedDB/test/unit/test_transaction_error.js @@ -43,7 +43,7 @@ function testSteps() { info("Adding duplicate entry with preventDefault()"); - let request = objectStore.add(data, dataKey); + request = objectStore.add(data, dataKey); request.onsuccess = unexpectedSuccessHandler; request.onerror = grabEventAndContinueHandler; event = yield undefined; diff --git a/dom/indexedDB/test/unit/test_transaction_ordering.js b/dom/indexedDB/test/unit/test_transaction_ordering.js index 8cee3fd9531..5e3c2fd742a 100644 --- a/dom/indexedDB/test/unit/test_transaction_ordering.js +++ b/dom/indexedDB/test/unit/test_transaction_ordering.js @@ -36,11 +36,11 @@ function testSteps() yield undefined; let trans3 = db.transaction("foo", "readonly"); - let request = trans3.objectStore("foo").get(42); + request = trans3.objectStore("foo").get(42); request.onsuccess = grabEventAndContinueHandler; request.onerror = errorHandler; - let event = yield undefined; + event = yield undefined; is(event.target.result, "2", "Transactions were ordered properly."); finishTest(); diff --git a/dom/system/gonk/tests/test_ril_worker_sms_cdma.js b/dom/system/gonk/tests/test_ril_worker_sms_cdma.js index c98bdfcdf93..459fc9d7722 100644 --- a/dom/system/gonk/tests/test_ril_worker_sms_cdma.js +++ b/dom/system/gonk/tests/test_ril_worker_sms_cdma.js @@ -154,7 +154,7 @@ function pduToParcelData(cdmaPduHelper, pdu) { writeByte(0); // Bearer Data Length - let dataLength = pdu.bearerData.length; + dataLength = pdu.bearerData.length; writeByte(dataLength); // Bearer Data diff --git a/dom/system/gonk/tests/test_ril_worker_stk.js b/dom/system/gonk/tests/test_ril_worker_stk.js index 7842402e1da..31de0b58e94 100644 --- a/dom/system/gonk/tests/test_ril_worker_stk.js +++ b/dom/system/gonk/tests/test_ril_worker_stk.js @@ -865,7 +865,7 @@ add_test(function test_stk_proactive_command_set_up_menu() { do_check_eq(tlv.value.typeOfCommand, STK_CMD_SET_UP_MENU); do_check_eq(tlv.value.commandQualifier, 0x00); - let menu = stkFactory.createParam(tlv.value, ctlvs); + menu = stkFactory.createParam(tlv.value, ctlvs); do_check_eq(menu.title, "Title"); do_check_eq(menu.items[0].identifier, 1); do_check_eq(menu.items[0].text, "item 1"); diff --git a/dom/system/tests/marionette/test_proximity_init.js b/dom/system/tests/marionette/test_proximity_init.js index 7fe55ded455..1a56e6e463f 100644 --- a/dom/system/tests/marionette/test_proximity_init.js +++ b/dom/system/tests/marionette/test_proximity_init.js @@ -24,7 +24,7 @@ function testEventInit() { // Test UserProximityEvent initialization log("Verifying UserProximityEvent constructor."); - let event = new UserProximityEvent("userproximity", {near: true}); + event = new UserProximityEvent("userproximity", {near: true}); is(event.type, "userproximity", "event type"); ok(event.near, "Initialization of UserProximityEvent"); verifyDefaultStatus(); diff --git a/dom/tests/mochitest/chrome/queryCaretRectUnix.html b/dom/tests/mochitest/chrome/queryCaretRectUnix.html index 1a2d4bd8a49..0e419fc65f1 100644 --- a/dom/tests/mochitest/chrome/queryCaretRectUnix.html +++ b/dom/tests/mochitest/chrome/queryCaretRectUnix.html @@ -140,7 +140,7 @@ offset = cp.offset; input.selectionStart = input.selectionEnd = offset; - let selection = getSelection(text); + selection = getSelection(text); testCaretPosition(domWinUtils, input.selectionStart, { min: { left: 390, top: 380 }, diff --git a/dom/tests/mochitest/chrome/queryCaretRectWin.html b/dom/tests/mochitest/chrome/queryCaretRectWin.html index edbc9337ad2..dadbbd0949a 100644 --- a/dom/tests/mochitest/chrome/queryCaretRectWin.html +++ b/dom/tests/mochitest/chrome/queryCaretRectWin.html @@ -149,7 +149,7 @@ offset = cp.offset; input.selectionStart = input.selectionEnd = offset; - let selection = getSelection(text); + selection = getSelection(text); testCaretPosition(domWinUtils, input.selectionStart, { min: { left: 390, top: 380 }, diff --git a/dom/tests/mochitest/chrome/selectAtPoint.html b/dom/tests/mochitest/chrome/selectAtPoint.html index cfe2e350f77..dcf98c2d6db 100644 --- a/dom/tests/mochitest/chrome/selectAtPoint.html +++ b/dom/tests/mochitest/chrome/selectAtPoint.html @@ -113,19 +113,19 @@ checkSelection(document, "SELECT_PARAGRAPH", "ttestselection1 Lorem ipsum dolor sit amet, at duo debet graeci, vivendum vulputate per ut. Ne labore incorrupte vix. Cu copiosae postulant tincidunt ius, in illud appetere contentiones eos. Ei munere officiis assentior pro, nibh decore ius at."); // Centered on the second character in the sentence div - let targetPoint = { xPos: rect.left + (charDims.width + (charDims.width / 2)), - yPos: rect.top + (charDims.height / 2) }; + targetPoint = { xPos: rect.left + (charDims.width + (charDims.width / 2)), + yPos: rect.top + (charDims.height / 2) }; setSingle(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_CHARACTER); checkSelection(document, "SELECT_CHARACTER", "te"); setSingle(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_CLUSTER); checkSelection(document, "SELECT_CLUSTER", "te"); // Separate character blocks in a word 't(te)s(ts)election1' - let targetPoint = { xPos: rect.left + (charDims.width + (charDims.width / 2)), - yPos: rect.top + (charDims.height / 2) }; + targetPoint = { xPos: rect.left + (charDims.width + (charDims.width / 2)), + yPos: rect.top + (charDims.height / 2) }; setStart(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_CHARACTER); - let targetPoint = { xPos: rect.left + ((charDims.width * 4) + (charDims.width / 2)), - yPos: rect.top + (charDims.height / 2) }; + targetPoint = { xPos: rect.left + ((charDims.width * 4) + (charDims.width / 2)), + yPos: rect.top + (charDims.height / 2) }; setEnd(dwu, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_CHARACTER); if (isLinux || isMac) { // XXX I think this is a bug, the right hand selection is 4.5 characters over with a @@ -141,12 +141,12 @@ // Second div in the main page - let div = document.getElementById("div2"); - let rect = div.getBoundingClientRect(); + div = document.getElementById("div2"); + rect = div.getBoundingClientRect(); // Centered on the first line, first character in the paragraph div - let targetPoint = { xPos: rect.left + (charDims.width / 2), - yPos: rect.top + (charDims.height / 2) }; + targetPoint = { xPos: rect.left + (charDims.width / 2), + yPos: rect.top + (charDims.height / 2) }; setSingle(dwu, targetPoint.xPos + 50, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_PARAGRAPH); checkSelection(document, "SELECT_PARAGRAPH", "Lorem ipsum dolor sit amet, at duo debet graeci, vivendum vulputate per ut. Ne labore incorrupte vix. Cu copiosae postulant tincidunt ius, in illud appetere contentiones eos."); @@ -162,10 +162,10 @@ frame.contentWindow.scrollTo(0, 0); - let rect = frame.getBoundingClientRect(); + rect = frame.getBoundingClientRect(); - let targetPoint = { xPos: charDims.width / 2, - yPos: charDims.height / 2 }; + targetPoint = { xPos: charDims.width / 2, + yPos: charDims.height / 2 }; setSingle(dwuFrame, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_WORDNOSPACE); checkSelection(frame.contentWindow.document, "SELECT_WORDNOSPACE", "ttestselection2"); setSingle(dwuFrame, targetPoint.xPos, targetPoint.yPos, Ci.nsIDOMWindowUtils.SELECT_WORD); diff --git a/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js b/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js index 77d30da434d..d56bc329880 100644 --- a/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js +++ b/dom/tests/mochitest/whatwg/postMessage_structured_clone_helper.js @@ -30,7 +30,7 @@ function getTestContent() recursiveobj.expando = recursiveobj; yield recursiveobj; - let obj = new Object(); + obj = new Object(); obj.expando1 = 1; obj.foo = new Object(); obj.foo.bar = 2; @@ -47,7 +47,7 @@ function getTestContent() yield obj; let diamond = new Object(); - let obj = new Object(); + obj = new Object(); obj.foo = "foo"; obj.bar = 92; obj.backref = diamond; @@ -56,7 +56,7 @@ function getTestContent() yield diamond; let doubleref = new Object(); - let obj = new Object(); + obj = new Object(); doubleref.ref1 = obj; doubleref.ref2 = obj; yield doubleref; diff --git a/dom/wappush/tests/test_si_pdu_helper.js b/dom/wappush/tests/test_si_pdu_helper.js index 9ac74343a82..7609e45474d 100644 --- a/dom/wappush/tests/test_si_pdu_helper.js +++ b/dom/wappush/tests/test_si_pdu_helper.js @@ -55,7 +55,7 @@ add_test(function test_si_parse_wbxml_empty() { ]); data.offset = 0; let result = ""; - let msg = SI.PduHelper.parse(data, contentType); + msg = SI.PduHelper.parse(data, contentType); do_check_eq(msg.content, result); run_next_test(); @@ -79,7 +79,7 @@ add_test(function test_si_parse_wbxml_empty_public_id_string_table() { ]); data.offset = 0; let result = ""; - let msg = SI.PduHelper.parse(data, contentType); + msg = SI.PduHelper.parse(data, contentType); do_check_eq(msg.content, result); run_next_test(); @@ -104,7 +104,7 @@ add_test(function test_si_parse_wbxml_with_href() { data.offset = 0; let result = "" + "Check this website"; - let msg = SI.PduHelper.parse(data, contentType); + msg = SI.PduHelper.parse(data, contentType); do_check_eq(msg.content, result); run_next_test(); @@ -131,7 +131,7 @@ add_test(function test_si_parse_wbxml_with_href_reserved_char() { data.offset = 0; let result = "" + "Check this website"; - let msg = SI.PduHelper.parse(data, contentType); + msg = SI.PduHelper.parse(data, contentType); do_check_eq(msg.content, result); run_next_test(); @@ -162,7 +162,7 @@ add_test(function test_si_parse_wbxml_with_href_date() { let result = "" + "You have 4 new emails"; - let msg = SI.PduHelper.parse(data, contentType); + msg = SI.PduHelper.parse(data, contentType); do_check_eq(msg.content, result); run_next_test(); @@ -193,7 +193,7 @@ add_test(function test_si_parse_wbxml_with_attr_string_table() { let result = "" + "You have 4 new emails"; - let msg = SI.PduHelper.parse(data, contentType); + msg = SI.PduHelper.parse(data, contentType); do_check_eq(msg.content, result); run_next_test(); diff --git a/dom/wappush/tests/test_sl_pdu_helper.js b/dom/wappush/tests/test_sl_pdu_helper.js index 9b6a0e7ebb9..482c512d789 100644 --- a/dom/wappush/tests/test_sl_pdu_helper.js +++ b/dom/wappush/tests/test_sl_pdu_helper.js @@ -51,7 +51,7 @@ add_test(function test_sl_parse_wbxml() { ]); data.offset = 0; let result = ""; - let msg = SL.PduHelper.parse(data, contentType); + msg = SL.PduHelper.parse(data, contentType); do_check_eq(msg.content, result); run_next_test(); @@ -61,7 +61,7 @@ add_test(function test_sl_parse_wbxml() { * SL compressed by WBXML, with public ID stored in string table */ add_test(function test_sl_parse_wbxml_public_id_string_table() { - let msg = {}; + let msg = {}; let contentType = ""; let data = {}; @@ -76,7 +76,7 @@ add_test(function test_sl_parse_wbxml_public_id_string_table() { ]); data.offset = 0; let result = ""; - let msg = SL.PduHelper.parse(data, contentType); + msg = SL.PduHelper.parse(data, contentType); do_check_eq(msg.content, result); run_next_test(); @@ -98,7 +98,7 @@ add_test(function test_sl_parse_wbxml_with_string_table() { ]); data.offset = 0; let result = ""; - let msg = SL.PduHelper.parse(data, contentType); + msg = SL.PduHelper.parse(data, contentType); do_check_eq(msg.content, result); run_next_test(); diff --git a/dom/workers/test/test_multi_sharedWorker_lifetimes.html b/dom/workers/test/test_multi_sharedWorker_lifetimes.html index 98ecbc038d4..a4f8755dbf6 100644 --- a/dom/workers/test/test_multi_sharedWorker_lifetimes.html +++ b/dom/workers/test/test_multi_sharedWorker_lifetimes.html @@ -70,7 +70,7 @@ // Navigate when the bfcache is disabled. info("Navigating to about:blank"); - let frame = document.getElementById("frame"); + frame = document.getElementById("frame"); frame.onload = sendToGenerator; frame.src = "about:blank"; frame.contentWindow.document.body.offsetTop; @@ -86,7 +86,7 @@ frame = frame.contentWindow; frame.postMessage({ command: "retrieve" }, "*"); - let event = yield undefined; + event = yield undefined; ok(event instanceof MessageEvent, "Got a MessageEvent"); is(event.source, frame, "Correct window got the event"); is(event.data.type, "result", "Got a result message"); @@ -108,7 +108,7 @@ yield undefined; // Navigate when the bfcache is enabled. - let frame = document.getElementById("frame"); + frame = document.getElementById("frame"); frame.onload = sendToGenerator; info("Navigating to about:blank"); @@ -136,7 +136,7 @@ frame = frame.contentWindow; frame.postMessage({ command: "retrieve" }, "*"); - let event = yield undefined; + event = yield undefined; ok(event instanceof MessageEvent, "Got a MessageEvent"); is(event.source, frame, "Correct window got the event"); is(event.data.type, "result", "Got a result message"); diff --git a/dom/xbl/test/test_bug591198.html b/dom/xbl/test/test_bug591198.html index 4277080d0bf..2c7df3613db 100644 --- a/dom/xbl/test/test_bug591198.html +++ b/dom/xbl/test/test_bug591198.html @@ -31,7 +31,7 @@ function runTest() { is(res.anonChildCount, 2, "correct number of anon children"); iframe.src = "http://noxul.example.com/tests/dom/xbl/test/file_bug591198_inner.html"; - let res = (yield); + res = (yield); is(res.widths[0], res.widths[1], "binding was not rendered"); isnot(res.widths[0], res.widths[2], "binding was not rendered"); is("anonChildCount" in res, false, "no anon children"); diff --git a/extensions/cookie/test/unit/test_cookies_async_failure.js b/extensions/cookie/test/unit/test_cookies_async_failure.js index a1940125b35..f46220ca8c0 100644 --- a/extensions/cookie/test/unit/test_cookies_async_failure.js +++ b/extensions/cookie/test/unit/test_cookies_async_failure.js @@ -352,7 +352,7 @@ function run_test_3(generator) // Close the profile. do_close_profile(sub_generator); yield; - let db = Services.storage.openDatabase(do_get_cookie_file(profile)); + db = Services.storage.openDatabase(do_get_cookie_file(profile)); do_check_eq(do_count_cookies_in_db(db), 0); db.close(); diff --git a/extensions/cookie/test/unit/test_domain_eviction.js b/extensions/cookie/test/unit/test_domain_eviction.js index 7194850dafc..3567c5ddd76 100644 --- a/extensions/cookie/test/unit/test_domain_eviction.js +++ b/extensions/cookie/test/unit/test_domain_eviction.js @@ -77,7 +77,7 @@ function do_run_test() false, false, false, futureExpiry); do_check_eq(countCookies("captchart.com", "captchart.com"), 50); - let enumerator = Services.cookiemgr.getCookiesFromHost("captchart.com"); + enumerator = Services.cookiemgr.getCookiesFromHost("captchart.com"); while (enumerator.hasMoreElements()) { let cookie = enumerator.getNext().QueryInterface(Ci.nsICookie2); do_check_true(cookie.expiry == futureExpiry); diff --git a/extensions/cookie/test/unit/test_schema_2_migration.js b/extensions/cookie/test/unit/test_schema_2_migration.js index 280847d8771..0990de58af6 100644 --- a/extensions/cookie/test/unit/test_schema_2_migration.js +++ b/extensions/cookie/test/unit/test_schema_2_migration.js @@ -115,7 +115,7 @@ function do_run_test() { // Attempt to add a cookie with the same (name, host, path) values as another // cookie. This should succeed since we have a REPLACE clause for conflict on // the unique index. - let cookie = new Cookie("oh", "hai", "baz.com", "/", + cookie = new Cookie("oh", "hai", "baz.com", "/", futureExpiry, now, now + 100, false, false, false); schema2db.insertCookie(cookie); diff --git a/extensions/cookie/test/unit/test_schema_3_migration.js b/extensions/cookie/test/unit/test_schema_3_migration.js index f53ab350bc3..79b4c1039fa 100644 --- a/extensions/cookie/test/unit/test_schema_3_migration.js +++ b/extensions/cookie/test/unit/test_schema_3_migration.js @@ -116,8 +116,8 @@ function do_run_test() { // Test the expected set of cookies. do_check_eq(Services.cookiemgr.countCookiesFromHost("cat.com"), 20); - let enumerator = Services.cookiemgr.getCookiesFromHost("cat.com"); - let cookie = enumerator.getNext().QueryInterface(Ci.nsICookie2); + enumerator = Services.cookiemgr.getCookiesFromHost("cat.com"); + cookie = enumerator.getNext().QueryInterface(Ci.nsICookie2); do_check_eq(cookie.creationTime, 0); finish_test(); diff --git a/image/test/unit/test_moz_icon_uri.js b/image/test/unit/test_moz_icon_uri.js index c223027bfb4..c179c9f06b4 100644 --- a/image/test/unit/test_moz_icon_uri.js +++ b/image/test/unit/test_moz_icon_uri.js @@ -113,7 +113,7 @@ function run_test() { exception = false; // reset exception value iconURI = uri.QueryInterface(Ci.nsIMozIconURI); - let fileURL = null; + fileURL = null; try { fileURL = iconURI.iconURL.QueryInterface(Ci.nsIFileURL); } catch (e) { diff --git a/js/xpconnect/tests/unit/test_sandbox_metadata.js b/js/xpconnect/tests/unit/test_sandbox_metadata.js index 127585dee87..c3db2c1b2f7 100644 --- a/js/xpconnect/tests/unit/test_sandbox_metadata.js +++ b/js/xpconnect/tests/unit/test_sandbox_metadata.js @@ -14,7 +14,7 @@ function run_test() do_check_eq(Components.utils.getSandboxMetadata(sandbox), "test metadata"); do_check_eq(Components.utils.getSandboxAddonId(sandbox), "12345"); - let sandbox = Components.utils.Sandbox("http://www.blah.com", { + sandbox = Components.utils.Sandbox("http://www.blah.com", { metadata: { foopy: { bar: 2 }, baz: "hi" } }); diff --git a/mobile/android/base/tests/testHomeProvider.js b/mobile/android/base/tests/testHomeProvider.js index caaa7f2ad5a..c2c43b49831 100644 --- a/mobile/android/base/tests/testHomeProvider.js +++ b/mobile/android/base/tests/testHomeProvider.js @@ -66,7 +66,7 @@ add_task(function test_save_and_delete() { yield storage.deleteAll(); // Make sure the data was deleted. - let result = yield db.execute("SELECT * FROM items"); + result = yield db.execute("SELECT * FROM items"); do_check_eq(result.length, 0); db.close(); diff --git a/mobile/android/base/tests/testMozPay.js b/mobile/android/base/tests/testMozPay.js index f268f55496e..d5dbe216d90 100644 --- a/mobile/android/base/tests/testMozPay.js +++ b/mobile/android/base/tests/testMozPay.js @@ -81,7 +81,7 @@ add_task(function test_default() { yield deferred.promise; deferred = Promise.defer(); - let id = getRequestId(1); + id = getRequestId(1); shouldPass = false; ui.showPaymentFlow(id, { diff --git a/modules/libpref/test/unit/test_libPrefs.js b/modules/libpref/test/unit/test_libPrefs.js index bb77a5b9fe5..9fb883e88df 100644 --- a/modules/libpref/test/unit/test_libPrefs.js +++ b/modules/libpref/test/unit/test_libPrefs.js @@ -166,22 +166,22 @@ function run_test() { // int ... pb.setIntPref("UserPref.root.intPref", 23); - let pb_1 = ps.getBranch("UserPref.root."); + pb_1 = ps.getBranch("UserPref.root."); do_check_eq(pb_1.getIntPref("intPref"), 23); - let pb_2 = ps.getBranch("UserPref.root.intPref"); + pb_2 = ps.getBranch("UserPref.root.intPref"); do_check_eq(pb_2.getIntPref(""), 23); pb_2.setIntPref(".anotherPref", 69); - let pb_3 = ps.getBranch("UserPref.root.intPre"); + pb_3 = ps.getBranch("UserPref.root.intPre"); do_check_eq(pb_3.getIntPref("f.anotherPref"), 69); // char... pb.setCharPref("UserPref.root.charPref", "_char"); - let pb_1 = ps.getBranch("UserPref.root."); + pb_1 = ps.getBranch("UserPref.root."); do_check_eq(pb_1.getCharPref("charPref"), "_char"); - let pb_2 = ps.getBranch("UserPref.root.charPref"); + pb_2 = ps.getBranch("UserPref.root.charPref"); do_check_eq(pb_2.getCharPref(""), "_char"); pb_2.setCharPref(".anotherPref", "_another"); - let pb_3 = ps.getBranch("UserPref.root.charPre"); + pb_3 = ps.getBranch("UserPref.root.charPre"); do_check_eq(pb_3.getCharPref("f.anotherPref"), "_another"); //**************************************************************************// diff --git a/services/common/tests/unit/test_storage_server.js b/services/common/tests/unit/test_storage_server.js index 1e85b595f5f..04b4dfbbbdf 100644 --- a/services/common/tests/unit/test_storage_server.js +++ b/services/common/tests/unit/test_storage_server.js @@ -152,7 +152,7 @@ add_test(function test_url_parsing() { // Check that we can parse a collection URI. parts = server.pathRE.exec("/2.0/123/storage/crypto"); - let [all, version, user, first, rest] = parts; + [all, version, user, first, rest] = parts; do_check_eq(all, "/2.0/123/storage/crypto"); do_check_eq(version, "2.0"); do_check_eq(user, "123"); @@ -165,7 +165,7 @@ add_test(function test_url_parsing() { // storage alone is a valid request. parts = server.pathRE.exec("/2.0/123456/storage"); - let [all, version, user, first, rest] = parts; + [all, version, user, first, rest] = parts; do_check_eq(all, "/2.0/123456/storage"); do_check_eq(version, "2.0"); do_check_eq(user, "123456"); @@ -173,7 +173,8 @@ add_test(function test_url_parsing() { do_check_eq(rest, undefined); parts = server.storageRE.exec("storage"); - let [all, storage, collection, id] = parts; + let storage, collection, id; + [all, storage, collection, id] = parts; do_check_eq(all, "storage"); do_check_eq(collection, undefined); @@ -213,8 +214,8 @@ add_test(function test_info_collections() { _("Creating an empty collection should result in collection appearing."); let coll = server.createCollection("123", "col1"); - let request = localRequest(server, path, "123", "password"); - let error = doGetRequest(request); + request = localRequest(server, path, "123", "password"); + error = doGetRequest(request); do_check_eq(error, null); do_check_eq(request.response.status, 200); let info = JSON.parse(request.response.body); @@ -322,10 +323,10 @@ add_test(function test_bso_if_modified_since_304() { do_check_eq(request.response.status, 304); do_check_false("content-type" in request.response.headers); - let request = localRequest(server, "/2.0/123/storage/test/bso", + request = localRequest(server, "/2.0/123/storage/test/bso", "123", "password"); request.setHeader("X-If-Modified-Since", "" + (server.serverTime() - 20000)); - let error = doGetRequest(request); + error = doGetRequest(request); do_check_eq(null, error); do_check_eq(request.response.status, 200); do_check_eq(request.response.headers["content-type"], "application/json"); @@ -359,11 +360,11 @@ add_test(function test_bso_if_unmodified_since() { do_check_eq(request.response.status, 412); _("Ensure we get a 204 if update goes through."); - let request = localRequest(server, "/2.0/123/storage/test/bso", - "123", "password"); + request = localRequest(server, "/2.0/123/storage/test/bso", + "123", "password"); request.setHeader("Content-Type", "application/json"); request.setHeader("X-If-Unmodified-Since", time + 1); - let error = doPutRequest(request, payload); + error = doPutRequest(request, payload); do_check_eq(null, error); do_check_eq(request.response.status, 204); do_check_true(coll.timestamp > time); @@ -371,11 +372,11 @@ add_test(function test_bso_if_unmodified_since() { // Not sure why a client would send X-If-Unmodified-Since if a BSO doesn't // exist. But, why not test it? _("Ensure we get a 201 if creation goes through."); - let request = localRequest(server, "/2.0/123/storage/test/none", - "123", "password"); + request = localRequest(server, "/2.0/123/storage/test/none", + "123", "password"); request.setHeader("Content-Type", "application/json"); request.setHeader("X-If-Unmodified-Since", time); - let error = doPutRequest(request, payload); + error = doPutRequest(request, payload); do_check_eq(null, error); do_check_eq(request.response.status, 201); @@ -432,9 +433,9 @@ add_test(function test_bso_delete_exists() { do_check_true(coll.timestamp > timestamp); _("On next request the BSO should not exist."); - let request = localRequest(server, "/2.0/123/storage/test/myid", - "123", "password"); - let error = doGetRequest(request); + request = localRequest(server, "/2.0/123/storage/test/myid", + "123", "password"); + error = doGetRequest(request); do_check_eq(error, null); do_check_eq(request.response.status, 404); @@ -463,9 +464,9 @@ add_test(function test_bso_delete_unmodified() { do_check_neq(coll.bso("myid"), null); _("Issuing a DELETE with a newer time should work."); - let request = localRequest(server, path, "123", "password"); + request = localRequest(server, path, "123", "password"); request.setHeader("X-If-Unmodified-Since", modified + 1000); - let error = doDeleteRequest(request); + error = doDeleteRequest(request); do_check_eq(error, null); do_check_eq(request.response.status, 204); do_check_true(coll.bso("myid").deleted); @@ -494,7 +495,7 @@ add_test(function test_collection_get_unmodified_since() { let request2 = localRequest(server, "/2.0/123/storage/testcoll", "123", "password"); request2.setHeader("X-If-Unmodified-Since", serverModified - 1); - let error = doGetRequest(request2); + error = doGetRequest(request2); do_check_null(error); do_check_eq(request2.response.status, 412); @@ -522,7 +523,7 @@ add_test(function test_bso_get_unmodified_since() { let request2 = localRequest(server, "/2.0/123/storage/testcoll/bso0", "123", "password"); request2.setHeader("X-If-Unmodified-Since", serverModified - 1); - let error = doGetRequest(request2); + error = doGetRequest(request2); do_check_null(error); do_check_eq(request2.response.status, 412); diff --git a/services/common/tests/unit/test_storageservice_bso.js b/services/common/tests/unit/test_storageservice_bso.js index b4ad27307dc..05b9bbecda7 100644 --- a/services/common/tests/unit/test_storageservice_bso.js +++ b/services/common/tests/unit/test_storageservice_bso.js @@ -21,12 +21,12 @@ add_test(function test_bso_constructor() { do_check_eq(bso.sortindex, 0); do_check_eq(bso.ttl, null); - let bso = new BasicStorageObject("foobar"); + bso = new BasicStorageObject("foobar"); do_check_eq(bso.id, "foobar"); do_check_eq(bso.collection, null); do_check_attribute_count(bso.data, 0); - let bso = new BasicStorageObject("foo", "coll"); + bso = new BasicStorageObject("foo", "coll"); do_check_eq(bso.id, "foo"); do_check_eq(bso.collection, "coll"); do_check_attribute_count(bso.data, 0); @@ -66,8 +66,8 @@ add_test(function test_bso_deserialize() { do_check_eq(bso.modified, 1223145532); _("Invalid JSON."); - let json = '{id: "foobar}'; - let bso = new BasicStorageObject(); + json = '{id: "foobar}'; + bso = new BasicStorageObject(); try { bso.deserialize(json); do_check_true(false); @@ -76,8 +76,8 @@ add_test(function test_bso_deserialize() { } _("Invalid key in JSON."); - let json = '{"id": "foo", "payload": "pay", "BADKEY": "irrelevant"}'; - let bso = new BasicStorageObject(); + json = '{"id": "foo", "payload": "pay", "BADKEY": "irrelevant"}'; + bso = new BasicStorageObject(); try { bso.deserialize(json); do_check_true(false); @@ -87,14 +87,14 @@ add_test(function test_bso_deserialize() { } _("Loading native JS objects works."); - let bso = new BasicStorageObject(); + bso = new BasicStorageObject(); bso.deserialize({id: "foo", payload: "pay"}); do_check_neq(bso, null); do_check_eq(bso.id, "foo"); do_check_eq(bso.payload, "pay"); _("Passing invalid type is caught."); - let bso = new BasicStorageObject(); + bso = new BasicStorageObject(); try { bso.deserialize(["foo", "bar"]); do_check_true(false); diff --git a/services/crypto/tests/unit/test_crypto_crypt.js b/services/crypto/tests/unit/test_crypto_crypt.js index 60ac15b0301..0bbede021aa 100644 --- a/services/crypto/tests/unit/test_crypto_crypt.js +++ b/services/crypto/tests/unit/test_crypto_crypt.js @@ -38,7 +38,7 @@ function test_key_memoization() { do_check_eq(c, 0); let cipherText = cryptoSvc.encrypt("Hello, world.", key, iv); do_check_eq(c, 1); - let cipherText = cryptoSvc.encrypt("Hello, world.", key, iv); + cipherText = cryptoSvc.encrypt("Hello, world.", key, iv); do_check_eq(c, 1); // ... as should decryption. diff --git a/services/crypto/tests/unit/test_utils_httpmac.js b/services/crypto/tests/unit/test_utils_httpmac.js index 64a8c82a697..67b337373e3 100644 --- a/services/crypto/tests/unit/test_utils_httpmac.js +++ b/services/crypto/tests/unit/test_utils_httpmac.js @@ -32,7 +32,7 @@ add_test(function test_sha1() { let ext = "EXTRA DATA; foo,bar=1"; - let result = CryptoUtils.computeHTTPMACSHA1(id, key, method, uri, + result = CryptoUtils.computeHTTPMACSHA1(id, key, method, uri, {ts: ts, nonce: nonce, ext: ext}); do_check_eq(btoa(result.mac), "bNf4Fnt5k6DnhmyipLPkuZroH68="); do_check_eq(result.getHeader(), @@ -56,13 +56,13 @@ add_test(function test_nonce_length() { let result = get_mac(12); do_check_eq(12, atob(result.nonce).length); - let result = get_mac(2); + result = get_mac(2); do_check_eq(2, atob(result.nonce).length); - let result = get_mac(0); + result = get_mac(0); do_check_eq(8, atob(result.nonce).length); - let result = get_mac(-1); + result = get_mac(-1); do_check_eq(8, atob(result.nonce).length); run_next_test(); diff --git a/services/fxaccounts/tests/xpcshell/test_accounts.js b/services/fxaccounts/tests/xpcshell/test_accounts.js index 9844cc6e2fc..9443dcb9bb4 100644 --- a/services/fxaccounts/tests/xpcshell/test_accounts.js +++ b/services/fxaccounts/tests/xpcshell/test_accounts.js @@ -162,7 +162,7 @@ add_task(function test_get_signed_in_user_initially_unset() { yield account.setSignedInUser(credentials); - let result = yield account.getSignedInUser(); + result = yield account.getSignedInUser(); do_check_eq(result.email, credentials.email); do_check_eq(result.assertion, credentials.assertion); do_check_eq(result.kB, credentials.kB); @@ -170,7 +170,7 @@ add_task(function test_get_signed_in_user_initially_unset() { // Delete the memory cache and force the user // to be read and parsed from storage (e.g. disk via JSONStorage). delete account.internal.signedInUser; - let result = yield account.getSignedInUser(); + result = yield account.getSignedInUser(); do_check_eq(result.email, credentials.email); do_check_eq(result.assertion, credentials.assertion); do_check_eq(result.kB, credentials.kB); @@ -180,7 +180,7 @@ add_task(function test_get_signed_in_user_initially_unset() { yield account.signOut(localOnly); // user should be undefined after sign out - let result = yield account.getSignedInUser(); + result = yield account.getSignedInUser(); do_check_eq(result, null); }); diff --git a/services/fxaccounts/tests/xpcshell/test_client.js b/services/fxaccounts/tests/xpcshell/test_client.js index fad064f49d3..8d246e0ec3f 100644 --- a/services/fxaccounts/tests/xpcshell/test_client.js +++ b/services/fxaccounts/tests/xpcshell/test_client.js @@ -277,14 +277,14 @@ add_task(function test_signIn() { do_check_eq(undefined, result.keyFetchToken); // Login with retrieving optional keys - let result = yield client.signIn('you@example.com', 'bigsecret', true); + result = yield client.signIn('you@example.com', 'bigsecret', true); do_check_eq(FAKE_SESSION_TOKEN, result.sessionToken); do_check_eq(result.unwrapBKey, "65970516211062112e955d6420bebe020269d6b6a91ebd288319fc8d0cb49624"); do_check_eq("keyFetchToken", result.keyFetchToken); // Retry due to wrong email capitalization - let result = yield client.signIn('You@example.com', 'bigsecret', true); + result = yield client.signIn('You@example.com', 'bigsecret', true); do_check_eq(FAKE_SESSION_TOKEN, result.sessionToken); do_check_eq(result.unwrapBKey, "65970516211062112e955d6420bebe020269d6b6a91ebd288319fc8d0cb49624"); diff --git a/services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js b/services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js index a9cf5f4499b..872e9956824 100644 --- a/services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js +++ b/services/fxaccounts/tests/xpcshell/test_loginmgr_storage.js @@ -128,7 +128,7 @@ add_task(function test_migrationMPUnlocked() { Assert.deepEqual(data, creds, "we got all the data back"); // and verify it was actually migrated - re-read signedInUser back. - let data = yield CommonUtils.readJSON(path); + data = yield CommonUtils.readJSON(path); Assert.strictEqual(data.accountData.email, creds.email, "correct email in the clear text"); Assert.strictEqual(data.accountData.sessionToken, creds.sessionToken, "correct sessionToken in the clear text"); @@ -255,7 +255,7 @@ add_task(function test_consistentWithMPEdgeCases() { // Make a new FxA instance (otherwise the values in memory will be used.) // Because we haven't overridden _isLoggedIn for this new instance it will // treat the MP as unlocked. - let fxa = new FxAccounts({}); + fxa = new FxAccounts({}); let accountData = yield fxa.getSignedInUser(); Assert.strictEqual(accountData.email, creds2.email); diff --git a/services/sync/tests/unit/test_addons_reconciler.js b/services/sync/tests/unit/test_addons_reconciler.js index 40b0b8acd0d..8cfa37d78f4 100644 --- a/services/sync/tests/unit/test_addons_reconciler.js +++ b/services/sync/tests/unit/test_addons_reconciler.js @@ -179,7 +179,7 @@ add_test(function test_prune_changes_before_date() { do_check_eq(2, reconciler._changes.length); _("Ensure pruning a single item works."); - let threshold = new Date(young.getTime() - 1000); + threshold = new Date(young.getTime() - 1000); reconciler.pruneChangesBeforeDate(threshold); do_check_eq(1, reconciler._changes.length); do_check_neq(undefined, reconciler._changes[0]); diff --git a/services/sync/tests/unit/test_bookmark_engine.js b/services/sync/tests/unit/test_bookmark_engine.js index 2caaea69238..bd4c740cbcd 100644 --- a/services/sync/tests/unit/test_bookmark_engine.js +++ b/services/sync/tests/unit/test_bookmark_engine.js @@ -380,7 +380,6 @@ add_test(function test_bookmark_guidMap_fail() { let engine = new BookmarksEngine(Service); let store = engine._store; - let store = engine._store; let server = serverForFoo(engine); let coll = server.user("foo").collection("bookmarks"); new SyncTestingInfrastructure(server.server); diff --git a/services/sync/tests/unit/test_httpd_sync_server.js b/services/sync/tests/unit/test_httpd_sync_server.js index 194f8ac1d1d..943dbfd738f 100644 --- a/services/sync/tests/unit/test_httpd_sync_server.js +++ b/services/sync/tests/unit/test_httpd_sync_server.js @@ -36,7 +36,7 @@ add_test(function test_url_parsing() { // Check that we can parse a collection URI. parts = server.pathRE.exec("/1.1/johnsmith/storage/crypto"); - let [all, version, username, first, rest] = parts; + [all, version, username, first, rest] = parts; do_check_eq(all, "/1.1/johnsmith/storage/crypto"); do_check_eq(version, "1.1"); do_check_eq(username, "johnsmith"); @@ -49,7 +49,7 @@ add_test(function test_url_parsing() { // storage alone is a valid request. parts = server.pathRE.exec("/1.1/johnsmith/storage"); - let [all, version, username, first, rest] = parts; + [all, version, username, first, rest] = parts; do_check_eq(all, "/1.1/johnsmith/storage"); do_check_eq(version, "1.1"); do_check_eq(username, "johnsmith"); @@ -57,7 +57,8 @@ add_test(function test_url_parsing() { do_check_eq(rest, undefined); parts = server.storageRE.exec("storage"); - let [all, storage, collection, id] = parts; + let storage, collection, id; + [all, storage, collection, id] = parts; do_check_eq(all, "storage"); do_check_eq(collection, undefined); diff --git a/services/sync/tests/unit/test_resource.js b/services/sync/tests/unit/test_resource.js index 93dfe46b28a..027d662b41f 100644 --- a/services/sync/tests/unit/test_resource.js +++ b/services/sync/tests/unit/test_resource.js @@ -153,7 +153,7 @@ function run_test() { do_test_pending(); - logger = Log.repository.getLogger('Test'); + let logger = Log.repository.getLogger('Test'); Log.repository.rootLogger.addAppender(new Log.DumpAppender()); let server = httpd_setup({ @@ -206,7 +206,7 @@ function run_test() { do_check_eq(res.data, content); // Observe logging messages. - let logger = res._log; + logger = res._log; let dbg = logger.debug; let debugMessages = []; logger.debug = function (msg) { diff --git a/services/sync/tests/unit/test_syncengine_sync.js b/services/sync/tests/unit/test_syncengine_sync.js index b8b5f7d0ce0..6a6d047bf54 100644 --- a/services/sync/tests/unit/test_syncengine_sync.js +++ b/services/sync/tests/unit/test_syncengine_sync.js @@ -401,8 +401,8 @@ add_test(function test_processIncoming_reconcile_local_deleted() { let wbo = new ServerWBO("DUPE_INCOMING", record, now + 2); server.insertWBO(user, "rotary", wbo); - let record = encryptPayload({id: "DUPE_LOCAL", denomination: "local"}); - let wbo = new ServerWBO("DUPE_LOCAL", record, now - 1); + record = encryptPayload({id: "DUPE_LOCAL", denomination: "local"}); + wbo = new ServerWBO("DUPE_LOCAL", record, now - 1); server.insertWBO(user, "rotary", wbo); engine._store.create({id: "DUPE_LOCAL", denomination: "local"}); @@ -475,7 +475,7 @@ add_test(function test_processIncoming_reconcile_locally_deleted_dupe_new() { do_check_empty(engine._store.items); let collection = server.getCollection(user, "rotary"); do_check_eq(1, collection.count()); - let wbo = collection.wbo("DUPE_INCOMING"); + wbo = collection.wbo("DUPE_INCOMING"); do_check_neq(null, wbo); let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext); do_check_true(payload.deleted); @@ -515,7 +515,7 @@ add_test(function test_processIncoming_reconcile_locally_deleted_dupe_old() { let collection = server.getCollection(user, "rotary"); do_check_eq(1, collection.count()); - let wbo = collection.wbo("DUPE_INCOMING"); + wbo = collection.wbo("DUPE_INCOMING"); let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext); do_check_eq("incoming", payload.denomination); @@ -551,7 +551,7 @@ add_test(function test_processIncoming_reconcile_changed_dupe() { // have its payload set to what was in the local record. let collection = server.getCollection(user, "rotary"); do_check_eq(1, collection.count()); - let wbo = collection.wbo("DUPE_INCOMING"); + wbo = collection.wbo("DUPE_INCOMING"); do_check_neq(undefined, wbo); let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext); do_check_eq("local", payload.denomination); @@ -589,7 +589,7 @@ add_test(function test_processIncoming_reconcile_changed_dupe_new() { // have its payload retained. let collection = server.getCollection(user, "rotary"); do_check_eq(1, collection.count()); - let wbo = collection.wbo("DUPE_INCOMING"); + wbo = collection.wbo("DUPE_INCOMING"); do_check_neq(undefined, wbo); let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext); do_check_eq("incoming", payload.denomination); diff --git a/services/sync/tests/unit/test_tab_store.js b/services/sync/tests/unit/test_tab_store.js index c7a7a9568f6..dc733e48f84 100644 --- a/services/sync/tests/unit/test_tab_store.js +++ b/services/sync/tests/unit/test_tab_store.js @@ -27,19 +27,19 @@ function test_create() { do_check_eq(Svc.Prefs.get("notifyTabState"), 1); _("Create a second record"); - let rec = {id: "id2", - clientName: "clientName2", - cleartext: "cleartext2", - modified: 2000}; + rec = {id: "id2", + clientName: "clientName2", + cleartext: "cleartext2", + modified: 2000}; store.applyIncoming(rec); do_check_eq(store._remoteClients["id2"], "cleartext2"); do_check_eq(Svc.Prefs.get("notifyTabState"), 0); _("Create a third record"); - let rec = {id: "id3", - clientName: "clientName3", - cleartext: "cleartext3", - modified: 3000}; + rec = {id: "id3", + clientName: "clientName3", + cleartext: "cleartext3", + modified: 3000}; store.applyIncoming(rec); do_check_eq(store._remoteClients["id3"], "cleartext3"); do_check_eq(Svc.Prefs.get("notifyTabState"), 0); diff --git a/storage/test/unit/test_cache_size.js b/storage/test/unit/test_cache_size.js index fa71adaefb2..e0a5e8723c4 100644 --- a/storage/test/unit/test_cache_size.js +++ b/storage/test/unit/test_cache_size.js @@ -38,7 +38,7 @@ function check_size(dbOpener, file, pageSize, expectedCacheSize) db = dbOpener(file); // Check cache size is as expected. - let stmt = db.createStatement("PRAGMA cache_size"); + stmt = db.createStatement("PRAGMA cache_size"); do_check_true(stmt.executeStep()); do_check_eq(stmt.row.cache_size, expectedCacheSize); stmt.finalize(); diff --git a/storage/test/unit/test_storage_connection.js b/storage/test/unit/test_storage_connection.js index 23db1815e6d..be1cacfb90f 100644 --- a/storage/test/unit/test_storage_connection.js +++ b/storage/test/unit/test_storage_connection.js @@ -541,7 +541,6 @@ add_task(function test_clone_no_optional_param_async() do_check_true(adb1 instanceof Ci.mozIStorageAsyncConnection); do_print("Cloning database"); - do_check_true(Components.isSuccessCode(result)); let adb2 = yield asyncClone(adb1); do_print("Testing that the cloned db is a mozIStorageAsyncConnection " + diff --git a/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js b/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js index 51a5c53aa77..61e3e8d8d29 100644 --- a/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js +++ b/toolkit/components/contentprefs/tests/unit/test_contentPrefsCache.js @@ -225,7 +225,7 @@ function testCacheEviction(uri, prefName) { } function selectValue(stmt, columnName, param1, param2) { - let stmt = cps.DBConnection.createStatement(stmt); + stmt = cps.DBConnection.createStatement(stmt); if (param1) stmt.params.param1 = param1; diff --git a/toolkit/components/crashes/tests/xpcshell/test_crash_store.js b/toolkit/components/crashes/tests/xpcshell/test_crash_store.js index d17f1586abb..a44dafd5725 100644 --- a/toolkit/components/crashes/tests/xpcshell/test_crash_store.js +++ b/toolkit/components/crashes/tests/xpcshell/test_crash_store.js @@ -523,7 +523,7 @@ add_task(function* test_addSubmission() { Assert.ok(s.addSubmissionResult("crash1", "sub2", DUMMY_DATE_2, SUBMISSION_RESULT_OK)); - let submission = s.getSubmission("crash1", "sub2"); + submission = s.getSubmission("crash1", "sub2"); Assert.ok(!!submission); Assert.equal(submission.result, SUBMISSION_RESULT_OK); }); diff --git a/toolkit/components/ctypes/tests/chrome/test_ctypes.xul b/toolkit/components/ctypes/tests/chrome/test_ctypes.xul index 6bcaf9ad4a2..32a83ad66d2 100644 --- a/toolkit/components/ctypes/tests/chrome/test_ctypes.xul +++ b/toolkit/components/ctypes/tests/chrome/test_ctypes.xul @@ -40,7 +40,7 @@ let dir = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("CurWorkD", Components.interfaces.nsILocalFile); - let path = location.pathname; + path = location.pathname; path = path.slice("content/".length, -1 * "/test_ctypes.xul".length); let components = path.split("/"); diff --git a/toolkit/components/ctypes/tests/unit/test_jsctypes.js b/toolkit/components/ctypes/tests/unit/test_jsctypes.js index d89fa1ca73a..e05cbdb869f 100644 --- a/toolkit/components/ctypes/tests/unit/test_jsctypes.js +++ b/toolkit/components/ctypes/tests/unit/test_jsctypes.js @@ -978,8 +978,8 @@ function run_float_tests(library, t, name, size) { eval("let f2 = " + f1.toSource()); do_check_eq(f1.value, f2.value); } - let vals = [Infinity, -Infinity, -0, 0, 1, -1, 1/3, -1/3, 1/4, -1/4, - 1e-14, -1e-14, 0xfffffffffffff000, -0xfffffffffffff000]; + vals = [Infinity, -Infinity, -0, 0, 1, -1, 1/3, -1/3, 1/4, -1/4, + 1e-14, -1e-14, 0xfffffffffffff000, -0xfffffffffffff000]; for (let i = 0; i < vals.length; i++) test_roundtrip(t, vals[i]); do_check_eq(t(NaN).toSource(), t.toSource() + "(NaN)"); @@ -1703,7 +1703,7 @@ function run_PointerType_tests() { let f = new f_t(); do_check_throws(function() { f.contents; }, Error); do_check_throws(function() { f.contents = 0; }, Error); - let f = f_t(5); + f = f_t(5); do_check_throws(function() { f.contents = 0; }, Error); do_check_eq(f.toSource(), 'FILE.ptr(ctypes.UInt64("0x5"))'); @@ -1731,7 +1731,7 @@ function run_PointerType_tests() { do_check_true(n.isNull() === false); // Test 'increment'/'decrement'. - let g_t = ctypes.StructType("g_t", [{ a: ctypes.int32_t }, { b: ctypes.double }]); + g_t = ctypes.StructType("g_t", [{ a: ctypes.int32_t }, { b: ctypes.double }]); let a_t = ctypes.ArrayType(g_t, 2); let a = new a_t(); a[0] = g_t(1, 2); @@ -2715,7 +2715,7 @@ function run_variadic_tests(library) { do_check_eq(result.value, 3 + 5 + 7 + 11); - let result = ctypes.int32_t.array(3)([1,1,1]), + result = ctypes.int32_t.array(3)([1,1,1]), v1 = ctypes.int32_t.array(4)([1,2,3,5]), v2 = ctypes.int32_t.array(3)([7,11,13]), vector_add_va = library.declare("test_vector_add_va_cdecl", diff --git a/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js b/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js index 2405d29f245..4fd1695d2d9 100644 --- a/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js +++ b/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js @@ -144,7 +144,7 @@ add_task(function test_getPreferredDownloadsDirectory() // Should return the system downloads directory because the dir preference // is not set. Services.prefs.setIntPref(folderListPrefName, 2); - let downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory(); + downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory(); do_check_neq(downloadDir, ""); do_check_eq(downloadDir, systemDir); @@ -171,7 +171,7 @@ add_task(function test_getPreferredDownloadsDirectory() // Should return the system downloads directory because the folderList // preference is invalid Services.prefs.setIntPref(folderListPrefName, 999); - let downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory(); + downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory(); do_check_eq(downloadDir, systemDir); cleanup(); diff --git a/toolkit/components/osfile/tests/xpcshell/test_unique.js b/toolkit/components/osfile/tests/xpcshell/test_unique.js index 81aca99a053..8aa81b80349 100644 --- a/toolkit/components/osfile/tests/xpcshell/test_unique.js +++ b/toolkit/components/osfile/tests/xpcshell/test_unique.js @@ -30,7 +30,7 @@ function testFiles(filename) { yield openedFile.file.close(); exists = yield OS.File.exists(openedFile.path); do_check_true(exists); - let fileInfo = yield OS.File.stat(openedFile.path); + fileInfo = yield OS.File.stat(openedFile.path); do_check_true(fileInfo.size == 0); // Ensure that openUnique() generates different file names each time, using the HEX number algorithm @@ -49,7 +49,7 @@ function testFiles(filename) { yield openedFile.file.close(); exists = yield OS.File.exists(openedFile.path); do_check_true(exists); - let fileInfo = yield OS.File.stat(openedFile.path); + fileInfo = yield OS.File.stat(openedFile.path); do_check_true(fileInfo.size == 0); // Ensure that openUnique() generates different human readable file names each time diff --git a/toolkit/components/passwordmgr/test/unit/test_storage.js b/toolkit/components/passwordmgr/test/unit/test_storage.js index 2a9979b5208..3b693340034 100644 --- a/toolkit/components/passwordmgr/test/unit/test_storage.js +++ b/toolkit/components/passwordmgr/test/unit/test_storage.js @@ -44,7 +44,7 @@ add_task(function test_storage_addLogin_nonascii() yield reloadAndCheckLogins([loginInfo]); // Store the string "test" using similarly looking glyphs. - let loginInfo = TestData.authLogin({ + loginInfo = TestData.authLogin({ httpRealm: String.fromCharCode(355, 277, 349, 357), }); Services.logins.addLogin(loginInfo); diff --git a/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js b/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js index 70bb9db9ad3..74137ffec73 100644 --- a/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js +++ b/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js @@ -13,7 +13,7 @@ const T_URI = NetUtil.newURI("https://www.mozilla.org/firefox/nightly/firstrun/" function* getForeignCountForURL(conn, url) { yield promiseAsyncUpdates(); - let url = url instanceof Ci.nsIURI ? url.spec : url; + url = url instanceof Ci.nsIURI ? url.spec : url; let rows = yield conn.executeCached( "SELECT foreign_count FROM moz_places WHERE url = :t_url ", { t_url: url }); return rows[0].getResultByName("foreign_count"); diff --git a/toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js b/toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js index 369d090115c..5e9b71d26d5 100644 --- a/toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js +++ b/toolkit/components/places/tests/bookmarks/test_477583_json-backup-in-future.js @@ -22,7 +22,7 @@ function run_test() { dateObj.setYear(dateObj.getFullYear() + 1); let name = PlacesBackups.getFilenameForDate(dateObj); do_check_eq(name, "bookmarks-" + dateObj.toLocaleFormat("%Y-%m-%d") + ".json"); - let files = bookmarksBackupDir.directoryEntries; + files = bookmarksBackupDir.directoryEntries; while (files.hasMoreElements()) { let entry = files.getNext().QueryInterface(Ci.nsIFile); if (PlacesBackups.filenamesRegex.test(entry.leafName)) diff --git a/toolkit/components/places/tests/bookmarks/test_bookmarks.js b/toolkit/components/places/tests/bookmarks/test_bookmarks.js index c70b9cb95cd..cd57ed2c51e 100644 --- a/toolkit/components/places/tests/bookmarks/test_bookmarks.js +++ b/toolkit/components/places/tests/bookmarks/test_bookmarks.js @@ -349,7 +349,7 @@ add_task(function test_bookmarks() { do_check_eq("bar", k); // test getKeywordForURI - let k = bs.getKeywordForURI(uri("http://keywordtest.com/")); + k = bs.getKeywordForURI(uri("http://keywordtest.com/")); do_check_eq("bar", k); // test getURIForKeyword @@ -358,8 +358,8 @@ add_task(function test_bookmarks() { // test removeFolderChildren // 1) add/remove each child type (bookmark, separator, folder) - let tmpFolder = bs.createFolder(testRoot, "removeFolderChildren", - bs.DEFAULT_INDEX); + tmpFolder = bs.createFolder(testRoot, "removeFolderChildren", + bs.DEFAULT_INDEX); bs.insertBookmark(tmpFolder, uri("http://foo9.com/"), bs.DEFAULT_INDEX, ""); bs.createFolder(tmpFolder, "subfolder", bs.DEFAULT_INDEX); bs.insertSeparator(tmpFolder, bs.DEFAULT_INDEX); @@ -451,9 +451,9 @@ add_task(function test_bookmarks() { // test change bookmark uri let newId10 = bs.insertBookmark(testRoot, uri("http://foo10.com/"), bs.DEFAULT_INDEX, ""); - let dateAdded = bs.getItemDateAdded(newId10); + dateAdded = bs.getItemDateAdded(newId10); // after just inserting, modified should not be set - let lastModified = bs.getItemLastModified(newId10); + lastModified = bs.getItemLastModified(newId10); do_check_eq(lastModified, dateAdded); // Workaround possible VM timers issues moving lastModified and dateAdded @@ -464,7 +464,7 @@ add_task(function test_bookmarks() { bs.changeBookmarkURI(newId10, uri("http://foo11.com/")); // check that lastModified is set after we change the bookmark uri - let lastModified2 = bs.getItemLastModified(newId10); + lastModified2 = bs.getItemLastModified(newId10); LOG("test changeBookmarkURI"); LOG("dateAdded = " + dateAdded); LOG("lastModified = " + lastModified); @@ -597,8 +597,8 @@ add_task(function test_bookmarks() { // check setItemLastModified() and setItemDateAdded() let newId14 = bs.insertBookmark(testRoot, uri("http://bar.tld/"), bs.DEFAULT_INDEX, ""); - let dateAdded = bs.getItemDateAdded(newId14); - let lastModified = bs.getItemLastModified(newId14); + dateAdded = bs.getItemDateAdded(newId14); + lastModified = bs.getItemLastModified(newId14); do_check_eq(lastModified, dateAdded); bs.setItemLastModified(newId14, 1234); let fakeLastModified = bs.getItemLastModified(newId14); diff --git a/toolkit/components/places/tests/bookmarks/test_keywords.js b/toolkit/components/places/tests/bookmarks/test_keywords.js index b24f81ace7c..b783553bbb9 100644 --- a/toolkit/components/places/tests/bookmarks/test_keywords.js +++ b/toolkit/components/places/tests/bookmarks/test_keywords.js @@ -27,7 +27,7 @@ function check_uri_keyword(aURI, aKeyword) function check_orphans() { - stmt = DBConn().createStatement( + let stmt = DBConn().createStatement( `SELECT id FROM moz_keywords k WHERE NOT EXISTS ( SELECT id FROM moz_bookmarks WHERE keyword_id = k.id )` @@ -39,7 +39,7 @@ function check_orphans() } print("Check there are no orphan database entries"); - let stmt = DBConn().createStatement( + stmt = DBConn().createStatement( `SELECT b.id FROM moz_bookmarks b LEFT JOIN moz_keywords k ON b.keyword_id = k.id WHERE keyword_id NOTNULL AND k.id ISNULL` diff --git a/toolkit/components/places/tests/browser/browser_bug248970.js b/toolkit/components/places/tests/browser/browser_bug248970.js index 75662ee9097..a41ee1bb40f 100644 --- a/toolkit/components/places/tests/browser/browser_bug248970.js +++ b/toolkit/components/places/tests/browser/browser_bug248970.js @@ -118,7 +118,7 @@ function getPlacesItemsCount() { // Get history item count options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY; - let root = PlacesUtils.history.executeQuery( + root = PlacesUtils.history.executeQuery( PlacesUtils.history.getNewQuery(), options).root; root.containerOpen = true; cc += root.childCount; diff --git a/toolkit/components/places/tests/expiration/test_annos_expire_history.js b/toolkit/components/places/tests/expiration/test_annos_expire_history.js index 04ef706b9d9..b2b29676eee 100644 --- a/toolkit/components/places/tests/expiration/test_annos_expire_history.js +++ b/toolkit/components/places/tests/expiration/test_annos_expire_history.js @@ -77,11 +77,11 @@ add_task(function test_annos_expire_history() { // Expire all visits for the first 5 pages and the bookmarks. yield promiseForceExpirationStep(10); - let pages = as.getPagesWithAnnotation("page_expire1"); + pages = as.getPagesWithAnnotation("page_expire1"); do_check_eq(pages.length, 0); pages = as.getPagesWithAnnotation("page_expire2"); do_check_eq(pages.length, 0); - let items = as.getItemsWithAnnotation("item_persist1"); + items = as.getItemsWithAnnotation("item_persist1"); do_check_eq(items.length, 0); items = as.getItemsWithAnnotation("item_persist2"); do_check_eq(items.length, 0); @@ -89,4 +89,4 @@ add_task(function test_annos_expire_history() { do_check_eq(pages.length, 5); pages = as.getPagesWithAnnotation("page_persist2"); do_check_eq(pages.length, 5); -}); \ No newline at end of file +}); diff --git a/toolkit/components/places/tests/expiration/test_annos_expire_never.js b/toolkit/components/places/tests/expiration/test_annos_expire_never.js index 81e31dae195..81dbb73fb06 100644 --- a/toolkit/components/places/tests/expiration/test_annos_expire_never.js +++ b/toolkit/components/places/tests/expiration/test_annos_expire_never.js @@ -78,11 +78,11 @@ add_task(function test_annos_expire_never() { // Expire all visits for the first 5 pages and the bookmarks. yield promiseForceExpirationStep(10); - let pages = as.getPagesWithAnnotation("page_expire1"); + pages = as.getPagesWithAnnotation("page_expire1"); do_check_eq(pages.length, 0); pages = as.getPagesWithAnnotation("page_expire2"); do_check_eq(pages.length, 0); - let items = as.getItemsWithAnnotation("item_persist1"); + items = as.getItemsWithAnnotation("item_persist1"); do_check_eq(items.length, 5); items = as.getItemsWithAnnotation("item_persist2"); do_check_eq(items.length, 5); diff --git a/toolkit/components/places/tests/expiration/test_removeAllPages.js b/toolkit/components/places/tests/expiration/test_removeAllPages.js index 21d818e0890..403b9e1144a 100644 --- a/toolkit/components/places/tests/expiration/test_removeAllPages.js +++ b/toolkit/components/places/tests/expiration/test_removeAllPages.js @@ -93,7 +93,7 @@ add_task(function test_removeAllPages() { for (let i = 0; i < 5; i++) { let pageURI = uri("http://item_anno." + i + ".mozilla.org/"); // This visit will be expired. - yield promiseAddVisits({ uri: pageURI, visitDate: now++ }); + yield promiseAddVisits({ uri: pageURI }); let id = bs.insertBookmark(bs.unfiledBookmarksFolder, pageURI, bs.DEFAULT_INDEX, null); // Will persist because it's an EXPIRE_NEVER item anno. @@ -113,12 +113,11 @@ add_task(function test_removeAllPages() { } // Add some visited page and annotations for each. - let now = Date.now() * 1000; for (let i = 0; i < 5; i++) { // All page annotations related to these expired pages are expected to // expire as well. let pageURI = uri("http://page_anno." + i + ".mozilla.org/"); - yield promiseAddVisits({ uri: pageURI, visitDate: now++ }); + yield promiseAddVisits({ uri: pageURI }); as.setPageAnnotation(pageURI, "expire", "test", 0, as.EXPIRE_NEVER); as.setPageAnnotation(pageURI, "expire_session", "test", 0, as.EXPIRE_SESSION); add_old_anno(pageURI, "expire_days", "test", as.EXPIRE_DAYS, 8); diff --git a/toolkit/components/places/tests/unit/test_385397.js b/toolkit/components/places/tests/unit/test_385397.js index b00e09fc85f..f7e8dddf5fb 100644 --- a/toolkit/components/places/tests/unit/test_385397.js +++ b/toolkit/components/places/tests/unit/test_385397.js @@ -72,13 +72,13 @@ add_task(function test_execute() // ... // http://www.test-0.com/ // http://www.test-0.com/ - let options = PlacesUtils.history.getNewQueryOptions(); + options = PlacesUtils.history.getNewQueryOptions(); options.sortingMode = options.SORT_BY_DATE_DESCENDING; options.resultType = options.RESULTS_AS_VISIT; - let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(), + root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(), options).root; root.containerOpen = true; - let cc = root.childCount; + cc = root.childCount; // 2 * TOTAL_SITES because we count the TYPED and LINK, but not EMBED or FRAMED do_check_eq(cc, 2 * TOTAL_SITES); for (let i=0; i < TOTAL_SITES; i++) { @@ -100,14 +100,14 @@ add_task(function test_execute() // http://www.test-19.com/ // ... // http://www.test-10.com/ - let options = PlacesUtils.history.getNewQueryOptions(); + options = PlacesUtils.history.getNewQueryOptions(); options.sortingMode = options.SORT_BY_DATE_DESCENDING; options.maxResults = 10; options.resultType = options.RESULTS_AS_URI; - let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(), + root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(), options).root; root.containerOpen = true; - let cc = root.childCount; + cc = root.childCount; do_check_eq(cc, options.maxResults); for (let i=0; i < cc; i++) { let node = root.getChild(i); @@ -124,13 +124,13 @@ add_task(function test_execute() // http://www.test-19.com/ // ... // http://www.test-10.com/ - let options = PlacesUtils.history.getNewQueryOptions(); + options = PlacesUtils.history.getNewQueryOptions(); options.sortingMode = options.SORT_BY_DATE_DESCENDING; options.resultType = options.RESULTS_AS_URI; - let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(), + root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(), options).root; root.containerOpen = true; - let cc = root.childCount; + cc = root.childCount; do_check_eq(cc, TOTAL_SITES); for (let i=0; i < 10; i++) { let node = root.getChild(i); diff --git a/toolkit/components/places/tests/unit/test_399266.js b/toolkit/components/places/tests/unit/test_399266.js index 6619f4023f1..da9ed69437c 100644 --- a/toolkit/components/places/tests/unit/test_399266.js +++ b/toolkit/components/places/tests/unit/test_399266.js @@ -60,13 +60,13 @@ add_task(function test_execute() // http://www.test-19.com/ // ... // http://www.test-10.com/ - let options = PlacesUtils.history.getNewQueryOptions(); + options = PlacesUtils.history.getNewQueryOptions(); options.sortingMode = options.SORT_BY_VISITCOUNT_DESCENDING; options.resultType = options.RESULTS_AS_URI; - let root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(), + root = PlacesUtils.history.executeQuery(PlacesUtils.history.getNewQuery(), options).root; root.containerOpen = true; - let cc = root.childCount; + cc = root.childCount; do_check_eq(cc, TOTAL_SITES); for (let i = 0; i < 10; i++) { let node = root.getChild(i); diff --git a/toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js b/toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js index 1807d8d533b..2e6628449ba 100644 --- a/toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js +++ b/toolkit/components/places/tests/unit/test_PlacesSearchAutocompleteProvider.js @@ -61,7 +61,7 @@ add_task(function* test_parseSubmissionURL_basic() { do_check_eq(result.engineName, engine.name); do_check_eq(result.terms, "terms"); - let result = PlacesSearchAutocompleteProvider.parseSubmissionURL("http://example.org/"); + result = PlacesSearchAutocompleteProvider.parseSubmissionURL("http://example.org/"); do_check_eq(result, null); }); diff --git a/toolkit/components/places/tests/unit/test_async_transactions.js b/toolkit/components/places/tests/unit/test_async_transactions.js index b2a3ad22ede..a4dcbd5105c 100644 --- a/toolkit/components/places/tests/unit/test_async_transactions.js +++ b/toolkit/components/places/tests/unit/test_async_transactions.js @@ -510,7 +510,7 @@ add_task(function* test_move_items_to_folder() { , newIndex: 0 }); observer.reset(); }; - let ensureUndo = () => { + ensureUndo = () => { ensureUndoState([ [moveTxn] , [folder_b_txn] , [bkm_b_txn, bkm_a_txn, folder_a_txn] ], 1); diff --git a/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js b/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js index 982d6bade26..ba4f58f5ea2 100644 --- a/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js +++ b/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js @@ -60,10 +60,10 @@ add_task(function test_execute() root.containerOpen = false; // Broken folder shortcut as root node. - let query = PlacesUtils.history.getNewQuery(); + query = PlacesUtils.history.getNewQuery(); query.setFolders([1234], 1); - let options = PlacesUtils.history.getNewQueryOptions(); - let root = PlacesUtils.history.executeQuery(query, options).root; + options = PlacesUtils.history.getNewQueryOptions(); + root = PlacesUtils.history.executeQuery(query, options).root; root.containerOpen = true; do_check_eq(root.childCount, 0); root.containerOpen = false; diff --git a/toolkit/components/places/tests/unit/test_preventive_maintenance.js b/toolkit/components/places/tests/unit/test_preventive_maintenance.js index d67d03b7748..f4b4be2ae9c 100644 --- a/toolkit/components/places/tests/unit/test_preventive_maintenance.js +++ b/toolkit/components/places/tests/unit/test_preventive_maintenance.js @@ -1170,7 +1170,7 @@ tests.push({ setLastVisitDate(url, now++); // Add a page without visits. - let url = "http://5.moz.org/"; + url = "http://5.moz.org/"; addPlace(url); // Add a page without visits and set wrong visit_count. url = "http://6.moz.org/"; diff --git a/toolkit/components/prompts/test/test_modal_prompts.html b/toolkit/components/prompts/test/test_modal_prompts.html index 348d85c2c3d..8483362457f 100644 --- a/toolkit/components/prompts/test/test_modal_prompts.html +++ b/toolkit/components/prompts/test/test_modal_prompts.html @@ -1099,7 +1099,7 @@ function runTests() { // ConfirmEx (buttons from args, checkbox, cancel) testNum++; startCallbackTimer(); - let b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING; + b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING; flags = b * Ci.nsIPromptService.BUTTON_POS_2 + b * Ci.nsIPromptService.BUTTON_POS_1 + b * Ci.nsIPromptService.BUTTON_POS_0; @@ -1118,7 +1118,7 @@ function runTests() { // ConfirmEx (buttons from args, checkbox, button3) testNum++; startCallbackTimer(); - let b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING; + b = Ci.nsIPromptService.BUTTON_TITLE_IS_STRING; flags = b * Ci.nsIPromptService.BUTTON_POS_2 + b * Ci.nsIPromptService.BUTTON_POS_1 + b * Ci.nsIPromptService.BUTTON_POS_0; diff --git a/toolkit/components/satchel/test/unit/test_autocomplete.js b/toolkit/components/satchel/test/unit/test_autocomplete.js index 12dc185d73b..8f464ea5ef7 100644 --- a/toolkit/components/satchel/test/unit/test_autocomplete.js +++ b/toolkit/components/satchel/test/unit/test_autocomplete.js @@ -231,7 +231,7 @@ add_test(function test13() { do_check_eq(results.getValueAt(i), syncValues[i]); } - let results = autocompleteService.autoCompleteSearch("field5", "sync1", null, null); + results = autocompleteService.autoCompleteSearch("field5", "sync1", null, null); do_check_eq(results.matchCount, 2, "synchronous matchCount"); do_check_eq(results.getValueAt(0), "sync1"); do_check_eq(results.getValueAt(1), "sync1a"); diff --git a/toolkit/components/social/test/browser/browser_SocialProvider.js b/toolkit/components/social/test/browser/browser_SocialProvider.js index 3d3e6d22aae..715388eb3d6 100644 --- a/toolkit/components/social/test/browser/browser_SocialProvider.js +++ b/toolkit/components/social/test/browser/browser_SocialProvider.js @@ -45,7 +45,7 @@ let tests = { provider.enabled = true; ok(provider.enabled, "provider is re-enabled"); - let port = provider.getWorkerPort(); + port = provider.getWorkerPort(); ok(port, "should be able to get a port from re-enabled provider"); port.close(); ok(provider.workerAPI, "should be able to get a workerAPI from re-enabled provider"); diff --git a/toolkit/content/tests/chrome/findbar_window.xul b/toolkit/content/tests/chrome/findbar_window.xul index 1bff214b4c0..39a980f145b 100644 --- a/toolkit/content/tests/chrome/findbar_window.xul +++ b/toolkit/content/tests/chrome/findbar_window.xul @@ -344,7 +344,7 @@ ok(a == b && b == c, "testFindWithHighlight 1: " + a + ", " + b + ", " + c + "."); let oldGetInitialSelection = gFindBar._getInitialSelection; - let searchStr = "t"; + searchStr = "t"; gFindBar._getInitialSelection = () => searchStr; findCommand.doCommand(); gFindBar._getInitialSelection = oldGetInitialSelection; diff --git a/toolkit/content/tests/chrome/test_bug557987.xul b/toolkit/content/tests/chrome/test_bug557987.xul index f7dcbbba3ba..ba680568fff 100644 --- a/toolkit/content/tests/chrome/test_bug557987.xul +++ b/toolkit/content/tests/chrome/test_bug557987.xul @@ -40,8 +40,8 @@ function test() { synthesizeMouse(button, centerX, centerY, {}, window); let menulist = $("menulist"); - let centerX = menulist.getBoundingClientRect().width / 2; - let centerY = menulist.getBoundingClientRect().height / 2; + centerX = menulist.getBoundingClientRect().width / 2; + centerY = menulist.getBoundingClientRect().height / 2; synthesizeMouse(menulist, centerX, centerY, {}, window); synthesizeMouse(document.getElementsByTagName("body")[0], 0, 0, {}, window); diff --git a/toolkit/devtools/server/tests/mochitest/inspector-helpers.js b/toolkit/devtools/server/tests/mochitest/inspector-helpers.js index ad875e588b6..7fbb97cb1ea 100644 --- a/toolkit/devtools/server/tests/mochitest/inspector-helpers.js +++ b/toolkit/devtools/server/tests/mochitest/inspector-helpers.js @@ -166,7 +166,7 @@ function checkMissing(client, actorID) { let front = client.getActor(actorID); ok(!front, "Front shouldn't be accessible from the client for actorID: " + actorID); - let deferred = promise.defer(); + deferred = promise.defer(); client.request({ to: actorID, type: "request", @@ -183,7 +183,7 @@ function checkAvailable(client, actorID) { let front = client.getActor(actorID); ok(front, "Front should be accessible from the client for actorID: " + actorID); - let deferred = promise.defer(); + deferred = promise.defer(); client.request({ to: actorID, type: "garbageAvailableTest", diff --git a/toolkit/devtools/server/tests/mochitest/test_highlighter-boxmodel_02.html b/toolkit/devtools/server/tests/mochitest/test_highlighter-boxmodel_02.html index 96b02f1d181..783cb471d03 100644 --- a/toolkit/devtools/server/tests/mochitest/test_highlighter-boxmodel_02.html +++ b/toolkit/devtools/server/tests/mochitest/test_highlighter-boxmodel_02.html @@ -239,7 +239,7 @@ window.onload = function() { }); let margin = container.querySelector(".box-model-margin"); - let points = margin.getAttribute("points").split(" ").map(xy => xy.split(",")); + points = margin.getAttribute("points").split(" ").map(xy => xy.split(",")); is(Math.ceil(guideTop.getAttribute("y1")), points[0][1], "Top guide's y1 is correct"); diff --git a/toolkit/devtools/server/tests/mochitest/test_inspector-mutations-childlist.html b/toolkit/devtools/server/tests/mochitest/test_inspector-mutations-childlist.html index 6b95ed1eaa7..ee5c051eda1 100644 --- a/toolkit/devtools/server/tests/mochitest/test_inspector-mutations-childlist.html +++ b/toolkit/devtools/server/tests/mochitest/test_inspector-mutations-childlist.html @@ -102,7 +102,7 @@ function mutationTest(testSpec) { gWalker.once("mutations", (mutations) => { // Filter out our dummy mutation. - let mutations = mutations.filter(change => { + mutations = mutations.filter(change => { if (change.type == "attributes" && change.attributeName == "data-dummy") { return false; diff --git a/toolkit/devtools/server/tests/mochitest/test_styles-applied.html b/toolkit/devtools/server/tests/mochitest/test_styles-applied.html index b6129b786f2..c8f62b5dcd7 100644 --- a/toolkit/devtools/server/tests/mochitest/test_styles-applied.html +++ b/toolkit/devtools/server/tests/mochitest/test_styles-applied.html @@ -42,7 +42,6 @@ addTest(function setup() { }); addTest(function inheritedUserStyles() { - let node = node; promiseDone(gWalker.querySelector(gWalker.rootNode, "#test-node").then(node => { return gStyles.getApplied(node, { inherited: true, filter: "user" }); }).then(applied => { @@ -78,7 +77,6 @@ addTest(function inheritedUserStyles() { }); addTest(function inheritedSystemStyles() { - let node = node; promiseDone(gWalker.querySelector(gWalker.rootNode, "#test-node").then(node => { return gStyles.getApplied(node, { inherited: true, filter: "ua" }); }).then(applied => { @@ -95,7 +93,6 @@ addTest(function inheritedSystemStyles() { }); addTest(function noInheritedStyles() { - let node = node; promiseDone(gWalker.querySelector(gWalker.rootNode, "#test-node").then(node => { return gStyles.getApplied(node, { inherited: false, filter: "user" }); }).then(applied => { @@ -118,7 +115,6 @@ addTest(function matchedSelectors() { }); addTest(function testMediaQuery() { - let node = node; promiseDone(gWalker.querySelector(gWalker.rootNode, "#mediaqueried").then(node => { return gStyles.getApplied(node, { inherited: false, filter: "user", matchedSelectors: true diff --git a/toolkit/devtools/server/tests/mochitest/test_styles-svg.html b/toolkit/devtools/server/tests/mochitest/test_styles-svg.html index 0fbaa2510cb..bae77142d22 100644 --- a/toolkit/devtools/server/tests/mochitest/test_styles-svg.html +++ b/toolkit/devtools/server/tests/mochitest/test_styles-svg.html @@ -43,7 +43,6 @@ addTest(function setup() { }); addTest(function inheritedUserStyles() { - let node = node; promiseDone(gWalker.querySelector(gWalker.rootNode, "#svgcontent rect").then(node => { return gStyles.getApplied(node, { inherited: true, filter: "user" }); }).then(applied => { diff --git a/toolkit/devtools/server/tests/unit/test_breakpoint-15.js b/toolkit/devtools/server/tests/unit/test_breakpoint-15.js index 146a4dd6deb..b66453ea29b 100644 --- a/toolkit/devtools/server/tests/unit/test_breakpoint-15.js +++ b/toolkit/devtools/server/tests/unit/test_breakpoint-15.js @@ -49,8 +49,8 @@ const testSameBreakpoint = Task.async(function* () { column: 6 }; - let [firstResponse, firstBpClient] = yield setBreakpoint(gThreadClient, columnLocation); - let [secondResponse, secondBpClient] = yield setBreakpoint(gThreadClient, columnLocation); + [firstResponse, firstBpClient] = yield setBreakpoint(gThreadClient, columnLocation); + [secondResponse, secondBpClient] = yield setBreakpoint(gThreadClient, columnLocation); do_check_eq(secondBpClient.actor, secondBpClient.actor, "Should get the same actor column breakpoints"); @@ -69,4 +69,4 @@ function evalCode() { SOURCE_URL, 1 ); -} \ No newline at end of file +} diff --git a/toolkit/devtools/tests/unit/test_consoleID.js b/toolkit/devtools/tests/unit/test_consoleID.js index 941aa5192d6..9fb43b2df59 100644 --- a/toolkit/devtools/tests/unit/test_consoleID.js +++ b/toolkit/devtools/tests/unit/test_consoleID.js @@ -70,7 +70,7 @@ function run_test() { listener = new ConsoleAPIListener(null, callback, "foo"); listener.init(); - let messages = listener.getCachedMessages(); + messages = listener.getCachedMessages(); seenTypes = 0; seenMessages = 0; diff --git a/toolkit/modules/tests/browser/browser_Geometry.js b/toolkit/modules/tests/browser/browser_Geometry.js index 0a0cd82bce2..e656320105c 100644 --- a/toolkit/modules/tests/browser/browser_Geometry.js +++ b/toolkit/modules/tests/browser/browser_Geometry.js @@ -30,9 +30,9 @@ let tests = { testIsEmpty: function() { let r = new Rect(0, 0, 0, 10); ok(r.isEmpty(), "rect with nonpositive width is empty"); - let r = new Rect(0, 0, 10, 0); + r = new Rect(0, 0, 10, 0); ok(r.isEmpty(), "rect with nonpositive height is empty"); - let r = new Rect(0, 0, 10, 10); + r = new Rect(0, 0, 10, 10); ok(!r.isEmpty(), "rect with positive dimensions is not empty"); }, @@ -42,18 +42,18 @@ let tests = { r1.restrictTo(r2); ok(r1.equals(new Rect(50, 50, 60, 60)), "intersection is non-empty"); - let r1 = new Rect(10, 10, 100, 100); - let r2 = new Rect(120, 120, 100, 100); + r1 = new Rect(10, 10, 100, 100); + r2 = new Rect(120, 120, 100, 100); r1.restrictTo(r2); ok(r1.isEmpty(), "intersection is empty"); - let r1 = new Rect(10, 10, 100, 100); - let r2 = new Rect(0, 0, 0, 0); + r1 = new Rect(10, 10, 100, 100); + r2 = new Rect(0, 0, 0, 0); r1.restrictTo(r2); ok(r1.isEmpty(), "intersection of rect and empty is empty"); - let r1 = new Rect(0, 0, 0, 0); - let r2 = new Rect(0, 0, 0, 0); + r1 = new Rect(0, 0, 0, 0); + r2 = new Rect(0, 0, 0, 0); r1.restrictTo(r2); ok(r1.isEmpty(), "intersection of empty and empty is empty"); }, @@ -64,18 +64,18 @@ let tests = { r1.expandToContain(r2); ok(r1.equals(new Rect(10, 10, 140, 140)), "correct expandToContain on intersecting rectangles"); - let r1 = new Rect(10, 10, 100, 100); - let r2 = new Rect(120, 120, 100, 100); + r1 = new Rect(10, 10, 100, 100); + r2 = new Rect(120, 120, 100, 100); r1.expandToContain(r2); ok(r1.equals(new Rect(10, 10, 210, 210)), "correct expandToContain on non-intersecting rectangles"); - let r1 = new Rect(10, 10, 100, 100); - let r2 = new Rect(0, 0, 0, 0); + r1 = new Rect(10, 10, 100, 100); + r2 = new Rect(0, 0, 0, 0); r1.expandToContain(r2); ok(r1.equals(new Rect(10, 10, 100, 100)), "expandToContain of rect and empty is rect"); - let r1 = new Rect(10, 10, 0, 0); - let r2 = new Rect(0, 0, 0, 0); + r1 = new Rect(10, 10, 0, 0); + r2 = new Rect(0, 0, 0, 0); r1.expandToContain(r2); ok(r1.isEmpty(), "expandToContain of empty and empty is empty"); }, @@ -91,16 +91,16 @@ let tests = { let r2 = new Rect(500, 500, 100, 100); ok(equals(r1.subtract(r2), [r1]), "subtract area outside of region yields same region"); - let r1 = new Rect(0, 0, 100, 100); - let r2 = new Rect(-10, -10, 50, 120); + r1 = new Rect(0, 0, 100, 100); + r2 = new Rect(-10, -10, 50, 120); ok(equals(r1.subtract(r2), [new Rect(40, 0, 60, 100)]), "subtracting vertical bar from edge leaves one rect"); - let r1 = new Rect(0, 0, 100, 100); - let r2 = new Rect(-10, -10, 120, 50); + r1 = new Rect(0, 0, 100, 100); + r2 = new Rect(-10, -10, 120, 50); ok(equals(r1.subtract(r2), [new Rect(0, 40, 100, 60)]), "subtracting horizontal bar from edge leaves one rect"); - let r1 = new Rect(0, 0, 100, 100); - let r2 = new Rect(40, 40, 20, 20); + r1 = new Rect(0, 0, 100, 100); + r2 = new Rect(40, 40, 20, 20); ok(equals(r1.subtract(r2), [ new Rect(0, 0, 40, 100), new Rect(40, 0, 20, 40), diff --git a/toolkit/modules/tests/xpcshell/test_Log.js b/toolkit/modules/tests/xpcshell/test_Log.js index 4ea90e2ddfa..d995d0ece8e 100644 --- a/toolkit/modules/tests/xpcshell/test_Log.js +++ b/toolkit/modules/tests/xpcshell/test_Log.js @@ -169,7 +169,7 @@ add_task(function test_StructuredLogCommands() { do_check_true(errored); } - let errored = false; + errored = false; try { logger.logStructured("message_action", "invalid params"); } catch (e) { @@ -181,8 +181,8 @@ add_task(function test_StructuredLogCommands() { // Logging with unstructured interface should produce the same messages // as the structured interface for these cases. - let appender = new MockAppender(new Log.StructuredFormatter()); - let logger = Log.repository.getLogger("test.StructuredOutput1"); + appender = new MockAppender(new Log.StructuredFormatter()); + logger = Log.repository.getLogger("test.StructuredOutput1"); messageOne._namespace = "test.StructuredOutput1"; messageTwo._namespace = "test.StructuredOutput1"; logger.addAppender(appender); @@ -377,7 +377,7 @@ add_task(function log_message_with_params() { 'JSON is {"sneaky":"value"}'); // Fall back to .toSource() if JSON.stringify() fails on an object. - let ob = function() {}; + ob = function() {}; ob.toJSON = function() {throw "oh noes JSON"}; do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}), 'Fail is (function () {})'); @@ -430,19 +430,19 @@ add_task(function log_message_with_params() { let str = formatMessage("Exception is ${}", err); do_check_true(str.contains('Exception is [Exception... "test exception"')); do_check_true(str.contains("(NS_ERROR_FAILURE)")); - let str = formatMessage("Exception is", err); + str = formatMessage("Exception is", err); do_check_true(str.contains('Exception is: [Exception... "test exception"')); - let str = formatMessage("Exception is ${error}", {error: err}); + str = formatMessage("Exception is ${error}", {error: err}); do_check_true(str.contains('Exception is [Exception... "test exception"')); - let str = formatMessage("Exception is", {_error: err}); + str = formatMessage("Exception is", {_error: err}); do_print(str); // Exceptions buried inside objects are formatted badly. do_check_true(str.contains('Exception is: {"_error":{}')); // If the message text is null, the message contains only the formatted params object. - let str = formatMessage(null, err); + str = formatMessage(null, err); do_check_true(str.startsWith('[Exception... "test exception"')); // If the text is null and 'params' is a String object, the message is exactly that string. - let str = formatMessage(null, new String("String in place of params")); + str = formatMessage(null, new String("String in place of params")); do_check_eq(str, "String in place of params"); // We use object.valueOf() internally; make sure a broken valueOf() method diff --git a/toolkit/modules/tests/xpcshell/test_sqlite.js b/toolkit/modules/tests/xpcshell/test_sqlite.js index 611c4e84d78..58407e7821e 100644 --- a/toolkit/modules/tests/xpcshell/test_sqlite.js +++ b/toolkit/modules/tests/xpcshell/test_sqlite.js @@ -711,7 +711,7 @@ add_task(function test_programmatic_binding_transaction_partial_rollback() { // Insert multiple rows. mozStorage will want to start a transaction. // One of the inserts will fail, so the transaction should be rolled back. - let result = yield c.execute(sql, bindings); + result = yield c.execute(sql, bindings); secondSucceeded = true; }); } catch (ex) { diff --git a/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js b/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js index 47c317b2fca..35e57e53f69 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js +++ b/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js @@ -232,6 +232,8 @@ function* check_addons_uninstalled(aAddonList) { // For this test, addon8 became disabled during update and addon9 was previously disabled, // so addon8 should update and addon9 should not add_task(function cancel_during_repopulate() { + let a5, a8, a9, a10; + Services.prefs.setBoolPref(PREF_STRICT_COMPAT, true); Services.prefs.setCharPref(PREF_MIN_PLATFORM_COMPAT, "0"); Services.prefs.setCharPref(PREF_UPDATEURL, TESTROOT + "missing.rdf"); @@ -250,7 +252,7 @@ add_task(function cancel_during_repopulate() { Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true); Services.prefs.setCharPref(PREF_GETADDONS_BYIDS, TESTROOT + "browser_bug557956.xml"); - let [a5, a8, a9] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id]); + [a5, a8, a9] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id]); ok(!a5.isCompatible, "addon5 should not be compatible"); ok(!a8.isCompatible, "addon8 should not be compatible"); ok(!a9.isCompatible, "addon9 should not be compatible"); @@ -279,7 +281,7 @@ add_task(function cancel_during_repopulate() { // addon8 should have updated in the background, // addon9 was listed as previously disabled so it should not have updated - let [a5, a8, a9, a10] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id, ao10.id]); + [a5, a8, a9, a10] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id, ao10.id]); ok(a5.isCompatible, "addon5 should be compatible"); ok(a8.isCompatible, "addon8 should have been upgraded"); ok(!a9.isCompatible, "addon9 should not have been upgraded"); @@ -295,6 +297,8 @@ add_task(function cancel_during_repopulate() { // For this test, both addon8 and addon9 were disabled by this update, but addon8 // is set to not auto-update, so only addon9 should update in the background add_task(function cancel_during_findUpdates() { + let a5, a8, a9; + Services.prefs.setBoolPref(PREF_STRICT_COMPAT, true); Services.prefs.setCharPref(PREF_MIN_PLATFORM_COMPAT, "0"); @@ -310,7 +314,7 @@ add_task(function cancel_during_findUpdates() { yield promise_install_test_addons(addonList, TESTROOT + "cancelCompatCheck.sjs"); - let [a8] = yield promise_addons_by_ids([ao8.id]); + [a8] = yield promise_addons_by_ids([ao8.id]); a8.applyBackgroundUpdates = AddonManager.AUTOUPDATE_DISABLE; Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true); @@ -334,7 +338,7 @@ add_task(function cancel_during_findUpdates() { // addon8 should have updated in the background, // addon9 was listed as previously disabled so it should not have updated - let [a5, a8, a9] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id]); + [a5, a8, a9] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id]); ok(a5.isCompatible, "addon5 should be compatible"); ok(!a8.isCompatible, "addon8 should not have been upgraded"); ok(a9.isCompatible, "addon9 should have been upgraded"); @@ -353,6 +357,8 @@ add_task(function cancel_during_findUpdates() { // Same conditions as the previous test - addon8 and addon9 have updates available, // addon8 is set to not auto-update so only addon9 should become compatible add_task(function cancel_mismatch() { + let a3, a5, a7, a8, a9; + Services.prefs.setBoolPref(PREF_STRICT_COMPAT, true); Services.prefs.setCharPref(PREF_MIN_PLATFORM_COMPAT, "0"); @@ -367,11 +373,11 @@ add_task(function cancel_mismatch() { yield promise_install_test_addons(addonList, TESTROOT + "cancelCompatCheck.sjs"); - let [a8] = yield promise_addons_by_ids([ao8.id]); + [a8] = yield promise_addons_by_ids([ao8.id]); a8.applyBackgroundUpdates = AddonManager.AUTOUPDATE_DISABLE; // Check that the addons start out not compatible. - let [a3, a7, a8, a9] = yield promise_addons_by_ids([ao3.id, ao7.id, ao8.id, ao9.id]); + [a3, a7, a8, a9] = yield promise_addons_by_ids([ao3.id, ao7.id, ao8.id, ao9.id]); ok(!a3.isCompatible, "addon3 should not be compatible"); ok(!a7.isCompatible, "addon7 should not be compatible"); ok(!a8.isCompatible, "addon8 should not be compatible"); @@ -392,7 +398,7 @@ add_task(function cancel_mismatch() { // addon8 should not have updated in the background, // addon9 was listed as previously disabled so it should not have updated - let [a5, a8, a9] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id]); + [a5, a8, a9] = yield promise_addons_by_ids([ao5.id, ao8.id, ao9.id]); ok(a5.isCompatible, "addon5 should be compatible"); ok(!a8.isCompatible, "addon8 should not have been upgraded"); ok(a9.isCompatible, "addon9 should have been upgraded"); @@ -410,6 +416,8 @@ add_task(function cancel_mismatch() { // Cancelling during the 'mismatch' screen with only add-ons that have // no updates available add_task(function cancel_mismatch_no_updates() { + let a3, a5, a6 + Services.prefs.setBoolPref(PREF_STRICT_COMPAT, true); Services.prefs.setCharPref(PREF_MIN_PLATFORM_COMPAT, "0"); @@ -421,7 +429,7 @@ add_task(function cancel_mismatch_no_updates() { TESTROOT + "cancelCompatCheck.sjs"); // Check that the addons start out not compatible. - let [a3, a5, a6] = yield promise_addons_by_ids([ao3.id, ao5.id, ao6.id]); + [a3, a5, a6] = yield promise_addons_by_ids([ao3.id, ao5.id, ao6.id]); ok(!a3.isCompatible, "addon3 should not be compatible"); ok(!a5.isCompatible, "addon5 should not be compatible"); ok(!a6.isCompatible, "addon6 should not be compatible"); @@ -437,7 +445,7 @@ add_task(function cancel_mismatch_no_updates() { yield promise_window_close(compatWindow); - let [a3, a5, a6] = yield promise_addons_by_ids([ao3.id, ao5.id, ao6.id]); + [a3, a5, a6] = yield promise_addons_by_ids([ao3.id, ao5.id, ao6.id]); ok(!a3.isCompatible, "addon3 should not be compatible"); ok(a5.isCompatible, "addon5 should have become compatible"); ok(a6.isCompatible, "addon6 should have become compatible"); diff --git a/toolkit/mozapps/extensions/test/browser/browser_experiments.js b/toolkit/mozapps/extensions/test/browser/browser_experiments.js index c8202e632e4..620d37fd22e 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_experiments.js +++ b/toolkit/mozapps/extensions/test/browser/browser_experiments.js @@ -582,7 +582,7 @@ add_task(function testDetailView() { yield gCategoryUtilities.openType("experiment"); yield openDetailsView("experiment-3"); - let el = gManagerWindow.document.getElementById("detail-experiment-state"); + el = gManagerWindow.document.getElementById("detail-experiment-state"); is_element_visible(el, "Experiment state label should be visible."); if (gIsEnUsLocale) { Assert.equal(el.value, "Complete"); diff --git a/toolkit/mozapps/extensions/test/browser/browser_openH264.js b/toolkit/mozapps/extensions/test/browser/browser_openH264.js index 2be43fd318d..4a8d9bc23a1 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_openH264.js +++ b/toolkit/mozapps/extensions/test/browser/browser_openH264.js @@ -249,7 +249,7 @@ add_task(function* testUpdateButton() { wait_for_view_load(gManagerWindow, deferred.resolve); yield deferred.promise; - let button = doc.getElementById("detail-findUpdates-btn"); + button = doc.getElementById("detail-findUpdates-btn"); Assert.ok(button != null, "Got detail-findUpdates-btn"); EventUtils.synthesizeMouseAtCenter(button, { clickCount: 1 }, gManagerWindow); yield gInstallDeferred.promise; diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js b/toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js index 1335d978c82..dfd86a31b79 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js @@ -793,7 +793,7 @@ add_task(function* run_blocklist_update_test() { yield Pload_blocklist("blocklist_update2.xml"); yield promiseRestartManager(); - let [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); + [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); check_addon(s1, "1.0", true, true, Ci.nsIBlocklistService.STATE_SOFTBLOCKED); check_addon(s2, "1.0", true, true, Ci.nsIBlocklistService.STATE_SOFTBLOCKED); @@ -815,7 +815,7 @@ add_task(function* run_blocklist_update_test() { yield Pload_blocklist("blocklist_update2.xml"); yield promiseRestartManager(); - let [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); + [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); check_addon(s1, "1.0", true, true, Ci.nsIBlocklistService.STATE_SOFTBLOCKED); check_addon(s2, "1.0", true, false, Ci.nsIBlocklistService.STATE_SOFTBLOCKED); @@ -829,7 +829,7 @@ add_task(function* run_blocklist_update_test() { yield Pload_blocklist("blocklist_update1.xml"); yield promiseRestartManager(); - let [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); + [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); check_addon(s1, "1.0", false, false, Ci.nsIBlocklistService.STATE_NOT_BLOCKED); check_addon(s2, "1.0", true, false, Ci.nsIBlocklistService.STATE_NOT_BLOCKED); @@ -1098,7 +1098,7 @@ add_task(function* run_background_update_test() { yield Pbackground_update(); yield promiseRestartManager(); - let [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); + [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); check_addon(s1, "1.0", false, false, Ci.nsIBlocklistService.STATE_NOT_BLOCKED); check_addon(s2, "1.0", false, false, Ci.nsIBlocklistService.STATE_NOT_BLOCKED); @@ -1155,7 +1155,7 @@ add_task(function* run_background_update_2_test() { yield Pbackground_update(); yield promiseRestartManager(); - let [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); + [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); check_addon(s1, "1.0", false, false, Ci.nsIBlocklistService.STATE_NOT_BLOCKED); check_addon(s2, "1.0", true, false, Ci.nsIBlocklistService.STATE_NOT_BLOCKED); @@ -1198,7 +1198,7 @@ add_task(function* run_manual_update_test() { yield Pmanual_update("2"); yield promiseRestartManager(); - let [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); + [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); check_addon(s1, "2.0", true, true, Ci.nsIBlocklistService.STATE_SOFTBLOCKED); check_addon(s2, "2.0", true, false, Ci.nsIBlocklistService.STATE_SOFTBLOCKED); @@ -1212,7 +1212,7 @@ add_task(function* run_manual_update_test() { yield Pmanual_update("3"); yield promiseRestartManager(); - let [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); + [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); check_addon(s1, "3.0", false, false, Ci.nsIBlocklistService.STATE_NOT_BLOCKED); check_addon(s2, "3.0", true, false, Ci.nsIBlocklistService.STATE_NOT_BLOCKED); @@ -1268,7 +1268,7 @@ add_task(function* run_manual_update_2_test() { yield Pmanual_update("2"); yield promiseRestartManager(); - let [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); + [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); check_addon(s1, "2.0", true, true, Ci.nsIBlocklistService.STATE_SOFTBLOCKED); check_addon(s2, "2.0", true, false, Ci.nsIBlocklistService.STATE_SOFTBLOCKED); @@ -1282,7 +1282,7 @@ add_task(function* run_manual_update_2_test() { yield Pmanual_update("3"); yield promiseRestartManager(); - let [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); + [s1, s2, s3, s4, s5, h, r] = yield promiseAddonsByIDs(ADDON_IDS); check_addon(s1, "3.0", false, false, Ci.nsIBlocklistService.STATE_NOT_BLOCKED); check_addon(s2, "3.0", true, false, Ci.nsIBlocklistService.STATE_NOT_BLOCKED); diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_migrate1.js b/toolkit/mozapps/extensions/test/xpcshell/test_migrate1.js index ffef6b7d169..8ac5490b4a7 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_migrate1.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_migrate1.js @@ -119,8 +119,8 @@ function run_test() { stagedXPIs.append("addon8@tests.mozilla.org"); stagedXPIs.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); - let addon7 = do_get_addon("test_migrate8"); - addon7.copyTo(stagedXPIs, "tmp.xpi"); + let addon8 = do_get_addon("test_migrate8"); + addon8.copyTo(stagedXPIs, "tmp.xpi"); stagedXPIs = stagedXPIs.parent; let old = do_get_file("data/test_migrate.rdf"); diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_overrideblocklist.js b/toolkit/mozapps/extensions/test/xpcshell/test_overrideblocklist.js index 81cf2c9aaf1..8a6bedea162 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_overrideblocklist.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_overrideblocklist.js @@ -187,8 +187,8 @@ add_test(function test_missing() { startupManager(false); reloadBlocklist(); - let blocklist = AM_Cc["@mozilla.org/extensions/blocklist;1"]. - getService(AM_Ci.nsIBlocklistService); + blocklist = AM_Cc["@mozilla.org/extensions/blocklist;1"]. + getService(AM_Ci.nsIBlocklistService); do_check_false(blocklist.isAddonBlocklisted(invalidAddon)); do_check_false(blocklist.isAddonBlocklisted(ancientAddon)); do_check_true(blocklist.isAddonBlocklisted(oldAddon)); diff --git a/toolkit/mozapps/update/tests/unit_aus_update/uiOnlyAllowOneWindow.js b/toolkit/mozapps/update/tests/unit_aus_update/uiOnlyAllowOneWindow.js index 1b227b0bf25..46a47c160e8 100644 --- a/toolkit/mozapps/update/tests/unit_aus_update/uiOnlyAllowOneWindow.js +++ b/toolkit/mozapps/update/tests/unit_aus_update/uiOnlyAllowOneWindow.js @@ -52,7 +52,7 @@ function run_test() { // didn't throw and otherwise it would report no tests run. do_check_true(true); - let registrar = Components.manager.QueryInterface(AUS_Ci.nsIComponentRegistrar); + registrar = Components.manager.QueryInterface(AUS_Ci.nsIComponentRegistrar); registrar.unregisterFactory(Components.ID("{1dfeb90a-2193-45d5-9cb8-864928b2af55}"), WindowWatcherFactory); registrar.unregisterFactory(Components.ID("{1dfeb90a-2193-45d5-9cb8-864928b2af56}"), diff --git a/toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js b/toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js index 53dc418dcda..174740dffa0 100644 --- a/toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js +++ b/toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js @@ -57,7 +57,7 @@ function run_test() { // didn't throw and otherwise it would report no tests run. do_check_true(true); - let registrar = Components.manager.QueryInterface(AUS_Ci.nsIComponentRegistrar); + registrar = Components.manager.QueryInterface(AUS_Ci.nsIComponentRegistrar); registrar.unregisterFactory(Components.ID("{1dfeb90a-2193-45d5-9cb8-864928b2af55}"), WindowWatcherFactory); diff --git a/toolkit/profile/test/test_create_profile.xul b/toolkit/profile/test/test_create_profile.xul index 9d65051fc3d..040b1256b2c 100644 --- a/toolkit/profile/test/test_create_profile.xul +++ b/toolkit/profile/test/test_create_profile.xul @@ -119,7 +119,7 @@ function createProfile(profileName) { profile.remove(true); // Create with non-null aRootDir - let profile = gProfileService.createProfile(profileDir, profileName); + profile = gProfileService.createProfile(profileDir, profileName); let localProfileDir = profile.localDir; ok(gDefaultLocalProfileParent.contains(localProfileDir, false),