diff --git a/dom/tests/browser/browser_ConsoleStoragePBTest_perwindowpb.js b/dom/tests/browser/browser_ConsoleStoragePBTest_perwindowpb.js index 1be2191f19de..1efa017309c7 100644 --- a/dom/tests/browser/browser_ConsoleStoragePBTest_perwindowpb.js +++ b/dom/tests/browser/browser_ConsoleStoragePBTest_perwindowpb.js @@ -66,7 +66,7 @@ function test() { // execute should only be called when need, like when you are opening // web pages on the test. If calling executeSoon() is not necesary, then // call whenNewWindowLoaded() instead of testOnWindow() on your test. - executeSoon(function() aCallback(aWin)); + executeSoon(() => aCallback(aWin)); }); }; diff --git a/dom/tests/browser/browser_localStorage_privatestorageevent.js b/dom/tests/browser/browser_localStorage_privatestorageevent.js index 54ae7f0c9617..4e044dfadd42 100644 --- a/dom/tests/browser/browser_localStorage_privatestorageevent.js +++ b/dom/tests/browser/browser_localStorage_privatestorageevent.js @@ -13,7 +13,7 @@ function test() { return; } win.removeEventListener("DOMContentLoaded", onInnerLoad, true); - executeSoon(function() callback(win)); + executeSoon(() => callback(win)); }, true); if (!options) { win.gBrowser.loadURI("about:blank"); diff --git a/dom/tests/mochitest/bugs/test_bug642026.html b/dom/tests/mochitest/bugs/test_bug642026.html index 8887ee603f3b..635c4c5db3f0 100644 --- a/dom/tests/mochitest/bugs/test_bug642026.html +++ b/dom/tests/mochitest/bugs/test_bug642026.html @@ -48,7 +48,7 @@ for (var p in result) { result1[result[p]] = true; } -ok(expResult.every(function(c) result1[c]), "all of the standard classes have been enumerated"); +ok(expResult.every(c => result1[c]), "all of the standard classes have been enumerated"); diff --git a/dom/tests/mochitest/chrome/focus_frameset.html b/dom/tests/mochitest/chrome/focus_frameset.html index 854f2858b5a0..32cfa5cdb449 100644 --- a/dom/tests/mochitest/chrome/focus_frameset.html +++ b/dom/tests/mochitest/chrome/focus_frameset.html @@ -4,7 +4,7 @@ src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"> diff --git a/dom/tests/mochitest/general/test_domWindowUtils_scrollbarSize.html b/dom/tests/mochitest/general/test_domWindowUtils_scrollbarSize.html index efd5d05d5fa8..b440870fd7ef 100644 --- a/dom/tests/mochitest/general/test_domWindowUtils_scrollbarSize.html +++ b/dom/tests/mochitest/general/test_domWindowUtils_scrollbarSize.html @@ -18,7 +18,7 @@ return doc.getElementById("float").offsetWidth > 200; } - checkScrollbarSizeFlush(utils, function (w, h) w == 0 && h == 0, + checkScrollbarSizeFlush(utils, (w, h) => w == 0 && h == 0, "[overflow=hidden] corrrect scrollbar size after flushing"); // Some platforms (esp. mobile) may have floating scrollbars that don't @@ -27,17 +27,17 @@ let body = doc.querySelector("body"); body.style.overflowY = "scroll"; - checkScrollbarSize(utils, function (w, h) w == 0 && h == 0, + checkScrollbarSize(utils, (w, h) => w == 0 && h == 0, "[overflowY=scroll] correct scrollbar size w/o flushing"); - checkScrollbarSizeFlush(utils, function (w, h) w > 0 && h == 0, + checkScrollbarSizeFlush(utils, (w, h) => w > 0 && h == 0, "[overflowY=scroll] correct scrollbar size after flushing"); body.style.overflowX = "scroll"; - checkScrollbarSize(utils, function (w, h) w > 0 && h == 0, + checkScrollbarSize(utils, (w, h) => w > 0 && h == 0, "[overflowXY=scroll] correct scrollbar size w/o flushing"); - checkScrollbarSizeFlush(utils, function (w, h) w > 0 && h > 0, + checkScrollbarSizeFlush(utils, (w, h) => w > 0 && h > 0, "[overflowXY=scroll] correct scrollbar size after flushing"); } diff --git a/dom/tests/mochitest/localstorage/test_localStorageBasePrivateBrowsing_perwindowpb.html b/dom/tests/mochitest/localstorage/test_localStorageBasePrivateBrowsing_perwindowpb.html index b342dc002748..dbcf01fc2f13 100644 --- a/dom/tests/mochitest/localstorage/test_localStorageBasePrivateBrowsing_perwindowpb.html +++ b/dom/tests/mochitest/localstorage/test_localStorageBasePrivateBrowsing_perwindowpb.html @@ -246,7 +246,7 @@ function doTest() { prefBranch.clearUserPref("browser.startup.homepage_override.mstone"); SimpleTest.finish(); }; - SimpleTest.executeSoon(function() testOnWindow(true, callback)); + SimpleTest.executeSoon(() => testOnWindow(true, callback)); }); }); } diff --git a/dom/tests/mochitest/localstorage/test_localStorageQuotaPrivateBrowsing_perwindowpb.html b/dom/tests/mochitest/localstorage/test_localStorageQuotaPrivateBrowsing_perwindowpb.html index 6abd66e14d7f..08726be25d69 100644 --- a/dom/tests/mochitest/localstorage/test_localStorageQuotaPrivateBrowsing_perwindowpb.html +++ b/dom/tests/mochitest/localstorage/test_localStorageQuotaPrivateBrowsing_perwindowpb.html @@ -39,7 +39,7 @@ function startTest() { }, false); slave = aWindow.content.frames[0]; - SimpleTest.waitForFocus(function() doNextTest(aWindow), aWindow); + SimpleTest.waitForFocus(() => doNextTest(aWindow), aWindow); }); }