Bug 1508817 - Enable ESLint for docshell (automatic changes). r=Standard8,bzbarsky
authorMellina Yonashiro <yonashiro.mellina@gmail.com>
Fri, 22 Mar 2019 18:13:25 +0000
changeset 465742 b338bce4319eb9fc5fcb86ab2c89f1b6992e9050
parent 465741 e94c53affa9ff5ba364628dd147323354785d6b5
child 465743 cb0dd2254bc35f7c7f52ed546f9461a00dc7786c
push id35746
push usershindli@mozilla.com
push dateSat, 23 Mar 2019 09:46:24 +0000
treeherdermozilla-central@02b7484f316b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, bzbarsky
bugs1508817
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508817 - Enable ESLint for docshell (automatic changes). r=Standard8,bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D23037
docshell/test/browser/browser_browsingContext-01.js
docshell/test/browser/browser_browsingContext-02.js
docshell/test/browser/browser_browsingContext-03.js
docshell/test/browser/browser_bug1206879.js
docshell/test/browser/browser_bug1328501.js
docshell/test/browser/browser_bug1347823.js
docshell/test/browser/browser_bug1415918_beforeunload_options.js
docshell/test/browser/browser_bug234628-1.js
docshell/test/browser/browser_bug234628-10.js
docshell/test/browser/browser_bug234628-11.js
docshell/test/browser/browser_bug234628-2.js
docshell/test/browser/browser_bug234628-3.js
docshell/test/browser/browser_bug234628-4.js
docshell/test/browser/browser_bug234628-5.js
docshell/test/browser/browser_bug234628-6.js
docshell/test/browser/browser_bug234628-7.js
docshell/test/browser/browser_bug234628-8.js
docshell/test/browser/browser_bug234628-9.js
docshell/test/browser/browser_bug388121-2.js
docshell/test/browser/browser_bug420605.js
docshell/test/browser/browser_bug422543.js
docshell/test/browser/browser_bug441169.js
docshell/test/browser/browser_bug503832.js
docshell/test/browser/browser_bug554155.js
docshell/test/browser/browser_bug655270.js
docshell/test/browser/browser_bug655273.js
docshell/test/browser/browser_bug670318.js
docshell/test/browser/browser_bug673467.js
docshell/test/browser/browser_bug92473.js
docshell/test/browser/browser_click_link_within_view_source.js
docshell/test/browser/browser_data_load_inherit_csp.js
docshell/test/browser/browser_history_triggeringprincipal_viewsource.js
docshell/test/browser/browser_loadDisallowInherit.js
docshell/test/browser/browser_loadURI.js
docshell/test/browser/browser_onbeforeunload_navigation.js
docshell/test/browser/browser_search_notification.js
docshell/test/browser/browser_timelineMarkers-02.js
docshell/test/browser/browser_timelineMarkers-05.js
docshell/test/browser/browser_timelineMarkers-frame-02.js
docshell/test/browser/browser_timelineMarkers-frame-03.js
docshell/test/browser/browser_timelineMarkers-frame-04.js
docshell/test/browser/browser_timelineMarkers-frame-05.js
docshell/test/browser/browser_uriFixupAlternateRedirects.js
docshell/test/browser/file_bug1046022.html
docshell/test/browser/file_bug1328501.html
docshell/test/browser/file_bug1328501_framescript.js
docshell/test/browser/file_bug1415918_beforeunload.html
docshell/test/browser/file_bug1415918_beforeunload_2.html
docshell/test/browser/file_bug1415918_beforeunload_3.html
docshell/test/browser/file_bug1415918_beforeunload_iframe.html
docshell/test/browser/file_bug1415918_beforeunload_iframe_2.html
docshell/test/browser/file_bug422543_script.js
docshell/test/browser/file_bug670318.html
docshell/test/browser/frame-head.js
docshell/test/browser/onload_message.html
docshell/test/browser/onpageshow_message.html
docshell/test/browser/timelineMarkers-04.html
docshell/test/iframesandbox/file_child_navigation_by_location.html
docshell/test/iframesandbox/file_top_navigation_by_location_exotic.html
docshell/test/iframesandbox/test_child_navigation_by_location.html
docshell/test/iframesandbox/test_marquee_event_handlers.html
docshell/test/iframesandbox/test_other_auxiliary_navigation_by_location.html
docshell/test/iframesandbox/test_our_auxiliary_navigation_by_location.html
docshell/test/iframesandbox/test_parent_navigation_by_location.html
docshell/test/iframesandbox/test_sibling_navigation_by_location.html
docshell/test/iframesandbox/test_top_navigation_by_location.html
docshell/test/iframesandbox/test_top_navigation_by_location_exotic.html
docshell/test/mochitest/bug570341_recordevents.html
docshell/test/mochitest/file_bug1450164.html
docshell/test/mochitest/file_bug385434_3.html
docshell/test/mochitest/file_bug598895_1.html
docshell/test/mochitest/file_bug598895_2.html
docshell/test/mochitest/file_bug637644_1.html
docshell/test/mochitest/file_bug637644_2.html
docshell/test/mochitest/file_bug660404-1.html
docshell/test/mochitest/file_bug668513.html
docshell/test/mochitest/file_bug675587.html
docshell/test/mochitest/file_close_onpagehide1.html
docshell/test/mochitest/file_close_onpagehide2.html
docshell/test/mochitest/test_anchor_scroll_after_document_open.html
docshell/test/mochitest/test_bfcache_plus_hash.html
docshell/test/mochitest/test_bug1045096.html
docshell/test/mochitest/test_bug1121701.html
docshell/test/mochitest/test_bug1151421.html
docshell/test/mochitest/test_bug1186774.html
docshell/test/mochitest/test_bug1450164.html
docshell/test/mochitest/test_bug1507702.html
docshell/test/mochitest/test_bug384014.html
docshell/test/mochitest/test_bug385434.html
docshell/test/mochitest/test_bug387979.html
docshell/test/mochitest/test_bug402210.html
docshell/test/mochitest/test_bug404548.html
docshell/test/mochitest/test_bug413310.html
docshell/test/mochitest/test_bug475636.html
docshell/test/mochitest/test_bug509055.html
docshell/test/mochitest/test_bug511449.html
docshell/test/mochitest/test_bug529119-1.html
docshell/test/mochitest/test_bug529119-2.html
docshell/test/mochitest/test_bug530396.html
docshell/test/mochitest/test_bug551225.html
docshell/test/mochitest/test_bug570341.html
docshell/test/mochitest/test_bug580069.html
docshell/test/mochitest/test_bug590573.html
docshell/test/mochitest/test_bug598895.html
docshell/test/mochitest/test_bug634834.html
docshell/test/mochitest/test_bug637644.html
docshell/test/mochitest/test_bug640387_1.html
docshell/test/mochitest/test_bug640387_2.html
docshell/test/mochitest/test_bug653741.html
docshell/test/mochitest/test_bug660404.html
docshell/test/mochitest/test_bug662170.html
docshell/test/mochitest/test_bug669671.html
docshell/test/mochitest/test_bug680257.html
docshell/test/mochitest/test_bug691547.html
docshell/test/mochitest/test_bug703855.html
docshell/test/mochitest/test_bug728939.html
docshell/test/mochitest/test_pushState_after_document_open.html
docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
--- a/docshell/test/browser/browser_browsingContext-01.js
+++ b/docshell/test/browser/browser_browsingContext-01.js
@@ -117,33 +117,33 @@ add_task(async function() {
 add_task(async function() {
   await BrowserTestUtils.withNewTab({ gBrowser, url: getRootDirectory(gTestPath).replace("chrome://mochitests/content", "http://example.com") + "dummy_page.html" },
     async function(browser) {
       let path = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "http://example.com");
       await ContentTask.spawn(browser, path, async function(path) {
         function waitForMessage(command) {
           let r;
           let p = new Promise(resolve => {
-            content.window.addEventListener('message', e => resolve({result: r, event: e}),
+            content.window.addEventListener("message", e => resolve({result: r, event: e}),
                                             {once: true});
           });
           r = command();
           return p;
         }
 
         // Open a new window and wait for the message.
         let { result: win, event: e1 } =
             await waitForMessage(
               _ => content.window.open(path + "onpageshow_message.html"));
 
         is(e1.data, "pageshow");
 
         {
           // Create, attach and load an iframe into the window's document.
-          let frame = win.document.createElement('iframe');
+          let frame = win.document.createElement("iframe");
           win.document.body.appendChild(frame);
           frame.src = "dummy_page.html";
           await ContentTaskUtils.waitForEvent(frame, "load");
         }
 
         is(win.frames.length, 1, "Here we should have an iframe");
 
         // The frame should have expected browsing context and docshell.
--- a/docshell/test/browser/browser_browsingContext-02.js
+++ b/docshell/test/browser/browser_browsingContext-02.js
@@ -11,50 +11,49 @@ add_task(async function() {
       const BASE2 = getRootDirectory(gTestPath)
             .replace("chrome://mochitests/content", "http://test1.example.com");
       const URL = BASE1 + "onload_message.html";
       let sixth = BrowserTestUtils.waitForNewTab(gBrowser, URL + "#sixth", true, true);
       let seventh = BrowserTestUtils.waitForNewTab(gBrowser, URL + "#seventh", true, true);
       await ContentTask.spawn(browser, {base1: BASE1, base2: BASE2},
                               async function({base1, base2}) {
         let top = content.window;
-        top.name = 'top';
+        top.name = "top";
         top.location.href += "#top";
 
         let contexts = {
           top: top.location.href,
           first: base1 + "dummy_page.html#first",
           third: base2 + "dummy_page.html#third",
           second: base1 + "dummy_page.html#second",
           fourth: base2 + "dummy_page.html#fourth",
           fifth: base1 + "dummy_page.html#fifth",
           sixth: base1 + "onload_message.html#sixth",
-          seventh: base1 + "onload_message.html#seventh"
+          seventh: base1 + "onload_message.html#seventh",
         };
 
         function addFrame(target, name) {
           let doc = (target.contentWindow || target).document;
-          let frame = doc.createElement('iframe');
-          let p = new Promise(resolve => (frame.onload = () =>resolve(frame)));
+          let frame = doc.createElement("iframe");
+          let p = new Promise(resolve => (frame.onload = () => resolve(frame)));
           doc.body.appendChild(frame);
           frame.name = name;
           frame.src = contexts[name];
           return p;
         }
 
         function addWindow(target, name, {options, resolve}) {
           var win = target.contentWindow.open(contexts[name], name, options);
 
           if (resolve) {
             return new Promise(
                 resolve => target.contentWindow.addEventListener(
-                    'message', () => resolve(win)));
-          } else {
-            return Promise.resolve({name: name});
+                    "message", () => resolve(win)));
           }
+          return Promise.resolve({name});
         }
 
         // We're going to create a tree that looks like the
         // following.
         //
         //           top          sixth    seventh
         //          /   \
         //         /     \        /
@@ -76,39 +75,39 @@ add_task(async function() {
 
         function bc(frame) {
           return (frame.contentWindow || frame).docShell.browsingContext;
         }
 
         function reachable(start, targets) {
           for (let target of targets) {
             is(bc(start).findWithName(target.name), bc(target),
-               [bc(start).name, 'can reach', target.name].join(' '));
+               [bc(start).name, "can reach", target.name].join(" "));
           }
         }
 
         function unreachable(start, target) {
           is(bc(start).findWithName(target.name), null,
-             [bc(start).name, "can't reach", target.name].join(' '));
+             [bc(start).name, "can't reach", target.name].join(" "));
         }
 
-        let first = await addFrame(top, 'first');
-        info('first');
-        let second = await addFrame(top, 'second');
-        info('second');
-        let third = await addFrame(first, 'third');
-        info('third');
-        let fourth = await addFrame(first, 'fourth');
-        info('fourth');
-        let fifth = await addFrame(fourth, 'fifth');
-        info('fifth');
-        let sixth = await addWindow(fourth, 'sixth', { resolve: true });
-        info('sixth');
-        let seventh = await addWindow(fourth, 'seventh', { options: ['noopener'] });
-        info('seventh');
+        let first = await addFrame(top, "first");
+        info("first");
+        let second = await addFrame(top, "second");
+        info("second");
+        let third = await addFrame(first, "third");
+        info("third");
+        let fourth = await addFrame(first, "fourth");
+        info("fourth");
+        let fifth = await addFrame(fourth, "fifth");
+        info("fifth");
+        let sixth = await addWindow(fourth, "sixth", { resolve: true });
+        info("sixth");
+        let seventh = await addWindow(fourth, "seventh", { options: ["noopener"] });
+        info("seventh");
 
         let frames = [top, first, second, third, fourth, fifth, sixth];
         for (let start of frames) {
           reachable(start, frames);
           unreachable(start, seventh);
         }
       });
 
--- a/docshell/test/browser/browser_browsingContext-03.js
+++ b/docshell/test/browser/browser_browsingContext-03.js
@@ -10,45 +10,45 @@ add_task(async function() {
             .replace("chrome://mochitests/content", "http://example.com");
       const BASE2 = getRootDirectory(gTestPath)
             .replace("chrome://mochitests/content", "http://test1.example.com");
       const URL = BASE1 + "onload_message.html";
       let sixth = BrowserTestUtils.waitForNewTab(gBrowser, URL + "#sixth", true, true);
       await ContentTask.spawn(browser, {base1: BASE1, base2: BASE2},
                               async function({base1, base2}) {
         let top = content.window;
-        top.name = 'top';
+        top.name = "top";
         top.location.href += "#top";
 
         let contexts = {
           top: top.location.href,
           first: base1 + "dummy_page.html#first",
           third: base2 + "dummy_page.html#third",
           second: base1 + "dummy_page.html#second",
           fourth: base2 + "dummy_page.html#fourth",
           fifth: base1 + "dummy_page.html#fifth",
           sixth: base1 + "onload_message.html#sixth",
         };
 
         function addFrame(target, name) {
           let doc = (target.contentWindow || target).document;
-          let frame = doc.createElement('iframe');
-          let p = new Promise(resolve => (frame.onload = () =>resolve(frame)));
+          let frame = doc.createElement("iframe");
+          let p = new Promise(resolve => (frame.onload = () => resolve(frame)));
           doc.body.appendChild(frame);
           frame.name = name;
           frame.src = contexts[name];
           return p;
         }
 
         function addWindow(target, name) {
           var win = target.contentWindow.open(contexts[name], name);
 
           return new Promise(
               resolve => target.contentWindow.addEventListener(
-                  'message', () => resolve(win)));
+                  "message", () => resolve(win)));
         }
 
         // Generate all lists of length length with every combination of
         // values in input
         function* generate(input, length) {
           let list = new Array(length);
 
           function* values(pos) {
@@ -86,22 +86,22 @@ add_task(async function() {
         // trick to ensure that is to give all frames the same name!
         // and ensure that the find algorithms return the same nodes
         // in the same order.
 
         function bc(frame) {
           return (frame.contentWindow || frame).docShell.browsingContext;
         }
 
-        let first = await addFrame(top, 'first');
-        let second = await addFrame(top, 'second');
-        let third = await addFrame(first, 'third');
-        let fourth = await addFrame(first, 'fourth');
-        let fifth = await addFrame(fourth, 'fifth');
-        let sixth = await addWindow(fourth, 'sixth');
+        let first = await addFrame(top, "first");
+        let second = await addFrame(top, "second");
+        let third = await addFrame(first, "third");
+        let fourth = await addFrame(first, "fourth");
+        let fifth = await addFrame(fourth, "fifth");
+        let sixth = await addWindow(fourth, "sixth");
 
         let frames = [top, first, second, third, fourth, fifth, sixth];
         let browsingContexts = frames.map(bc);
         let docShells = browsingContexts.map(context => context.docShell);
 
         ok(top.docShell instanceof Ci.nsIDocShellTreeItem,
            "When we remove nsIDocShellTreeItem this test should be removed");
 
@@ -109,28 +109,28 @@ add_task(async function() {
         // combinations of names for these browsing contexts using
         // "dummy" and "target" as possible name.
         for (let names of generate(["dummy", "target"], docShells.length)) {
           for (let i = names.length - 1; i >= 0; --i) {
             docShells[i].name = names[i];
           }
 
           for (let i = 0; i < docShells.length; ++i) {
-            let docShell = docShells[i].findItemWithName('target', null, null, false);
-            let browsingContext = browsingContexts[i].findWithName('target');
-            is (docShell ? docShell.browsingContext : null, browsingContext,
+            let docShell = docShells[i].findItemWithName("target", null, null, false);
+            let browsingContext = browsingContexts[i].findWithName("target");
+            is(docShell ? docShell.browsingContext : null, browsingContext,
                 "findItemWithName should find same browsing context as findWithName");
           }
         }
 
         for (let target of ["_self", "_top", "_parent", "_blank"]) {
           for (let i = 0; i < docShells.length; ++i) {
             let docShell = docShells[i].findItemWithName(target, null, null, false);
             let browsingContext = browsingContexts[i].findWithName(target);
-            is (docShell ? docShell.browsingContext : null, browsingContext,
+            is(docShell ? docShell.browsingContext : null, browsingContext,
                 "findItemWithName should find same browsing context as findWithName for " + target);
           }
         }
       });
 
       BrowserTestUtils.removeTab(await sixth);
     });
 });
--- a/docshell/test/browser/browser_bug1206879.js
+++ b/docshell/test/browser/browser_bug1206879.js
@@ -1,23 +1,23 @@
 add_task(async function() {
   let url = getRootDirectory(gTestPath) + "file_bug1206879.html";
   let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, url, true);
 
   let numLocationChanges = 0;
 
   let listener = {
-    onLocationChange: function(browser, wp, request, uri, flags) {
+    onLocationChange(browser, wp, request, uri, flags) {
       if (browser != tab.linkedBrowser) {
         return;
       }
       info("onLocationChange: " + uri.spec);
       numLocationChanges++;
       this.resolve();
-    }
+    },
   };
   let locationPromise = new Promise((resolve, reject) => {
     listener.resolve = resolve;
     gBrowser.addTabsProgressListener(listener);
   });
   await ContentTask.spawn(tab.linkedBrowser, {}, function() {
     content.frames[0].history.pushState(null, null, "foo");
   });
--- a/docshell/test/browser/browser_bug1328501.js
+++ b/docshell/test/browser/browser_bug1328501.js
@@ -28,11 +28,11 @@ add_task(async function testMultiFrameRe
     let framesLoaded = BrowserTestUtils.waitForMessage(browser.messageManager, "test:frames-loaded");
 
     browser.goBack();
     await framesLoaded;
     await new Promise(r => setTimeout(r, 1000));
     await ContentTask.spawn(browser, FRAME_URL, (FRAME_URL) => {
       is(content.document.querySelector("#testFrame1").contentWindow.location.href, FRAME_URL);
       is(content.document.querySelector("#testFrame2").contentWindow.location.href, FRAME_URL);
-    })
-  })
+    });
+  });
 });
--- a/docshell/test/browser/browser_bug1347823.js
+++ b/docshell/test/browser/browser_bug1347823.js
@@ -2,17 +2,17 @@
  * Test that session history's expiration tracker would remove bfcache on
  * expiration.
  */
 
 // With bfcache not expired.
 add_task(async function testValidCache() {
   // Make an unrealistic large timeout.
   await SpecialPowers.pushPrefEnv({
-    set: [["browser.sessionhistory.contentViewerTimeout", 86400]]
+    set: [["browser.sessionhistory.contentViewerTimeout", 86400]],
   });
 
   await BrowserTestUtils.withNewTab(
     {gBrowser, url: "data:text/html;charset=utf-8,page1"},
     async function(browser) {
       // Make a simple modification for bfcache testing.
       await ContentTask.spawn(browser, null, () => {
         content.document.body.textContent = "modified";
@@ -31,17 +31,17 @@ add_task(async function testValidCache()
       });
     });
 });
 
 // With bfcache expired.
 add_task(async function testExpiredCache() {
   // Make bfcache timeout in 1 sec.
   await SpecialPowers.pushPrefEnv({
-    set: [["browser.sessionhistory.contentViewerTimeout", 1]]
+    set: [["browser.sessionhistory.contentViewerTimeout", 1]],
   });
 
   await BrowserTestUtils.withNewTab(
     {gBrowser, url: "data:text/html;charset=utf-8,page1"},
     async function(browser) {
       // Make a simple modification for bfcache testing.
       await ContentTask.spawn(browser, null, () => {
         content.document.body.textContent = "modified";
--- a/docshell/test/browser/browser_bug1415918_beforeunload_options.js
+++ b/docshell/test/browser/browser_bug1415918_beforeunload_options.js
@@ -4,17 +4,17 @@
 const TEST_PATH = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "http://example.com");
 
 add_task(async function test() {
   const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
   await SpecialPowers.pushPrefEnv({
     "set": [
       ["dom.require_user_interaction_for_beforeunload", false],
-    ]
+    ],
   });
 
   let url = TEST_PATH + "file_bug1415918_beforeunload.html";
   let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, url);
   let browser = tab.linkedBrowser;
   let stack = browser.parentNode;
   let buttonId;
   let promptShown = false;
--- a/docshell/test/browser/browser_bug234628-1.js
+++ b/docshell/test/browser/browser_bug234628-1.js
@@ -1,18 +1,18 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-1.html", afterOpen, "windows-1251", afterChangeCharset);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u20AC'), 129, "Parent doc should be windows-1252 initially");
+  is(content.document.documentElement.textContent.indexOf("\u20AC"), 129, "Parent doc should be windows-1252 initially");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 85, "Child doc should be windows-1252 initially");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 85, "Child doc should be windows-1252 initially");
 }
 
 function afterChangeCharset() {
-  is(content.document.documentElement.textContent.indexOf('\u0402'), 129, "Parent doc should decode as windows-1251 subsequently");
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u0402'), 85, "Child doc should decode as windows-1251 subsequently");
+  is(content.document.documentElement.textContent.indexOf("\u0402"), 129, "Parent doc should decode as windows-1251 subsequently");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u0402"), 85, "Child doc should decode as windows-1251 subsequently");
 
   is(content.document.characterSet, "windows-1251", "Parent doc should report windows-1251 subsequently");
   is(content.frames[0].document.characterSet, "windows-1251", "Child doc should report windows-1251 subsequently");
 }
--- a/docshell/test/browser/browser_bug234628-10.js
+++ b/docshell/test/browser/browser_bug234628-10.js
@@ -1,18 +1,18 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-10.html", afterOpen, "windows-1251", afterChangeCharset);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u20AC'), 151, "Parent doc should be windows-1252 initially");
+  is(content.document.documentElement.textContent.indexOf("\u20AC"), 151, "Parent doc should be windows-1252 initially");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 71, "Child doc should be utf-8 initially");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 71, "Child doc should be utf-8 initially");
 }
 
 function afterChangeCharset() {
-  is(content.document.documentElement.textContent.indexOf('\u0402'), 151, "Parent doc should decode as windows-1251 subsequently");
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 71, "Child doc should decode as utf-8 subsequently");
+  is(content.document.documentElement.textContent.indexOf("\u0402"), 151, "Parent doc should decode as windows-1251 subsequently");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 71, "Child doc should decode as utf-8 subsequently");
 
   is(content.document.characterSet, "windows-1251", "Parent doc should report windows-1251 subsequently");
   is(content.frames[0].document.characterSet, "UTF-8", "Child doc should report UTF-8 subsequently");
 }
--- a/docshell/test/browser/browser_bug234628-11.js
+++ b/docshell/test/browser/browser_bug234628-11.js
@@ -1,18 +1,18 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-11.html", afterOpen, "windows-1251", afterChangeCharset);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u20AC'), 193, "Parent doc should be windows-1252 initially");
+  is(content.document.documentElement.textContent.indexOf("\u20AC"), 193, "Parent doc should be windows-1252 initially");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 107, "Child doc should be utf-8 initially");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 107, "Child doc should be utf-8 initially");
 }
 
 function afterChangeCharset() {
-  is(content.document.documentElement.textContent.indexOf('\u0402'), 193, "Parent doc should decode as windows-1251 subsequently");
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 107, "Child doc should decode as utf-8 subsequently");
+  is(content.document.documentElement.textContent.indexOf("\u0402"), 193, "Parent doc should decode as windows-1251 subsequently");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 107, "Child doc should decode as utf-8 subsequently");
 
   is(content.document.characterSet, "windows-1251", "Parent doc should report windows-1251 subsequently");
   is(content.frames[0].document.characterSet, "UTF-8", "Child doc should report UTF-8 subsequently");
 }
--- a/docshell/test/browser/browser_bug234628-2.js
+++ b/docshell/test/browser/browser_bug234628-2.js
@@ -1,18 +1,18 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-2.html", afterOpen, "windows-1251", afterChangeCharset);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u20AC'), 129, "Parent doc should be windows-1252 initially");
+  is(content.document.documentElement.textContent.indexOf("\u20AC"), 129, "Parent doc should be windows-1252 initially");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u00E2\u201A\u00AC'), 78, "Child doc should be windows-1252 initially");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u00E2\u201A\u00AC"), 78, "Child doc should be windows-1252 initially");
 }
 
 function afterChangeCharset() {
-  is(content.document.documentElement.textContent.indexOf('\u0402'), 129, "Parent doc should decode as windows-1251 subsequently");
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u0432\u201A\u00AC'), 78, "Child doc should decode as windows-1251 subsequently");
+  is(content.document.documentElement.textContent.indexOf("\u0402"), 129, "Parent doc should decode as windows-1251 subsequently");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u0432\u201A\u00AC"), 78, "Child doc should decode as windows-1251 subsequently");
 
   is(content.document.characterSet, "windows-1251", "Parent doc should report windows-1251 subsequently");
   is(content.frames[0].document.characterSet, "windows-1251", "Child doc should report windows-1251 subsequently");
 }
--- a/docshell/test/browser/browser_bug234628-3.js
+++ b/docshell/test/browser/browser_bug234628-3.js
@@ -1,18 +1,18 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-3.html", afterOpen, "windows-1251", afterChangeCharset);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u20AC'), 118, "Parent doc should be windows-1252 initially");
+  is(content.document.documentElement.textContent.indexOf("\u20AC"), 118, "Parent doc should be windows-1252 initially");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 73, "Child doc should be utf-8 initially");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 73, "Child doc should be utf-8 initially");
 }
 
 function afterChangeCharset() {
-  is(content.document.documentElement.textContent.indexOf('\u0402'), 118, "Parent doc should decode as windows-1251 subsequently");
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u0432\u201A\u00AC'), 73, "Child doc should decode as windows-1251 subsequently");
+  is(content.document.documentElement.textContent.indexOf("\u0402"), 118, "Parent doc should decode as windows-1251 subsequently");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u0432\u201A\u00AC"), 73, "Child doc should decode as windows-1251 subsequently");
 
   is(content.document.characterSet, "windows-1251", "Parent doc should report windows-1251 subsequently");
   is(content.frames[0].document.characterSet, "windows-1251", "Child doc should report windows-1251 subsequently");
 }
--- a/docshell/test/browser/browser_bug234628-4.js
+++ b/docshell/test/browser/browser_bug234628-4.js
@@ -1,18 +1,18 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-4.html", afterOpen, "windows-1251", afterChangeCharset);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u20AC'), 132, "Parent doc should be windows-1252 initially");
+  is(content.document.documentElement.textContent.indexOf("\u20AC"), 132, "Parent doc should be windows-1252 initially");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 79, "Child doc should be utf-8 initially");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 79, "Child doc should be utf-8 initially");
 }
 
 function afterChangeCharset() {
-  is(content.document.documentElement.textContent.indexOf('\u0402'), 132, "Parent doc should decode as windows-1251 subsequently");
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 79, "Child doc should decode as utf-8 subsequently");
+  is(content.document.documentElement.textContent.indexOf("\u0402"), 132, "Parent doc should decode as windows-1251 subsequently");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 79, "Child doc should decode as utf-8 subsequently");
 
   is(content.document.characterSet, "windows-1251", "Parent doc should report windows-1251 subsequently");
   is(content.frames[0].document.characterSet, "UTF-8", "Child doc should report UTF-8 subsequently");
 }
--- a/docshell/test/browser/browser_bug234628-5.js
+++ b/docshell/test/browser/browser_bug234628-5.js
@@ -1,18 +1,18 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-5.html", afterOpen, "windows-1251", afterChangeCharset);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u20AC'), 146, "Parent doc should be windows-1252 initially");
+  is(content.document.documentElement.textContent.indexOf("\u20AC"), 146, "Parent doc should be windows-1252 initially");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 87, "Child doc should be utf-16 initially");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 87, "Child doc should be utf-16 initially");
 }
 
 function afterChangeCharset() {
-  is(content.document.documentElement.textContent.indexOf('\u0402'), 146, "Parent doc should decode as windows-1251 subsequently");
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 87, "Child doc should decode as utf-16 subsequently");
+  is(content.document.documentElement.textContent.indexOf("\u0402"), 146, "Parent doc should decode as windows-1251 subsequently");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 87, "Child doc should decode as utf-16 subsequently");
 
   is(content.document.characterSet, "windows-1251", "Parent doc should report windows-1251 subsequently");
   is(content.frames[0].document.characterSet, "UTF-16LE", "Child doc should report UTF-16LE subsequently");
 }
--- a/docshell/test/browser/browser_bug234628-6.js
+++ b/docshell/test/browser/browser_bug234628-6.js
@@ -1,18 +1,18 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-6.html", afterOpen, "windows-1251", afterChangeCharset);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u20AC'), 190, "Parent doc should be windows-1252 initially");
+  is(content.document.documentElement.textContent.indexOf("\u20AC"), 190, "Parent doc should be windows-1252 initially");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 109, "Child doc should be utf-16 initially");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 109, "Child doc should be utf-16 initially");
 }
 
 function afterChangeCharset() {
-  is(content.document.documentElement.textContent.indexOf('\u0402'), 190, "Parent doc should decode as windows-1251 subsequently");
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 109, "Child doc should decode as utf-16 subsequently");
+  is(content.document.documentElement.textContent.indexOf("\u0402"), 190, "Parent doc should decode as windows-1251 subsequently");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 109, "Child doc should decode as utf-16 subsequently");
 
   is(content.document.characterSet, "windows-1251", "Parent doc should report windows-1251 subsequently");
   is(content.frames[0].document.characterSet, "UTF-16BE", "Child doc should report UTF-16 subsequently");
 }
--- a/docshell/test/browser/browser_bug234628-7.js
+++ b/docshell/test/browser/browser_bug234628-7.js
@@ -1,18 +1,18 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-7.html", afterOpen, "windows-1251", afterChangeCharset);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u20AC'), 188, "Parent doc should be windows-1252 initially");
+  is(content.document.documentElement.textContent.indexOf("\u20AC"), 188, "Parent doc should be windows-1252 initially");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 107, "Child doc should be utf-8 initially");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 107, "Child doc should be utf-8 initially");
 }
 
 function afterChangeCharset() {
-  is(content.document.documentElement.textContent.indexOf('\u0402'), 188, "Parent doc should decode as windows-1251 subsequently");
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u0432\u201A\u00AC'), 107, "Child doc should decode as windows-1251 subsequently");
+  is(content.document.documentElement.textContent.indexOf("\u0402"), 188, "Parent doc should decode as windows-1251 subsequently");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u0432\u201A\u00AC"), 107, "Child doc should decode as windows-1251 subsequently");
 
   is(content.document.characterSet, "windows-1251", "Parent doc should report windows-1251 subsequently");
   is(content.frames[0].document.characterSet, "windows-1251", "Child doc should report windows-1251 subsequently");
 }
--- a/docshell/test/browser/browser_bug234628-8.js
+++ b/docshell/test/browser/browser_bug234628-8.js
@@ -1,11 +1,11 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-8.html", afterOpen);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u0402'), 156, "Parent doc should be windows-1251");
+  is(content.document.documentElement.textContent.indexOf("\u0402"), 156, "Parent doc should be windows-1251");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u0402'), 99, "Child doc should be windows-1251");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u0402"), 99, "Child doc should be windows-1251");
 }
 
--- a/docshell/test/browser/browser_bug234628-9.js
+++ b/docshell/test/browser/browser_bug234628-9.js
@@ -1,11 +1,11 @@
 function test() {
   var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   runCharsetTest(rootDir + "file_bug234628-9.html", afterOpen);
 }
 
 function afterOpen() {
-  is(content.document.documentElement.textContent.indexOf('\u20AC'), 145, "Parent doc should be UTF-16");
+  is(content.document.documentElement.textContent.indexOf("\u20AC"), 145, "Parent doc should be UTF-16");
 
-  is(content.frames[0].document.documentElement.textContent.indexOf('\u20AC'), 96, "Child doc should be windows-1252");
+  is(content.frames[0].document.documentElement.textContent.indexOf("\u20AC"), 96, "Child doc should be windows-1252");
 }
 
--- a/docshell/test/browser/browser_bug388121-2.js
+++ b/docshell/test/browser/browser_bug388121-2.js
@@ -1,10 +1,10 @@
 function test() {
-  waitForExplicitFinish(); 
+  waitForExplicitFinish();
 
   var w;
   const secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
   var iteration = 1;
   const uris = ["", "about:blank"];
   var uri;
   var origDoc;
 
--- a/docshell/test/browser/browser_bug420605.js
+++ b/docshell/test/browser/browser_bug420605.js
@@ -41,29 +41,29 @@ function test() {
     // they've both run, we click a fragment link in the content page
     // (clickLinkIfReady), which should trigger another onPageChanged event,
     // this time for the fragment's URL.
 
     var _clickLinkTimes = 0;
     function clickLinkIfReady() {
       _clickLinkTimes++;
       if (_clickLinkTimes == 2) {
-        BrowserTestUtils.synthesizeMouseAtCenter('#firefox-link', {},
+        BrowserTestUtils.synthesizeMouseAtCenter("#firefox-link", {},
                                                  gBrowser.selectedBrowser);
       }
     }
 
     /* Global history observer that triggers for the two test URLs above. */
     var historyObserver = {
-        onBeginUpdateBatch: function() {},
-        onEndUpdateBatch: function() {},
-        onTitleChanged: function(aURI, aPageTitle) {},
-        onDeleteURI: function(aURI) {},
-        onClearHistory: function() {},
-        onPageChanged: function(aURI, aWhat, aValue) {
+        onBeginUpdateBatch() {},
+        onEndUpdateBatch() {},
+        onTitleChanged(aURI, aPageTitle) {},
+        onDeleteURI(aURI) {},
+        onClearHistory() {},
+        onPageChanged(aURI, aWhat, aValue) {
             if (aWhat != Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON) {
                 return;
             }
             aURI = aURI.spec;
             switch (aURI) {
             case pageurl:
                 ok(aValue, "Favicon value is not null for page without fragment.");
                 originalFavicon = aValue;
@@ -84,24 +84,18 @@ function test() {
                 let info = getNavHistoryEntry(makeURI(aURI));
                 ok(info, "There must be a history entry for the fragment.");
                 ok(info.icon, "The history entry must have an associated favicon.");
                 historyService.removeObserver(historyObserver, false);
                 gBrowser.removeCurrentTab();
                 finish();
             }
         },
-        onPageExpired: function(aURI, aVisitTime, aWholeEntry) {},
-        QueryInterface: function(iid) {
-            if (iid.equals(Ci.nsINavHistoryObserver) ||
-                iid.equals(Ci.nsISupports)) {
-                return this;
-            }
-            throw Cr.NS_ERROR_NO_INTERFACE;
-        }
+        onPageExpired(aURI, aVisitTime, aWholeEntry) {},
+        QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
     };
     historyService.addObserver(historyObserver);
 
     function onPageLoad() {
       clickLinkIfReady();
     }
 
     // Make sure neither of the test pages haven't been loaded before.
--- a/docshell/test/browser/browser_bug422543.js
+++ b/docshell/test/browser/browser_bug422543.js
@@ -84,30 +84,30 @@ function notifyReload() {
 
 function setListenerRetval(num, val) {
   return listenOnce("bug422543:setRetval", { num, val });
 }
 
 function setup() {
   return BrowserTestUtils.openNewForegroundTab(gBrowser,
                                                "http://mochi.test:8888")
-                         .then(function (tab) {
+                         .then(function(tab) {
     let browser = tab.linkedBrowser;
     registerCleanupFunction(async function() {
       await listenOnce("bug422543:cleanup");
       gBrowser.removeTab(tab);
     });
 
     browser.messageManager
            .loadFrameScript(getRootDirectory(gTestPath) + "file_bug422543_script.js", false);
   });
 }
 
 function whenPageShown(aBrowser, aNavigation) {
-  let listener = ContentTask.spawn(aBrowser, null, function () {
+  let listener = ContentTask.spawn(aBrowser, null, function() {
     return new Promise(resolve => {
       addEventListener("pageshow", function onLoad() {
         removeEventListener("pageshow", onLoad, true);
         resolve();
       }, true);
     });
   });
 
--- a/docshell/test/browser/browser_bug441169.js
+++ b/docshell/test/browser/browser_bug441169.js
@@ -1,10 +1,10 @@
 /* Make sure that netError won't allow HTML injection through badcert parameters.  See bug 441169. */
-var newBrowser
+var newBrowser;
 
 function task() {
   let resolve;
   let promise = new Promise(r => { resolve = r; });
 
   addEventListener("DOMContentLoaded", checkPage, false);
 
   function checkPage(event) {
--- a/docshell/test/browser/browser_bug503832.js
+++ b/docshell/test/browser/browser_bug503832.js
@@ -8,44 +8,38 @@ add_task(async function() {
     var fragmenturl = "http://mochi.test:8888/browser/docshell/test/browser/file_bug503832.html#firefox";
 
     var historyService = Cc["@mozilla.org/browser/nav-history-service;1"]
                          .getService(Ci.nsINavHistoryService);
 
     let fragmentPromise = new Promise(resolve => {
         /* Global history observer that triggers for the two test URLs above. */
         var historyObserver = {
-            onBeginUpdateBatch: function() {},
-            onEndUpdateBatch: function() {},
-            onTitleChanged: function(aURI, aPageTitle) {
+            onBeginUpdateBatch() {},
+            onEndUpdateBatch() {},
+            onTitleChanged(aURI, aPageTitle) {
                 aURI = aURI.spec;
                 switch (aURI) {
                 case pageurl:
                     is(aPageTitle, pagetitle, "Correct page title for " + aURI);
                     return;
                 case fragmenturl:
                     is(aPageTitle, pagetitle, "Correct page title for " + aURI);
                     // If titles for fragment URLs aren't set, this code
                     // branch won't be called and the test will timeout,
                     // resulting in a failure
                     historyService.removeObserver(historyObserver, false);
                     resolve();
                 }
             },
-            onDeleteURI: function(aURI) {},
-            onClearHistory: function() {},
-            onPageChanged: function(aURI, aWhat, aValue) {},
-            onDeleteVisits: function () {},
-            QueryInterface: function(iid) {
-                if (iid.equals(Ci.nsINavHistoryObserver) ||
-                    iid.equals(Ci.nsISupports)) {
-                    return this;
-                }
-                throw Cr.NS_ERROR_NO_INTERFACE;
-            }
+            onDeleteURI(aURI) {},
+            onClearHistory() {},
+            onPageChanged(aURI, aWhat, aValue) {},
+            onDeleteVisits() {},
+            QueryInterface: ChromeUtils.generateQI(["nsINavHistoryObserver"]),
         };
 
         historyService.addObserver(historyObserver);
     });
 
     /* Queries nsINavHistoryService and returns a single history entry
      * for a given URI */
     function getNavHistoryEntry(aURI) {
--- a/docshell/test/browser/browser_bug554155.js
+++ b/docshell/test/browser/browser_bug554155.js
@@ -1,17 +1,17 @@
 add_task(async function test() {
   await BrowserTestUtils.withNewTab({ gBrowser, url: "http://example.com" }, async function(browser) {
     let numLocationChanges = 0;
 
     let listener = {
-      onLocationChange: function(browser, webProgress, request, uri, flags) {
+      onLocationChange(browser, webProgress, request, uri, flags) {
         info("location change: " + (uri && uri.spec));
         numLocationChanges++;
-      }
+      },
     };
 
     gBrowser.addTabsProgressListener(listener);
 
     await ContentTask.spawn(browser, null, function() {
       // pushState to a new URL (http://example.com/foo").  This should trigger
       // exactly one LocationChange event.
       content.history.pushState(null, null, "foo");
--- a/docshell/test/browser/browser_bug655270.js
+++ b/docshell/test/browser/browser_bug655270.js
@@ -1,59 +1,59 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-/** 
- * Test for Bug 655273 
+/**
+ * Test for Bug 655273
  *
  * Call pushState and then make sure that the favicon service associates our
  * old favicon with the new URI.
  */
 
 function test() {
   const testDir = "http://mochi.test:8888/browser/docshell/test/browser/";
   const origURL = testDir + "file_bug655270.html";
-  const newURL  = origURL + '?new_page';
+  const newURL  = origURL + "?new_page";
 
   const faviconURL = testDir + "favicon_bug655270.ico";
 
   waitForExplicitFinish();
 
   let tab = BrowserTestUtils.addTab(gBrowser, origURL);
 
   // The page at origURL has a <link rel='icon'>, so we should get a call into
   // our observer below when it loads.  Once we verify that we have the right
   // favicon URI, we call pushState, which should trigger another onPageChange
   // event, this time for the URI after pushState.
 
   let observer = {
-    onPageChanged: function(aURI, aWhat, aValue) {
+    onPageChanged(aURI, aWhat, aValue) {
       if (aWhat != Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON)
         return;
 
       if (aURI.spec == origURL) {
-        is(aValue, faviconURL, 'FaviconURL for original URI');
+        is(aValue, faviconURL, "FaviconURL for original URI");
         // Ignore the promise returned here and wait for the next
         // onPageChanged notification.
         ContentTask.spawn(tab.linkedBrowser, null, function() {
-          content.history.pushState('', '', '?new_page');
+          content.history.pushState("", "", "?new_page");
         });
       }
 
       if (aURI.spec == newURL) {
-        is(aValue, faviconURL, 'FaviconURL for new URI');
+        is(aValue, faviconURL, "FaviconURL for new URI");
         gBrowser.removeTab(tab);
         PlacesUtils.history.removeObserver(this);
         finish();
       }
     },
 
-    onBeginUpdateBatch: function() { },
-    onEndUpdateBatch: function() { },
-    onTitleChanged: function() { },
-    onDeleteURI: function() { },
-    onClearHistory: function() { },
-    onDeleteVisits: function() { },
-    QueryInterface: ChromeUtils.generateQI([Ci.nsINavHistoryObserver])
+    onBeginUpdateBatch() { },
+    onEndUpdateBatch() { },
+    onTitleChanged() { },
+    onDeleteURI() { },
+    onClearHistory() { },
+    onDeleteVisits() { },
+    QueryInterface: ChromeUtils.generateQI([Ci.nsINavHistoryObserver]),
   };
 
   PlacesUtils.history.addObserver(observer);
 }
--- a/docshell/test/browser/browser_bug655273.js
+++ b/docshell/test/browser/browser_bug655273.js
@@ -11,20 +11,20 @@
 add_task(async function test() {
   waitForExplicitFinish();
 
   await BrowserTestUtils.withNewTab({ gBrowser, url: "http://example.com" },
     async function(browser) {
       await ContentTask.spawn(browser, null, async function() {
         let cw = content;
         let oldTitle = cw.document.title;
-        ok(oldTitle, 'Content window should initially have a title.');
-        cw.history.pushState('', '', 'new_page');
+        ok(oldTitle, "Content window should initially have a title.");
+        cw.history.pushState("", "", "new_page");
 
         let shistory = cw.docShell
                          .QueryInterface(Ci.nsIWebNavigation)
                          .sessionHistory;
 
         is(shistory.legacySHistory.getEntryAtIndex(shistory.index).title,
-           oldTitle, 'SHEntry title after pushstate.');
+           oldTitle, "SHEntry title after pushstate.");
       });
     });
 });
--- a/docshell/test/browser/browser_bug670318.js
+++ b/docshell/test/browser/browser_bug670318.js
@@ -16,17 +16,17 @@ add_task(async function test() {
     await ContentTask.spawn(browser, URL, async function(URL) {
       let history = docShell.QueryInterface(Ci.nsIWebNavigation).sessionHistory;
       let count = 0;
 
       let testDone = {};
       testDone.promise = new Promise(resolve => { testDone.resolve = resolve; });
 
       let listener = {
-        OnHistoryNewEntry: function (aNewURI) {
+        OnHistoryNewEntry(aNewURI) {
           if (aNewURI.spec == URL && 5 == ++count) {
             addEventListener("load", function onLoad() {
               removeEventListener("load", onLoad, true);
 
               Assert.ok(history.index < history.count, "history.index is valid");
               testDone.resolve();
             }, true);
 
@@ -42,17 +42,17 @@ add_task(async function test() {
         OnHistoryReplaceEntry: () => {
           // The initial load of about:blank causes a transient entry to be
           // created, so our first navigation to a real page is a replace
           // instead of a new entry.
           ++count;
         },
 
         QueryInterface: ChromeUtils.generateQI([Ci.nsISHistoryListener,
-                                                Ci.nsISupportsWeakReference])
+                                                Ci.nsISupportsWeakReference]),
       };
 
       history.legacySHistory.addSHistoryListener(listener);
       // Since listener implements nsISupportsWeakReference, we are
       // responsible for keeping it alive so that the GC doesn't clear
       // it before the test completes. We do this by anchoring the listener
       // to the content global window, and clearing it just before the test
       // completes.
--- a/docshell/test/browser/browser_bug673467.js
+++ b/docshell/test/browser/browser_bug673467.js
@@ -9,36 +9,35 @@ var doc = "data:text/html,<html><body on
  "<script>" +
  "  var iframe = document.createElement('iframe');" +
  "  iframe.id = 'iframe';" +
  "  document.documentElement.appendChild(iframe);" +
  "  function load() {" +
  "    iframe.src = 'data:text/html,Hello!';" +
  "  }" +
  "</script>" +
- "</body></html>"
+ "</body></html>";
 
 function test() {
   waitForExplicitFinish();
 
   let taskFinished;
 
   let tab = BrowserTestUtils.addTab(gBrowser, doc, {}, (tab) => {
     taskFinished = ContentTask.spawn(tab.linkedBrowser, null, () => {
       return new Promise(resolve => {
         addEventListener("load", function() {
           // The main page has loaded.  Now wait for the iframe to load.
-          let iframe = content.document.getElementById('iframe');
-          iframe.addEventListener('load', function listener(aEvent) {
-
+          let iframe = content.document.getElementById("iframe");
+          iframe.addEventListener("load", function listener(aEvent) {
             // Wait for the iframe to load the new document, not about:blank.
             if (!iframe.src)
               return;
 
-            iframe.removeEventListener('load', listener, true);
+            iframe.removeEventListener("load", listener, true);
             let shistory = content.docShell
                             .QueryInterface(Ci.nsIWebNavigation)
                             .sessionHistory;
 
             Assert.equal(shistory.count, 1, "shistory count should be 1.");
             resolve();
           }, true);
         }, true);
--- a/docshell/test/browser/browser_bug92473.js
+++ b/docshell/test/browser/browser_bug92473.js
@@ -13,27 +13,27 @@ function testContent(text) {
   });
 }
 
 function afterOpen() {
   BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(afterChangeCharset);
 
   /* The test text decoded incorrectly as Windows-1251. This is the "right" wrong
    text; anything else is unexpected. */
-  const wrongText="\u0453\u2020\u0453\u006A\u0453\u0052\u0403\u005B\u0453\u0068\u201A\u041D\u0403\u0041\u201A\u00B7\u201A\u0427\u201A\u0414\u201A\u041C\u2022\u00B6\u040B\u0459\u201A\u0419\u040A\u0415\u2014\u004C\u201A\u041C\u201D\u0424\u040C\u2020\u201A\u0440\u2022\u0074\u2014\u005E\u201A\u00B5\u201A\u042C\u201A\u00B7";
+  const wrongText = "\u0453\u2020\u0453\u006A\u0453\u0052\u0403\u005B\u0453\u0068\u201A\u041D\u0403\u0041\u201A\u00B7\u201A\u0427\u201A\u0414\u201A\u041C\u2022\u00B6\u040B\u0459\u201A\u0419\u040A\u0415\u2014\u004C\u201A\u041C\u201D\u0424\u040C\u2020\u201A\u0440\u2022\u0074\u2014\u005E\u201A\u00B5\u201A\u042C\u201A\u00B7";
 
   /* Test that the content on load is the expected wrong decoding */
   testContent(wrongText).then(() => {
     BrowserSetForcedCharacterSet("Shift_JIS");
   });
 }
 
 function afterChangeCharset() {
   /* The test text decoded correctly as Shift_JIS */
-  const rightText="\u30E6\u30CB\u30B3\u30FC\u30C9\u306F\u3001\u3059\u3079\u3066\u306E\u6587\u5B57\u306B\u56FA\u6709\u306E\u756A\u53F7\u3092\u4ED8\u4E0E\u3057\u307E\u3059";
+  const rightText = "\u30E6\u30CB\u30B3\u30FC\u30C9\u306F\u3001\u3059\u3079\u3066\u306E\u6587\u5B57\u306B\u56FA\u6709\u306E\u756A\u53F7\u3092\u4ED8\u4E0E\u3057\u307E\u3059";
 
   /* test that the content is decoded correctly */
   testContent(rightText).then(() => {
     gBrowser.removeCurrentTab();
     finish();
   });
 }
 
--- a/docshell/test/browser/browser_click_link_within_view_source.js
+++ b/docshell/test/browser/browser_click_link_within_view_source.js
@@ -38,17 +38,17 @@ add_task(async function test_click_link_
     let loadPromise = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, url => url.endsWith("dummy_page.html"));
     await ContentTask.spawn(gBrowser.selectedBrowser, {}, async function() {
       if (content.document.readyState != "complete") {
         await ContentTaskUtils.waitForEvent(content.document, "readystatechange", false, () =>
           content.document.readyState == "complete");
       }
       // document.getElementById() does not work on a view-source page, hence we use document.links
       let linksOnPage = content.document.links;
-      is (linksOnPage.length, 1, "sanity check: make sure only one link is present on page");
+      is(linksOnPage.length, 1, "sanity check: make sure only one link is present on page");
       let myLink = content.document.links[0];
       myLink.click();
     });
 
     await loadPromise;
 
     tabSpec = gBrowser.selectedBrowser.currentURI.spec;
     info("loading: " + tabSpec);
--- a/docshell/test/browser/browser_data_load_inherit_csp.js
+++ b/docshell/test/browser/browser_data_load_inherit_csp.js
@@ -4,31 +4,31 @@ const TEST_PATH = getRootDirectory(gTest
 const HTML_URI = TEST_PATH + "file_data_load_inherit_csp.html";
 const DATA_URI = "data:text/html;html,<html><body>foo</body></html>";
 
 function setDataHrefOnLink(aBrowser, aDataURI) {
   return ContentTask.spawn(aBrowser, aDataURI, function(uri) {
     let link = content.document.getElementById("testlink");
     link.href = uri;
   });
-};
+}
 
 function verifyCSP(aTestName, aBrowser, aDataURI) {
-  return ContentTask.spawn(aBrowser, {aTestName, aDataURI}, async function ({aTestName, aDataURI}) {
+  return ContentTask.spawn(aBrowser, {aTestName, aDataURI}, async function({aTestName, aDataURI}) {
     let channel = content.docShell.currentDocumentChannel;
     is(channel.URI.spec, aDataURI, "testing CSP for " + aTestName);
     let principal = channel.loadInfo.triggeringPrincipal;
     let cspJSON = principal.cspJSON;
     let cspOBJ = JSON.parse(cspJSON);
     let policies = cspOBJ["csp-policies"];
     is(policies.length, 1, "should be one policy");
     let policy = policies[0];
-    is(policy['script-src'], "'unsafe-inline'", "script-src directive matches");
+    is(policy["script-src"], "'unsafe-inline'", "script-src directive matches");
   });
-};
+}
 
 add_task(async function setup() {
   // allow top level data: URI navigations, otherwise clicking data: link fails
   await SpecialPowers.pushPrefEnv({
     "set": [["security.data_uri.block_toplevel_data_uri_navigations", false]],
   });
 });
 
--- a/docshell/test/browser/browser_history_triggeringprincipal_viewsource.js
+++ b/docshell/test/browser/browser_history_triggeringprincipal_viewsource.js
@@ -18,17 +18,17 @@ add_task(async function() {
     let tabPromise = BrowserTestUtils.waitForNewTab(gBrowser, VIEW_SRC_URI);
     let vSrcItem = vSrcCtxtMenu.getElementsByAttribute("id", "context-viewsource")[0];
     vSrcItem.click();
     vSrcCtxtMenu.hidePopup();
     let tab = await tabPromise;
     is(gBrowser.selectedBrowser.currentURI.spec, VIEW_SRC_URI,
        "loading view-source of html succeeded");
 
-    info ("load html file again before going .back()");
+    info("load html file again before going .back()");
     let loadPromise = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, HTML_URI);
     await ContentTask.spawn(tab.linkedBrowser, HTML_URI, HTML_URI => {
       content.document.location = HTML_URI;
     });
     await loadPromise;
     is(gBrowser.selectedBrowser.currentURI.spec, HTML_URI,
       "loading html another time succeeded");
 
--- a/docshell/test/browser/browser_loadDisallowInherit.js
+++ b/docshell/test/browser/browser_loadDisallowInherit.js
@@ -4,17 +4,17 @@
 function test() {
   waitForExplicitFinish();
 
   // data: URI will only inherit principal only when the pref is false.
   Services.prefs.setBoolPref("security.data_uri.unique_opaque_origin", false);
   // data: URIs will only open at the top level when the pref is false
   //   or the use of system principal but we can't use that to test here.
   Services.prefs.setBoolPref("security.data_uri.block_toplevel_data_uri_navigations", false);
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.prefs.clearUserPref("security.data_uri.unique_opaque_origin");
     Services.prefs.clearUserPref("security.data_uri.block_toplevel_data_uri_navigations");
   });
 
   executeSoon(startTest);
 }
 
 function startTest() {
@@ -31,27 +31,27 @@ function startTest() {
 
   // Load a normal http URL
   function testURL(url, func) {
     let secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].
                    getService(Ci.nsIScriptSecurityManager);
     let ios = Cc["@mozilla.org/network/io-service;1"].
                 getService(Ci.nsIIOService);
     let artificialPrincipal = secMan.createCodebasePrincipal(ios.newURI("http://example.com/"), {});
-    loadURL("http://example.com/", 0, artificialPrincipal, function () {
+    loadURL("http://example.com/", 0, artificialPrincipal, function() {
       let pagePrincipal = browser.contentPrincipal;
       ok(pagePrincipal, "got principal for http:// page");
 
       // Now load the URL normally
-      loadURL(url, 0, artificialPrincipal, function () {
+      loadURL(url, 0, artificialPrincipal, function() {
         ok(browser.contentPrincipal.equals(pagePrincipal), url + " should inherit principal");
 
         // Now load the URL and disallow inheriting the principal
         let webNav = Ci.nsIWebNavigation;
-        loadURL(url, webNav.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL, artificialPrincipal, function () {
+        loadURL(url, webNav.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL, artificialPrincipal, function() {
           let newPrincipal = browser.contentPrincipal;
           ok(newPrincipal, "got inner principal");
           ok(!newPrincipal.equals(pagePrincipal),
              url + " should not inherit principal when loaded with DISALLOW_INHERIT_OWNER");
 
           func();
         });
       });
--- a/docshell/test/browser/browser_loadURI.js
+++ b/docshell/test/browser/browser_loadURI.js
@@ -2,17 +2,17 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const gPostData = "postdata=true";
 
 function test() {
   waitForExplicitFinish();
 
   let tab = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     gBrowser.removeTab(tab);
   });
 
   var dataStream = Cc["@mozilla.org/io/string-input-stream;1"].
                    createInstance(Ci.nsIStringInputStream);
   dataStream.data = gPostData;
 
   var postStream = Cc["@mozilla.org/network/mime-input-stream;1"].
--- a/docshell/test/browser/browser_onbeforeunload_navigation.js
+++ b/docshell/test/browser/browser_onbeforeunload_navigation.js
@@ -139,29 +139,29 @@ function contentTask() {
 }
 
 SpecialPowers.pushPrefEnv({"set": [["dom.require_user_interaction_for_beforeunload", false]]});
 
 var testTab;
 
 var loadStarted = false;
 var tabStateListener = {
-  onStateChange: function(webprogress, request, stateFlags, status) {
+  onStateChange(webprogress, request, stateFlags, status) {
     let startDocumentFlags = Ci.nsIWebProgressListener.STATE_START |
                              Ci.nsIWebProgressListener.STATE_IS_DOCUMENT;
     if ((stateFlags & startDocumentFlags) == startDocumentFlags) {
       loadStarted = true;
     }
   },
   onStatusChange: () => {},
   onLocationChange: () => {},
   onSecurityChange: () => {},
   onProgressChange: () => {},
   onContentBlockingEvent: () => {},
-  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener])
+  QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener]),
 };
 
 function onTabModalDialogLoaded(node) {
   let mm = testTab.linkedBrowser.messageManager;
   mm.sendAsyncMessage("test-beforeunload:dialog");
 
   if (gMultiProcessBrowser) {
     // In non-e10s, onTabModalDialogLoaded fires synchronously while
--- a/docshell/test/browser/browser_search_notification.js
+++ b/docshell/test/browser/browser_search_notification.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-add_task(async function () {
+add_task(async function() {
   const kSearchEngineID = "test_urifixup_search_engine";
   const kSearchEngineURL = "http://localhost/?search={searchTerms}";
   await Services.search.addEngineWithDetails(kSearchEngineID, "", "", "", "get", kSearchEngineURL);
 
   let oldDefaultEngine = await Services.search.getDefault();
   await Services.search.setDefault(Services.search.getEngineByName(kSearchEngineID));
 
   let selectedName = (await Services.search.getDefault()).name;
--- a/docshell/test/browser/browser_timelineMarkers-02.js
+++ b/docshell/test/browser/browser_timelineMarkers-02.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
-var URL = '<!DOCTYPE html><style>' +
-          'body {margin:0; padding: 0;} ' +
-          'div {width:100px;height:100px;background:red;} ' +
-          '.resize-change-color {width:50px;height:50px;background:blue;} ' +
-          '.change-color {width:50px;height:50px;background:yellow;} ' +
-          '.add-class {}' +
-          '</style><div></div>';
+var URL = "<!DOCTYPE html><style>" +
+          "body {margin:0; padding: 0;} " +
+          "div {width:100px;height:100px;background:red;} " +
+          ".resize-change-color {width:50px;height:50px;background:blue;} " +
+          ".change-color {width:50px;height:50px;background:yellow;} " +
+          ".add-class {}" +
+          "</style><div></div>";
 URL = "data:text/html;charset=utf8," + encodeURIComponent(URL);
 
 var test = makeTimelineTest("browser_timelineMarkers-frame-02.js", URL);
--- a/docshell/test/browser/browser_timelineMarkers-05.js
+++ b/docshell/test/browser/browser_timelineMarkers-05.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
-var URL = '<!DOCTYPE html><style>' +
-          'body {margin:0; padding: 0;} ' +
-          'div {width:100px;height:100px;background:red;} ' +
-          '.resize-change-color {width:50px;height:50px;background:blue;} ' +
-          '.change-color {width:50px;height:50px;background:yellow;} ' +
-          '.add-class {}' +
-          '</style><div></div>';
+var URL = "<!DOCTYPE html><style>" +
+          "body {margin:0; padding: 0;} " +
+          "div {width:100px;height:100px;background:red;} " +
+          ".resize-change-color {width:50px;height:50px;background:blue;} " +
+          ".change-color {width:50px;height:50px;background:yellow;} " +
+          ".add-class {}" +
+          "</style><div></div>";
 URL = "data:text/html;charset=utf8," + encodeURIComponent(URL);
 
 var test = makeTimelineTest("browser_timelineMarkers-frame-05.js", URL);
--- a/docshell/test/browser/browser_timelineMarkers-frame-02.js
+++ b/docshell/test/browser/browser_timelineMarkers-frame-02.js
@@ -15,119 +15,119 @@ function sanitizeMarkers(list) {
   // These markers are currently gathered from all docshells, which may
   // interfere with this test.
   return list.filter(e => e.name != "Worker" && e.name != "MinorGC");
 }
 
 var TESTS = [{
   desc: "Changing the width of the test element",
   searchFor: "Paint",
-  setup: function(docShell) {
+  setup(docShell) {
     let div = content.document.querySelector("div");
     div.setAttribute("class", "resize-change-color");
   },
-  check: function(markers) {
+  check(markers) {
     markers = sanitizeMarkers(markers);
     ok(markers.length > 0, "markers were returned");
     console.log(markers);
     info(JSON.stringify(markers.filter(m => m.name == "Paint")));
     ok(markers.some(m => m.name == "Reflow"), "markers includes Reflow");
     ok(markers.some(m => m.name == "Paint"), "markers includes Paint");
     for (let marker of markers.filter(m => m.name == "Paint")) {
       // This change should generate at least one rectangle.
       ok(marker.rectangles.length >= 1, "marker has one rectangle");
       // One of the rectangles should contain the div.
       ok(marker.rectangles.some(r => rectangleContains(r, 0, 0, 100, 100)));
     }
     ok(markers.some(m => m.name == "Styles"), "markers includes Restyle");
-  }
+  },
 }, {
   desc: "Changing the test element's background color",
   searchFor: "Paint",
-  setup: function(docShell) {
+  setup(docShell) {
     let div = content.document.querySelector("div");
     div.setAttribute("class", "change-color");
   },
-  check: function(markers) {
+  check(markers) {
     markers = sanitizeMarkers(markers);
     ok(markers.length > 0, "markers were returned");
     ok(!markers.some(m => m.name == "Reflow"), "markers doesn't include Reflow");
     ok(markers.some(m => m.name == "Paint"), "markers includes Paint");
     for (let marker of markers.filter(m => m.name == "Paint")) {
       // This change should generate at least one rectangle.
       ok(marker.rectangles.length >= 1, "marker has one rectangle");
       // One of the rectangles should contain the div.
       ok(marker.rectangles.some(r => rectangleContains(r, 0, 0, 50, 50)));
     }
     ok(markers.some(m => m.name == "Styles"), "markers includes Restyle");
-  }
+  },
 }, {
   desc: "Changing the test element's classname",
   searchFor: "Paint",
-  setup: function(docShell) {
+  setup(docShell) {
     let div = content.document.querySelector("div");
     div.setAttribute("class", "change-color add-class");
   },
-  check: function(markers) {
+  check(markers) {
     markers = sanitizeMarkers(markers);
     ok(markers.length > 0, "markers were returned");
     ok(!markers.some(m => m.name == "Reflow"), "markers doesn't include Reflow");
     ok(!markers.some(m => m.name == "Paint"), "markers doesn't include Paint");
     ok(markers.some(m => m.name == "Styles"), "markers includes Restyle");
-  }
+  },
 }, {
   desc: "sync console.time/timeEnd",
   searchFor: "ConsoleTime",
-  setup: function(docShell) {
+  setup(docShell) {
     content.console.time("FOOBAR");
     content.console.timeEnd("FOOBAR");
     let markers = docShell.popProfileTimelineMarkers();
     is(markers.length, 1, "Got one marker");
     is(markers[0].name, "ConsoleTime", "Got ConsoleTime marker");
     is(markers[0].causeName, "FOOBAR", "Got ConsoleTime FOOBAR detail");
     content.console.time("FOO");
     content.setTimeout(() => {
       content.console.time("BAR");
       content.setTimeout(() => {
         content.console.timeEnd("FOO");
         content.console.timeEnd("BAR");
       }, 100);
     }, 100);
   },
-  check: function(markers) {
+  check(markers) {
     markers = sanitizeMarkers(markers);
     is(markers.length, 2, "Got 2 markers");
     is(markers[0].name, "ConsoleTime", "Got first ConsoleTime marker");
     is(markers[0].causeName, "FOO", "Got ConsoleTime FOO detail");
     is(markers[1].name, "ConsoleTime", "Got second ConsoleTime marker");
     is(markers[1].causeName, "BAR", "Got ConsoleTime BAR detail");
-  }
+  },
 }, {
   desc: "Timestamps created by console.timeStamp()",
   searchFor: "Timestamp",
-  setup: function(docshell) {
+  setup(docshell) {
     content.console.timeStamp("rock");
     let markers = docShell.popProfileTimelineMarkers();
     is(markers.length, 1, "Got one marker");
     is(markers[0].name, "TimeStamp", "Got Timestamp marker");
     is(markers[0].causeName, "rock", "Got Timestamp label value");
     content.console.timeStamp("paper");
     content.console.timeStamp("scissors");
     content.console.timeStamp();
     content.console.timeStamp(undefined);
   },
-  check: function (markers) {
+  check(markers) {
     markers = sanitizeMarkers(markers);
     is(markers.length, 4, "Got 4 markers");
     is(markers[0].name, "TimeStamp", "Got Timestamp marker");
     is(markers[0].causeName, "paper", "Got Timestamp label value");
     is(markers[1].name, "TimeStamp", "Got Timestamp marker");
     is(markers[1].causeName, "scissors", "Got Timestamp label value");
     is(markers[2].name, "TimeStamp", "Got empty Timestamp marker when no argument given");
     is(markers[2].causeName, void 0, "Got empty Timestamp label value");
     is(markers[3].name, "TimeStamp", "Got empty Timestamp marker when argument is undefined");
     is(markers[3].causeName, void 0, "Got empty Timestamp label value");
     markers.forEach(m => is(m.end, m.start,
       "All Timestamp markers should have identical start/end times"));
-  }
+  },
 }];
 
 timelineContentTest(TESTS);
--- a/docshell/test/browser/browser_timelineMarkers-frame-03.js
+++ b/docshell/test/browser/browser_timelineMarkers-frame-03.js
@@ -3,88 +3,88 @@
 
 "use strict";
 
 // Test that the docShell profile timeline API returns the right
 // markers for DOM events.
 
 var TESTS = [{
   desc: "Event dispatch with single handler",
-  searchFor: 'DOMEvent',
-  setup: function(docShell) {
+  searchFor: "DOMEvent",
+  setup(docShell) {
     content.document.body.addEventListener("dog",
                                            function(e) { console.log("hi"); },
                                            true);
     content.document.body.dispatchEvent(new content.Event("dog"));
   },
-  check: function(markers) {
-    markers = markers.filter(m => m.name == 'DOMEvent');
+  check(markers) {
+    markers = markers.filter(m => m.name == "DOMEvent");
     is(markers.length, 1, "Got 1 marker");
     is(markers[0].type, "dog", "Got dog event name");
     is(markers[0].eventPhase, 2, "Got phase 2");
-  }
+  },
 }, {
   desc: "Event dispatch with a second handler",
-  searchFor: function(markers) {
-    return markers.filter(m => m.name == 'DOMEvent').length >= 2;
+  searchFor(markers) {
+    return markers.filter(m => m.name == "DOMEvent").length >= 2;
   },
-  setup: function(docShell) {
+  setup(docShell) {
     content.document.body.addEventListener("dog",
                                            function(e) { console.log("hi"); });
     content.document.body.dispatchEvent(new content.Event("dog"));
   },
-  check: function(markers) {
-    markers = markers.filter(m => m.name == 'DOMEvent');
+  check(markers) {
+    markers = markers.filter(m => m.name == "DOMEvent");
     is(markers.length, 2, "Got 2 markers");
-  }
+  },
 }, {
   desc: "Event targeted at child",
-  searchFor: function(markers) {
-    return markers.filter(m => m.name == 'DOMEvent').length >= 2;
+  searchFor(markers) {
+    return markers.filter(m => m.name == "DOMEvent").length >= 2;
   },
-  setup: function(docShell) {
+  setup(docShell) {
     let child = content.document.body.firstElementChild;
     child.addEventListener("dog", function(e) { });
     child.dispatchEvent(new content.Event("dog"));
   },
-  check: function(markers) {
-    markers = markers.filter(m => m.name == 'DOMEvent');
+  check(markers) {
+    markers = markers.filter(m => m.name == "DOMEvent");
     is(markers.length, 2, "Got 2 markers");
     is(markers[0].eventPhase, 1, "Got phase 1 marker");
     is(markers[1].eventPhase, 2, "Got phase 2 marker");
-  }
+  },
 }, {
   desc: "Event dispatch on a new document",
-  searchFor: function(markers) {
-    return markers.filter(m => m.name == 'DOMEvent').length >= 2;
+  searchFor(markers) {
+    return markers.filter(m => m.name == "DOMEvent").length >= 2;
   },
-  setup: function(docShell) {
+  setup(docShell) {
     let doc = content.document.implementation.createHTMLDocument("doc");
     let p = doc.createElement("p");
     p.innerHTML = "inside";
     doc.body.appendChild(p);
 
-    p.addEventListener("zebra", function(e) {console.log("hi");});
+    p.addEventListener("zebra", function(e) { console.log("hi"); });
     p.dispatchEvent(new content.Event("zebra"));
   },
-  check: function(markers) {
-    markers = markers.filter(m => m.name == 'DOMEvent');
+  check(markers) {
+    markers = markers.filter(m => m.name == "DOMEvent");
     is(markers.length, 1, "Got 1 marker");
-  }
+  },
 }, {
   desc: "Event dispatch on window",
-  searchFor: function(markers) {
-    return markers.filter(m => m.name == 'DOMEvent').length >= 2;
+  searchFor(markers) {
+    return markers.filter(m => m.name == "DOMEvent").length >= 2;
   },
-  setup: function(docShell) {
+  setup(docShell) {
     let doc = content.window.addEventListener("aardvark", function(e) {
       console.log("I like ants!");
     });
 
     content.window.dispatchEvent(new content.Event("aardvark"));
   },
-  check: function(markers) {
-    markers = markers.filter(m => m.name == 'DOMEvent');
+  check(markers) {
+    markers = markers.filter(m => m.name == "DOMEvent");
     is(markers.length, 1, "Got 1 marker");
-  }
+  },
 }];
 
 timelineContentTest(TESTS);
--- a/docshell/test/browser/browser_timelineMarkers-frame-04.js
+++ b/docshell/test/browser/browser_timelineMarkers-frame-04.js
@@ -3,86 +3,86 @@
 
 "use strict";
 
 // Test that the docShell profile timeline API returns the right
 // markers for XMLHttpRequest events.
 
 var TESTS = [{
   desc: "Event dispatch from XMLHttpRequest",
-  searchFor: function(markers) {
+  searchFor(markers) {
     return markers.filter(m => m.name == "DOMEvent").length >= 5;
   },
-  setup: function(docShell) {
+  setup(docShell) {
     content.dispatchEvent(new content.Event("dog"));
   },
-  check: function(markers) {
+  check(markers) {
     let domMarkers = markers.filter(m => m.name == "DOMEvent");
     // One subtlety here is that we have five events: the event we
     // inject in "setup", plus the four state transition events.  The
     // first state transition is reported synchronously and so should
     // show up as a nested marker.
     is(domMarkers.length, 5, "Got 5 markers");
 
     // We should see some Javascript markers, and they should have a
     // cause.
     let jsMarkers = markers.filter(m => m.name == "Javascript" && m.causeName);
     ok(jsMarkers.length > 0, "Got some Javascript markers");
     is(jsMarkers[0].stack.functionDisplayName, "do_xhr",
        "Javascript marker has entry point name");
-  }
+  },
 }];
 
 if (Services.prefs.getBoolPref("javascript.options.asyncstack")) {
   TESTS.push({
     desc: "Async stack trace on Javascript marker",
     searchFor: (markers) => {
       return markers.some(m => (m.name == "Javascript" &&
                                 m.causeName == "promise callback"));
     },
-    setup: function(docShell) {
+    setup(docShell) {
       content.dispatchEvent(new content.Event("promisetest"));
     },
-    check: function(markers) {
+    check(markers) {
       markers = markers.filter(m => (m.name == "Javascript" &&
                                      m.causeName == "promise callback"));
       ok(markers.length > 0, "Found a Javascript marker");
 
       let frame = markers[0].stack;
       ok(frame.asyncParent !== null, "Parent frame has async parent");
       is(frame.asyncParent.asyncCause, "promise callback",
          "Async parent has correct cause");
       let asyncFrame = frame.asyncParent;
       // Skip over self-hosted parts of our Promise implementation.
-      while (asyncFrame.source === 'self-hosted')
+      while (asyncFrame.source === "self-hosted")
         asyncFrame = asyncFrame.parent;
       is(asyncFrame.functionDisplayName, "do_promise",
          "Async parent has correct function name");
-    }
+    },
   }, {
     desc: "Async stack trace on Javascript marker with script",
     searchFor: (markers) => {
       return markers.some(m => (m.name == "Javascript" &&
                                 m.causeName == "promise callback"));
     },
-    setup: function(docShell) {
+    setup(docShell) {
       content.dispatchEvent(new content.Event("promisescript"));
     },
-    check: function(markers) {
+    check(markers) {
       markers = markers.filter(m => (m.name == "Javascript" &&
                                      m.causeName == "promise callback"));
       ok(markers.length > 0, "Found a Javascript marker");
 
       let frame = markers[0].stack;
       ok(frame.asyncParent !== null, "Parent frame has async parent");
       is(frame.asyncParent.asyncCause, "promise callback",
          "Async parent has correct cause");
       let asyncFrame = frame.asyncParent;
       // Skip over self-hosted parts of our Promise implementation.
-      while (asyncFrame.source === 'self-hosted')
+      while (asyncFrame.source === "self-hosted")
         asyncFrame = asyncFrame.parent;
       is(asyncFrame.functionDisplayName, "do_promise_script",
          "Async parent has correct function name");
-    }
+    },
   });
 }
 
 timelineContentTest(TESTS);
--- a/docshell/test/browser/browser_timelineMarkers-frame-05.js
+++ b/docshell/test/browser/browser_timelineMarkers-frame-05.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 function forceSyncReflow(div) {
-  div.setAttribute('class', 'resize-change-color');
+  div.setAttribute("class", "resize-change-color");
   // Force a reflow.
   return div.offsetWidth;
 }
 
 function testSendingEvent() {
   content.document.body.dispatchEvent(new content.Event("dog"));
 }
 
@@ -34,84 +34,84 @@ function makePromise() {
 
 function resolvePromise(resolver) {
   resolver(23);
 }
 
 var TESTS = [{
   desc: "Stack trace on sync reflow",
   searchFor: "Reflow",
-  setup: function(docShell) {
+  setup(docShell) {
     let div = content.document.querySelector("div");
     forceSyncReflow(div);
   },
-  check: function(markers) {
+  check(markers) {
     markers = markers.filter(m => m.name == "Reflow");
     ok(markers.length > 0, "Reflow marker includes stack");
     ok(markers[0].stack.functionDisplayName == "forceSyncReflow");
-  }
+  },
 }, {
   desc: "Stack trace on DOM event",
   searchFor: "DOMEvent",
-  setup: function(docShell) {
+  setup(docShell) {
     content.document.body.addEventListener("dog",
                                            function(e) { console.log("hi"); },
                                            true);
     testSendingEvent();
   },
-  check: function(markers) {
+  check(markers) {
     markers = markers.filter(m => m.name == "DOMEvent");
     ok(markers.length > 0, "DOMEvent marker includes stack");
     ok(markers[0].stack.functionDisplayName == "testSendingEvent",
        "testSendingEvent is on the stack");
-  }
+  },
 }, {
   desc: "Stack trace on console event",
   searchFor: "ConsoleTime",
-  setup: function(docShell) {
+  setup(docShell) {
     testConsoleTime();
     testConsoleTimeEnd();
   },
-  check: function(markers) {
+  check(markers) {
     markers = markers.filter(m => m.name == "ConsoleTime");
     ok(markers.length > 0, "ConsoleTime marker includes stack");
     ok(markers[0].stack.functionDisplayName == "testConsoleTime",
        "testConsoleTime is on the stack");
     ok(markers[0].endStack.functionDisplayName == "testConsoleTimeEnd",
        "testConsoleTimeEnd is on the stack");
-  }
+  },
 }];
 
 if (Services.prefs.getBoolPref("javascript.options.asyncstack")) {
   TESTS.push({
     desc: "Async stack trace on Promise",
     searchFor: "ConsoleTime",
-    setup: function(docShell) {
+    setup(docShell) {
       let resolver = makePromise();
       resolvePromise(resolver);
     },
-    check: function(markers) {
+    check(markers) {
       markers = markers.filter(m => m.name == "ConsoleTime");
       ok(markers.length > 0, "Promise marker includes stack");
       ok(markers[0].stack.functionDisplayName == "testConsoleTime",
          "testConsoleTime is on the stack");
       let frame = markers[0].endStack;
       ok(frame.functionDisplayName == "testConsoleTimeEnd",
          "testConsoleTimeEnd is on the stack");
 
       frame = frame.parent;
       ok(frame.functionDisplayName == "makePromise/<",
          "makePromise/< is on the stack");
       let asyncFrame = frame.asyncParent;
       ok(asyncFrame !== null, "Frame has async parent");
       is(asyncFrame.asyncCause, "promise callback",
          "Async parent has correct cause");
       // Skip over self-hosted parts of our Promise implementation.
-      while (asyncFrame.source === 'self-hosted') {
+      while (asyncFrame.source === "self-hosted") {
         asyncFrame = asyncFrame.parent;
       }
       is(asyncFrame.functionDisplayName, "makePromise",
          "Async parent has correct function name");
-    }
+    },
   });
 }
 
 timelineContentTest(TESTS);
--- a/docshell/test/browser/browser_uriFixupAlternateRedirects.js
+++ b/docshell/test/browser/browser_uriFixupAlternateRedirects.js
@@ -1,11 +1,11 @@
 "use strict";
 
-const REDIRECTURL = "http://www.example.com/browser/docshell/test/browser/redirect_to_example.sjs"
+const REDIRECTURL = "http://www.example.com/browser/docshell/test/browser/redirect_to_example.sjs";
 
 add_task(async function() {
   let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank");
   gURLBar.value = REDIRECTURL;
   gURLBar.select();
   let errorPageLoaded = BrowserTestUtils.waitForErrorPage(tab.linkedBrowser);
   EventUtils.sendKey("return");
   await errorPageLoaded;
--- a/docshell/test/browser/file_bug1046022.html
+++ b/docshell/test/browser/file_bug1046022.html
@@ -6,44 +6,44 @@
   </head>
   <body>
     Waiting for onbeforeunload to hit...
   </body>
 
   <script>
 var testFns = [
   function(e) {
-    e.target.location.href = 'otherpage-href-set.html';
+    e.target.location.href = "otherpage-href-set.html";
     return "stop";
   },
   function(e) {
     e.target.location.reload();
     return "stop";
   },
   function(e) {
-    e.target.location.replace('otherpage-location-replaced.html');
+    e.target.location.replace("otherpage-location-replaced.html");
     return "stop";
   },
   function(e) {
-    var link = e.target.createElement('a');
+    var link = e.target.createElement("a");
     link.href = "otherpage.html";
     e.target.body.appendChild(link);
     link.click();
     return "stop";
   },
   function(e) {
-    var link = e.target.createElement('a');
+    var link = e.target.createElement("a");
     link.href = "otherpage.html";
     link.setAttribute("target", "_blank");
     e.target.body.appendChild(link);
     link.click();
     return "stop";
   },
   function(e) {
-    var link = e.target.createElement('a');
+    var link = e.target.createElement("a");
     link.href = e.target.location.href;
     e.target.body.appendChild(link);
     link.setAttribute("target", "somearbitrarywindow");
     link.click();
     return "stop";
   },
 ];
   </script>
--- a/docshell/test/browser/file_bug1328501.html
+++ b/docshell/test/browser/file_bug1328501.html
@@ -1,21 +1,21 @@
 <!DOCTYPE html>
 <html lang="en">
   <head>
     <meta charset="utf-8">
     <title>Page with iframes</title>
     <script type="application/javascript">
     let promiseResolvers = {
       "testFrame1": {},
-      "testFrame2": {}
-    }
+      "testFrame2": {},
+    };
     let promises = [
-      new Promise(r => promiseResolvers["testFrame1"].resolve = r),
-      new Promise(r => promiseResolvers["testFrame2"].resolve = r)
+      new Promise(r => promiseResolvers.testFrame1.resolve = r),
+      new Promise(r => promiseResolvers.testFrame2.resolve = r),
     ];
     function frameLoaded(frame) {
       promiseResolvers[frame].resolve();
     }
     Promise.all(promises).then(() => window.dispatchEvent(new Event("frames-loaded")));
     </script>
   </head>
   <body onunload="">
--- a/docshell/test/browser/file_bug1328501_framescript.js
+++ b/docshell/test/browser/file_bug1328501_framescript.js
@@ -10,19 +10,19 @@ let requestObserver = {
       getChildDocShells().map(ds => {
         let window = ds.QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsILoadContext)
                       .associatedWindow;
       });
     }
   },
   QueryInterface: ChromeUtils.generateQI([
-    Ci.nsIObserver
-  ])
-}
+    Ci.nsIObserver,
+  ]),
+};
 Services.obs.addObserver(requestObserver, "http-on-opening-request");
 addEventListener("unload", e => {
   if (e.target == this) {
     Services.obs.removeObserver(requestObserver, "http-on-opening-request");
   }
 });
 
 function getChildDocShells() {
--- a/docshell/test/browser/file_bug1415918_beforeunload.html
+++ b/docshell/test/browser/file_bug1415918_beforeunload.html
@@ -4,17 +4,17 @@
     body[fired] {
       background-color: #f00;
     }
   </style>
   <script>
     window.onbeforeunload = function() {
       document.body.setAttribute("fired", true);
       return "Parent document prompt";
-    }
+    };
   </script>
 </head>
 <body>
 TEST PAGE
   <iframe style="width: 150px; height: 60px" src="file_bug1415918_beforeunload_iframe.html">
   </iframe>
   <iframe style="width: 150px; height: 60px" src="file_bug1415918_beforeunload_iframe.html">
   </iframe>
--- a/docshell/test/browser/file_bug1415918_beforeunload_2.html
+++ b/docshell/test/browser/file_bug1415918_beforeunload_2.html
@@ -3,17 +3,17 @@
   <style>
     body[fired] {
       background-color: #f00;
     }
   </style>
   <script>
     window.onbeforeunload = function() {
       document.body.setAttribute("fired", true);
-    }
+    };
   </script>
 </head>
 <body>
 TEST PAGE
   <iframe style="width: 150px; height: 60px" src="file_bug1415918_beforeunload_iframe_2.html">
   </iframe>
   <iframe style="width: 150px; height: 60px" src="file_bug1415918_beforeunload_iframe_2.html">
   </iframe>
--- a/docshell/test/browser/file_bug1415918_beforeunload_3.html
+++ b/docshell/test/browser/file_bug1415918_beforeunload_3.html
@@ -3,17 +3,17 @@
   <style>
     body[fired] {
       background-color: #f00;
     }
   </style>
   <script>
     window.onbeforeunload = function() {
       document.body.setAttribute("fired", true);
-    }
+    };
   </script>
 </head>
 <body>
 TEST PAGE
   <iframe style="width: 150px; height: 60px" src="file_bug1415918_beforeunload_iframe.html">
   </iframe>
   <iframe style="width: 150px; height: 60px" src="file_bug1415918_beforeunload_iframe.html">
   </iframe>
--- a/docshell/test/browser/file_bug1415918_beforeunload_iframe.html
+++ b/docshell/test/browser/file_bug1415918_beforeunload_iframe.html
@@ -4,15 +4,15 @@
     body[fired] {
       background-color: #0f0;
     }
   </style>
   <script>
     window.onbeforeunload = function() {
       document.body.setAttribute("fired", true);
       return "Frame document prompt";
-    }
+    };
   </script>
 </head>
 </body>
 FRAME
 </body>
 </html>
--- a/docshell/test/browser/file_bug1415918_beforeunload_iframe_2.html
+++ b/docshell/test/browser/file_bug1415918_beforeunload_iframe_2.html
@@ -3,15 +3,15 @@
   <style>
     body[fired] {
       background-color: #0f0;
     }
   </style>
   <script>
     window.onbeforeunload = function() {
       document.body.setAttribute("fired", true);
-    }
+    };
   </script>
 </head>
 </body>
 FRAME
 </body>
 </html>
--- a/docshell/test/browser/file_bug422543_script.js
+++ b/docshell/test/browser/file_bug422543_script.js
@@ -1,36 +1,36 @@
 function SHistoryListener() {
 }
 
 SHistoryListener.prototype = {
   retval: true,
   last: "initial",
 
-  OnHistoryNewEntry: function (aNewURI) {
+  OnHistoryNewEntry(aNewURI) {
     this.last = "newentry";
   },
 
-  OnHistoryGotoIndex: function (aIndex, aGotoURI) {
+  OnHistoryGotoIndex(aIndex, aGotoURI) {
     this.last = "gotoindex";
   },
 
-  OnHistoryPurge: function (aNumEntries) {
+  OnHistoryPurge(aNumEntries) {
     this.last = "purge";
   },
 
-  OnHistoryReload: function (aReloadURI, aReloadFlags) {
+  OnHistoryReload(aReloadURI, aReloadFlags) {
     this.last = "reload";
     return this.retval;
   },
 
-  OnHistoryReplaceEntry: function (aIndex) {},
+  OnHistoryReplaceEntry(aIndex) {},
 
   QueryInterface: ChromeUtils.generateQI([Ci.nsISHistoryListener,
-                                          Ci.nsISupportsWeakReference])
+                                          Ci.nsISupportsWeakReference]),
 };
 
 let testAPI = {
   shistory: null,
   listeners: [ new SHistoryListener(),
                new SHistoryListener() ],
 
   init() {
--- a/docshell/test/browser/file_bug670318.html
+++ b/docshell/test/browser/file_bug670318.html
@@ -1,20 +1,20 @@
 <html><head>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
 <script>
 function load() {
   function next() {
     if (count < 5)
-      iframe.src = 'data:text/html;charset=utf-8,iframe ' + (++count);
+      iframe.src = "data:text/html;charset=utf-8,iframe " + (++count);
   }
 
   var count = 0;
-  var iframe = document.createElement('iframe');
-  iframe.onload = function () { setTimeout(next, 0) };
+  var iframe = document.createElement("iframe");
+  iframe.onload = function() { setTimeout(next, 0); };
   document.body.appendChild(iframe);
 
   setTimeout(next, 0);
 }
 </script>
 </head>
 
 <body onload="load()">
--- a/docshell/test/browser/frame-head.js
+++ b/docshell/test/browser/frame-head.js
@@ -7,30 +7,30 @@
 const {setTimeout} = ChromeUtils.import("resource://gre/modules/Timer.jsm");
 
 // Functions that look like mochitest functions but forward to the
 // browser process.
 
 this.ok = function(value, message) {
   sendAsyncMessage("browser:test:ok", {
     value: !!value,
-    message: message});
-}
+    message});
+};
 
 this.is = function(v1, v2, message) {
   ok(v1 == v2, message);
-}
+};
 
 this.info = function(message) {
-  sendAsyncMessage("browser:test:info", {message: message});
-}
+  sendAsyncMessage("browser:test:info", {message});
+};
 
 this.finish = function() {
   sendAsyncMessage("browser:test:finish");
-}
+};
 
 /* Start a task that runs some timeline tests in the ordinary way.
  *
  * @param array tests
  *        The tests to run.  This is an array where each element
  *        is of the form { desc, searchFor, setup, check }.
  *
  *        desc is the test description, a string.
@@ -48,17 +48,16 @@ this.finish = function() {
 this.timelineContentTest = function(tests) {
   (async function() {
     let docShell = content.docShell;
 
     info("Start recording");
     docShell.recordProfileTimelineMarkers = true;
 
     for (let {desc, searchFor, setup, check} of tests) {
-
       info("Running test: " + desc);
 
       info("Flushing the previous markers if any");
       docShell.popProfileTimelineMarkers();
 
       info("Running the test setup function");
       let onMarkers = timelineWaitForMarkers(docShell, searchFor);
       setup(docShell);
@@ -72,22 +71,22 @@ this.timelineContentTest = function(test
       info("Running the test check function");
       check(markers);
     }
 
     info("Stop recording");
     docShell.recordProfileTimelineMarkers = false;
     finish();
   })();
-}
+};
 
 function timelineWaitForMarkers(docshell, searchFor) {
   if (typeof(searchFor) == "string") {
     let searchForString = searchFor;
-    let f = function (markers) {
+    let f = function(markers) {
       return markers.some(m => m.name == searchForString);
     };
     searchFor = f;
   }
 
   return new Promise(function(resolve, reject) {
     let waitIterationCount = 0;
     let maxWaitIterationCount = 10; // Wait for 2sec maximum
--- a/docshell/test/browser/onload_message.html
+++ b/docshell/test/browser/onload_message.html
@@ -1,13 +1,13 @@
 <html>
   <head>
     <meta charset="utf-8">
     <script>
-      addEventListener('load', function() {
+      addEventListener("load", function() {
         opener.postMessage("load", "*");
       });
     </script>
   </head>
   <body>
     This file posts a message containing "load" to opener on load completion.
   </body>
 </html>
--- a/docshell/test/browser/onpageshow_message.html
+++ b/docshell/test/browser/onpageshow_message.html
@@ -1,13 +1,13 @@
 <html>
   <head>
     <meta charset="utf-8">
     <script>
-      addEventListener('pageshow', function() {
+      addEventListener("pageshow", function() {
         opener.postMessage("pageshow", "*");
       });
     </script>
   </head>
   <body>
     This file posts a message containing "pageshow" to opener on pageshow.
   </body>
 </html>
--- a/docshell/test/browser/timelineMarkers-04.html
+++ b/docshell/test/browser/timelineMarkers-04.html
@@ -23,30 +23,30 @@
     window.addEventListener("dog", do_xhr, true);
 
     function do_promise() {
       new Promise(function(resolve, reject) {
 	console.time("Bob");
 	window.setTimeout(function() {
           resolve(23);
 	}, 10);
-      }).then(function (val) {
+      }).then(function(val) {
         console.timeEnd("Bob");
       });
     }
 
     window.addEventListener("promisetest", do_promise, true);
 
     var globalResolver;
     function do_promise_script() {
       new Promise(function(resolve, reject) {
 	console.time("Bob");
         globalResolver = resolve;
 	window.setTimeout("globalResolver(23);", 10);
-      }).then(function (val) {
+      }).then(function(val) {
         console.timeEnd("Bob");
       });
     }
 
     window.addEventListener("promisescript", do_promise_script, true);
 
   </script>
 
--- a/docshell/test/iframesandbox/file_child_navigation_by_location.html
+++ b/docshell/test/iframesandbox/file_child_navigation_by_location.html
@@ -1,1 +1,1 @@
-<script>function onNav() { parent.parent.postMessage('childIframe', '*'); } window.onload = onNav; window.onhashchange = onNav;</script>
+<script>function onNav() { parent.parent.postMessage("childIframe", "*"); } window.onload = onNav; window.onhashchange = onNav;</script>
--- a/docshell/test/iframesandbox/file_top_navigation_by_location_exotic.html
+++ b/docshell/test/iframesandbox/file_top_navigation_by_location_exotic.html
@@ -1,20 +1,20 @@
 <!DOCTYPE HTML>
 <html>
 <head>
 <meta charset="utf-8">
 <title>Test window for top navigation by location tests</title>
 <script>
   function onBlock() {
-    opener.postMessage({ name: window.name, blocked: true }, '*');
+    opener.postMessage({ name: window.name, blocked: true }, "*");
   }
 
   function onNav() {
-    opener.postMessage({ name: window.name, blocked: false }, '*');
+    opener.postMessage({ name: window.name, blocked: false }, "*");
   }
 
   function setOwnHref() {
     location.href = location.href;
   }
 
   window.onload = onNav;
 </script>
--- a/docshell/test/iframesandbox/test_child_navigation_by_location.html
+++ b/docshell/test/iframesandbox/test_child_navigation_by_location.html
@@ -12,62 +12,62 @@ html5 sandboxed iframe should not be abl
 
 <script>
   SimpleTest.waitForExplicitFinish();
 
   var testDataUri = "file_child_navigation_by_location.html";
 
   function runScriptNavigationTest(testCase) {
     window.onmessage = function(event) {
-      if (event.data != 'childIframe') {
+      if (event.data != "childIframe") {
         ok(false, "event.data: got '" + event.data + "', expected 'childIframe'");
       }
       ok(!testCase.shouldBeBlocked, testCase.desc + " - child navigation was NOT blocked");
       runNextTest();
     };
     try {
-      window["parentIframe"].eval(testCase.script);
-    } catch(e) {
+      window.parentIframe.eval(testCase.script);
+    } catch (e) {
       ok(testCase.shouldBeBlocked, testCase.desc + " - " + e.message);
       runNextTest();
     }
   }
 
   var testCaseIndex = -1;
   testCases = [
     {
       desc: "Test 1: cross origin child location.replace should NOT be blocked",
       script: "window['crossOriginChildIframe'].location.replace(\"" + testDataUri + "\")",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 2: cross origin child location.assign should be blocked",
       script: "window['crossOriginChildIframe'].location.assign(\"" + testDataUri + "\")",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 3: same origin child location.assign should NOT be blocked",
       script: "window['sameOriginChildIframe'].location.assign(\"" + testDataUri + "\")",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 4: cross origin child location.href should NOT be blocked",
       script: "window['crossOriginChildIframe'].location.href = \"" + testDataUri + "\"",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 5: cross origin child location.hash should be blocked",
       script: "window['crossOriginChildIframe'].location.hash = 'wibble'",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 6: same origin child location.hash should NOT be blocked",
       script: "window['sameOriginChildIframe'].location.hash = 'wibble'",
-      shouldBeBlocked: false
-    }
+      shouldBeBlocked: false,
+    },
   ];
 
   function runNextTest() {
     ++testCaseIndex;
     if (testCaseIndex == testCases.length) {
       SimpleTest.finish();
       return;
     }
--- a/docshell/test/iframesandbox/test_marquee_event_handlers.html
+++ b/docshell/test/iframesandbox/test_marquee_event_handlers.html
@@ -24,42 +24,42 @@ html5 sandboxed iframe should not run ma
 
 <script>
   SimpleTest.waitForExplicitFinish();
 
   var expectedMessages = new Set();
   var numberOfMessagesExpected = 4;
   var unexpectedMessages = new Set();
 
-  window.onmessage = function (event) {
+  window.onmessage = function(event) {
     info(event.data + " message received");
     if (event.data.startsWith("if2") || event.data == "if1 chaser") {
       expectedMessages.add(event.data);
       if (expectedMessages.size == numberOfMessagesExpected) {
         checkRecievedMessages();
       }
     } else {
       unexpectedMessages.add(event.data);
     }
-  }
+  };
 
   function checkRecievedMessages() {
     // Check the expected messages explicitly as a cross-check.
     ok(expectedMessages.has("if1 chaser"),
        "if1 chaser message should have been received");
     ok(expectedMessages.has("if2 marquee onstart"),
        "if2 marquee onstart should have run in iframe sandbox with allow-scripts");
     ok(expectedMessages.has("if2 marquee onbounce"),
        "if2 marquee onbounce should have run in iframe sandbox with allow-scripts");
     ok(expectedMessages.has("if2 marquee onfinish"),
        "if2 marquee onfinish should have run in iframe sandbox with allow-scripts");
 
     unexpectedMessages.forEach(
       (v) => {
-        ok(false, v + " should NOT have run in iframe sandbox without allow-scripts")
+        ok(false, v + " should NOT have run in iframe sandbox without allow-scripts");
       }
     );
 
     SimpleTest.finish();
   }
 
   // If things are working properly the attribute event handlers won't run on
   // the marquee in if1, so add our own capturing listeners on its window, so we
--- a/docshell/test/iframesandbox/test_other_auxiliary_navigation_by_location.html
+++ b/docshell/test/iframesandbox/test_other_auxiliary_navigation_by_location.html
@@ -17,41 +17,41 @@ html5 sandboxed iframe should not be abl
     window.onmessage = function(event) {
       if (event.data != "otherWindow") {
         ok(false, "event.data: got '" + event.data + "', expected 'otherWindow'");
       }
       ok(false, testCase.desc + " - auxiliary navigation was NOT blocked");
       runNextTest();
     };
     try {
-      window["testIframe"].eval(testCase.script);
-    } catch(e) {
+      window.testIframe.eval(testCase.script);
+    } catch (e) {
       ok(true, testCase.desc + " - " + e.message);
       runNextTest();
     }
   }
 
   var testCaseIndex = -1;
   testCases = [
     {
       desc: "Test 1: location.replace on auxiliary NOT opened by us should be blocked",
-      script: "parent.openedWindow.location.replace('file_other_auxiliary_navigation_by_location.html')"
+      script: "parent.openedWindow.location.replace('file_other_auxiliary_navigation_by_location.html')",
     },
     {
       desc: "Test 2: location.assign on auxiliary NOT opened by us should be blocked",
-      script: "parent.openedWindow.location.assign('file_other_auxiliary_navigation_by_location.html')"
+      script: "parent.openedWindow.location.assign('file_other_auxiliary_navigation_by_location.html')",
     },
     {
       desc: "Test 3: location.href on auxiliary NOT opened by us should be blocked",
-      script: "parent.openedWindow.location.href = 'file_other_auxiliary_navigation_by_location.html'"
+      script: "parent.openedWindow.location.href = 'file_other_auxiliary_navigation_by_location.html'",
     },
     {
       desc: "Test 4: location.hash on auxiliary NOT opened by us should be blocked",
-      script: "parent.openedWindow.location.hash = 'wibble'"
-    }
+      script: "parent.openedWindow.location.hash = 'wibble'",
+    },
   ];
 
   function runNextTest() {
     ++testCaseIndex;
     if (testCaseIndex == testCases.length) {
       openedWindow.close();
       SimpleTest.finish();
       return;
@@ -59,17 +59,17 @@ html5 sandboxed iframe should not be abl
 
     runScriptNavigationTest(testCases[testCaseIndex]);
   }
 
   window.onmessage = runNextTest;
 
   window.onload = function() {
     window.openedWindow = window.open("file_other_auxiliary_navigation_by_location.html", "otherWindow");
-  }
+  };
 </script>
 
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=785310">Mozilla Bug 785310</a>
 <p id="display"></p>
 <div id="content">
 Tests for Bug 785310
--- a/docshell/test/iframesandbox/test_our_auxiliary_navigation_by_location.html
+++ b/docshell/test/iframesandbox/test_our_auxiliary_navigation_by_location.html
@@ -17,63 +17,63 @@ html5 sandboxed iframe should not be abl
     window.onmessage = function(event) {
       if (event.data != "ourWindow") {
         ok(false, "event.data: got '" + event.data + "', expected 'ourWindow'");
       }
       ok(!testCase.shouldBeBlocked, testCase.desc + " - auxiliary navigation was NOT blocked");
       runNextTest();
     };
     try {
-      SpecialPowers.wrap(window["testIframe"]).eval(testCase.script);
-    } catch(e) {
+      SpecialPowers.wrap(window.testIframe).eval(testCase.script);
+    } catch (e) {
       ok(testCase.shouldBeBlocked, testCase.desc + " - " + SpecialPowers.wrap(e).message);
       runNextTest();
     }
   }
 
   var testCaseIndex = -1;
   testCases = [
     {
       desc: "Test 1: location.replace on auxiliary opened by us should NOT be blocked",
       script: "openedWindow.location.replace('file_our_auxiliary_navigation_by_location.html')",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 2: location.assign on auxiliary opened by us should be blocked without allow-same-origin",
       script: "openedWindow.location.assign('file_our_auxiliary_navigation_by_location.html')",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 3: location.href on auxiliary opened by us should NOT be blocked",
       script: "openedWindow.location.href = 'file_our_auxiliary_navigation_by_location.html'",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 4: location.hash on auxiliary opened by us should be blocked without allow-same-origin",
       script: "openedWindow.location.hash = 'wibble'",
-      shouldBeBlocked: true
-    }
+      shouldBeBlocked: true,
+    },
   ];
 
   function runNextTest() {
     ++testCaseIndex;
     if (testCaseIndex == testCases.length) {
-      SpecialPowers.wrap(window["testIframe"]).eval("openedWindow.close()");
+      SpecialPowers.wrap(window.testIframe).eval("openedWindow.close()");
       SimpleTest.finish();
       return;
     }
 
     runScriptNavigationTest(testCases[testCaseIndex]);
   }
 
   window.onmessage = runNextTest;
 
   window.onload = function() {
-    SpecialPowers.wrap(window["testIframe"]).eval("var openedWindow = window.open('file_our_auxiliary_navigation_by_location.html', 'ourWindow')");
-  }
+    SpecialPowers.wrap(window.testIframe).eval("var openedWindow = window.open('file_our_auxiliary_navigation_by_location.html', 'ourWindow')");
+  };
 </script>
 
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=785310">Mozilla Bug 785310</a>
 <p id="display"></p>
 <div id="content">
 Tests for Bug 785310
--- a/docshell/test/iframesandbox/test_parent_navigation_by_location.html
+++ b/docshell/test/iframesandbox/test_parent_navigation_by_location.html
@@ -17,41 +17,41 @@ html5 sandboxed iframe should not be abl
     window.onmessage = function(event) {
       if (event.data != "parentIframe") {
         ok(false, "event.data: got '" + event.data + "', expected 'parentIframe'");
       }
       ok(false, testCase.desc + " - parent navigation was NOT blocked");
       runNextTest();
     };
     try {
-      window["parentIframe"]["childIframe"].eval(testCase.script);
-    } catch(e) {
+      window.parentIframe.childIframe.eval(testCase.script);
+    } catch (e) {
       ok(true, testCase.desc + " - " + e.message);
       runNextTest();
     }
   }
 
   var testCaseIndex = -1;
   testCases = [
     {
       desc: "Test 1: parent.location.replace should be blocked even when sandboxed with allow-same-origin allow-top-navigation",
-      script: "parent.location.replace('file_parent_navigation_by_location.html')"
+      script: "parent.location.replace('file_parent_navigation_by_location.html')",
     },
     {
       desc: "Test 2: parent.location.assign should be blocked even when sandboxed with allow-same-origin allow-top-navigation",
-      script: "parent.location.assign('file_parent_navigation_by_location.html')"
+      script: "parent.location.assign('file_parent_navigation_by_location.html')",
     },
     {
       desc: "Test 3: parent.location.href should be blocked even when sandboxed with allow-same-origin allow-top-navigation",
-      script: "parent.location.href = 'file_parent_navigation_by_location.html'"
+      script: "parent.location.href = 'file_parent_navigation_by_location.html'",
     },
     {
       desc: "Test 4: parent.location.hash should be blocked even when sandboxed with allow-same-origin allow-top-navigation",
-      script: "parent.location.hash = 'wibble'"
-    }
+      script: "parent.location.hash = 'wibble'",
+    },
   ];
 
   function runNextTest() {
     ++testCaseIndex;
     if (testCaseIndex == testCases.length) {
       SimpleTest.finish();
       return;
     }
--- a/docshell/test/iframesandbox/test_sibling_navigation_by_location.html
+++ b/docshell/test/iframesandbox/test_sibling_navigation_by_location.html
@@ -19,41 +19,41 @@ html5 sandboxed iframe should not be abl
         ok(false, "event.data: got '" + event.data + "', expected 'siblingIframe'");
       }
 
       ok(false, testCase.desc + " - sibling navigation was NOT blocked");
       runNextTest();
     };
 
     try {
-      window["testIframe"].eval(testCase.script);
-    } catch(e) {
+      window.testIframe.eval(testCase.script);
+    } catch (e) {
       ok(true, testCase.desc + " - " + e.message);
       runNextTest();
     }
   }
 
   var testCaseIndex = -1;
   testCases = [
     {
       desc: "Test 1: sibling location.replace should be blocked even when sandboxed with allow-same-origin allow-top-navigation",
-      script: "parent['siblingIframe'].location.replace('file_sibling_navigation_by_location.html')"
+      script: "parent['siblingIframe'].location.replace('file_sibling_navigation_by_location.html')",
     },
     {
       desc: "Test 2: sibling location.assign should be blocked even when sandboxed with allow-same-origin allow-top-navigation",
-      script: "parent['siblingIframe'].location.assign('file_sibling_navigation_by_location.html')"
+      script: "parent['siblingIframe'].location.assign('file_sibling_navigation_by_location.html')",
     },
     {
       desc: "Test 3: sibling location.href should be blocked even when sandboxed with allow-same-origin allow-top-navigation",
-      script: "parent['siblingIframe'].location.href = 'file_sibling_navigation_by_location.html'"
+      script: "parent['siblingIframe'].location.href = 'file_sibling_navigation_by_location.html'",
     },
     {
       desc: "Test 4: sibling location.hash should be blocked even when sandboxed with allow-same-origin allow-top-navigation",
-      script: "parent['siblingIframe'].location.hash = 'wibble'"
-    }
+      script: "parent['siblingIframe'].location.hash = 'wibble'",
+    },
   ];
 
   function runNextTest() {
     ++testCaseIndex;
     if (testCaseIndex == testCases.length) {
       SimpleTest.finish();
       return;
     }
--- a/docshell/test/iframesandbox/test_top_navigation_by_location.html
+++ b/docshell/test/iframesandbox/test_top_navigation_by_location.html
@@ -19,132 +19,132 @@ html5 sandboxed iframe should not be abl
       if (event.data != "newTop") {
         ok(false, "event.data: got '" + event.data + "', expected 'newTop'");
       }
       ok(!testCase.shouldBeBlocked, testCase.desc + " - top navigation was NOT blocked");
       runNextTest();
     };
     try {
       SpecialPowers.wrap(testWin[testCase.iframeName]).eval(testCase.script);
-    } catch(e) {
+    } catch (e) {
       ok(testCase.shouldBeBlocked, testCase.desc + " - " + SpecialPowers.wrap(e).message);
       runNextTest();
     }
   }
 
   var testCaseIndex = -1;
   testCases = [
     {
       desc: "Test 1: top.location.replace should be blocked when sandboxed without allow-top-navigation",
       script: "top.location.replace('file_top_navigation_by_location.html')",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 2: top.location.assign should be blocked when sandboxed without allow-top-navigation",
       script: "top.location.assign('file_top_navigation_by_location.html')",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 3: top.location.href should be blocked when sandboxed without allow-top-navigation",
       script: "top.location.href = 'file_top_navigation_by_location.html'",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 4: top.location.pathname should be blocked when sandboxed without allow-top-navigation",
       script: "top.location.pathname = top.location.pathname",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 5: top.location should be blocked when sandboxed without allow-top-navigation",
       script: "top.location = 'file_top_navigation_by_location.html'",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 6: top.location.hash should be blocked when sandboxed without allow-top-navigation",
       script: "top.location.hash = 'wibble'",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 7: top.location.replace should NOT be blocked when sandboxed with allow-same-origin allow-top-navigation",
       script: "top.location.replace('file_top_navigation_by_location.html')",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 8: top.location.assign should NOT be blocked when sandboxed with allow-same-origin allow-top-navigation",
       script: "top.location.assign('file_top_navigation_by_location.html')",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 9: top.location.href should NOT be blocked when sandboxed with allow-same-origin allow-top-navigation",
       script: "top.location.href = 'file_top_navigation_by_location.html'",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 10: top.location.pathname should NOT be blocked when sandboxed with allow-same-origin allow-top-navigation",
       script: "top.location.pathname = top.location.pathname",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 11: top.location should NOT be blocked when sandboxed with allow-same-origin allow-top-navigation",
       script: "top.location = 'file_top_navigation_by_location.html'",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 12: top.location.hash should NOT be blocked when sandboxed with allow-same-origin allow-top-navigation",
       script: "top.location.hash = 'wibble'",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 13: top.location.replace should NOT be blocked when sandboxed with allow-top-navigation, but without allow-same-origin",
       script: "top.location.replace('file_top_navigation_by_location.html')",
       iframeName: "if3",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 14: top.location.assign should be blocked when sandboxed with allow-top-navigation, but without allow-same-origin",
       script: "top.location.assign('file_top_navigation_by_location.html')",
       iframeName: "if3",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 15: top.location.href should NOT be blocked when sandboxed with allow-top-navigation, but without allow-same-origin",
       script: "top.location.href = 'file_top_navigation_by_location.html'",
       iframeName: "if3",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 16: top.location.pathname should be blocked when sandboxed with allow-top-navigation, but without allow-same-origin",
       script: "top.location.pathname = top.location.pathname",
       iframeName: "if3",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 17: top.location should NOT be blocked when sandboxed with allow-top-navigation, but without allow-same-origin",
       script: "top.location = 'file_top_navigation_by_location.html'",
       iframeName: "if3",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 18: top.location.hash should be blocked when sandboxed with allow-top-navigation, but without allow-same-origin",
       script: "top.location.hash = 'wibble'",
       iframeName: "if3",
-      shouldBeBlocked: true
-   }
+      shouldBeBlocked: true,
+   },
   ];
 
   function runNextTest() {
     ++testCaseIndex;
     if (testCaseIndex == testCases.length) {
       testWin.close();
       SimpleTest.finish();
       return;
--- a/docshell/test/iframesandbox/test_top_navigation_by_location_exotic.html
+++ b/docshell/test/iframesandbox/test_top_navigation_by_location_exotic.html
@@ -11,192 +11,192 @@ html5 sandboxed iframe should not be abl
 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 <script>
   SimpleTest.waitForExplicitFinish();
 
   var testWin;
 
   function runScriptNavigationTest(testCase) {
     window.onmessage = function(event) {
-      if (event.data.name != 'newWindow') {
+      if (event.data.name != "newWindow") {
         ok(false, "event.data.name: got '" + event.data.name + "', expected 'newWindow'");
       }
       var diag = "top navigation was " + (event.data.blocked ? "" : "NOT ") + "blocked";
       ok((testCase.shouldBeBlocked == event.data.blocked), testCase.desc + " - " + diag);
       runNextTest();
     };
     try {
       testWin[testCase.iframeName].eval(testCase.script);
-    } catch(e) {
+    } catch (e) {
       ok(testCase.shouldBeBlocked, testCase.desc + " - " + e.message);
       runNextTest();
     }
   }
 
   var testCaseIndex = -1;
   testCases = [
     {
       desc: "Test 1: location.replace.call(top.location, ...) should be blocked when sandboxed without allow-top-navigation",
       script: "location.replace.call(top.location, 'file_top_navigation_by_location_exotic.html')",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 2: location.replace.bind(top.location, ...) should be blocked when sandboxed without allow-top-navigation",
       script: "location.replace.bind(top.location, 'file_top_navigation_by_location_exotic.html')()",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 3: Function.bind.call(location.replace, top.location, ...) should be blocked when sandboxed without allow-top-navigation",
       script: "Function.bind.call(location.replace, top.location, 'file_top_navigation_by_location_exotic.html')()",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 4: location.replace.call(top.location, ...) should NOT be blocked when sandboxed with allow-top-navigation",
       script: "location.replace.call(top.location, 'file_top_navigation_by_location_exotic.html')",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 5: location.replace.bind(top.location, ...) should NOT be blocked when sandboxed with allow-top-navigation",
       script: "location.replace.bind(top.location, 'file_top_navigation_by_location_exotic.html')()",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 6: Function.bind.call(location.replace, top.location, ...) should NOT be blocked when sandboxed with allow-top-navigation",
       script: "Function.bind.call(location.replace, top.location, 'file_top_navigation_by_location_exotic.html')()",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 7: top.location.href, via setTimeout, should be blocked when sandboxed without allow-top-navigation",
       script: "setTimeout(function() { try { top.location.href = 'file_top_navigation_by_location_exotic.html' } catch (e) { top.onBlock() } }, 0)",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 8: top.location.href, via setTimeout, should NOT be blocked when sandboxed with allow-top-navigation",
       script: "setTimeout(function() { try { top.location.href = 'file_top_navigation_by_location_exotic.html' } catch(e) { top.onBlock() } }, 0)",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 9: top.location.href, via eval, should be blocked when sandboxed without allow-top-navigation",
       script: "eval('top.location.href = \"file_top_navigation_by_location_exotic.html\"')",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 10: top.location.href, via eval, should NOT be blocked when sandboxed with allow-top-navigation",
       script: "eval('top.location.href = \"file_top_navigation_by_location_exotic.html\"')",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 11: top.location.href, via anonymous function, should be blocked when sandboxed without allow-top-navigation",
       script: "(function() { top.location.href = 'file_top_navigation_by_location_exotic.html' })()",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 12: top.location.href, via anonymous function, should NOT be blocked when sandboxed with allow-top-navigation",
       script: "(function() { top.location.href = 'file_top_navigation_by_location_exotic.html' })()",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 13: top.location.href, via function inserted in top, should be blocked when sandboxed without allow-top-navigation",
       script: "top.doTest = function() { top.location.href = 'file_top_navigation_by_location_exotic.html' }; top.doTest();",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 14: top.location.href, via function inserted in top, should NOT be blocked when sandboxed with allow-top-navigation",
       script: "top.doTest = function() { top.location.href = 'file_top_navigation_by_location_exotic.html' }; top.doTest();",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 15: top.location.href, via function inserted in us by top, should NOT be blocked when sandboxed without allow-top-navigation",
       script: "top.eval('window[\"if1\"].doTest = function() { top.location.href = \"file_top_navigation_by_location_exotic.html\" };'), doTest();",
       iframeName: "if1",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 16: top.location.href, via function inserted in top, should NOT be blocked when sandboxed with allow-top-navigation",
       script: "top.eval('window[\"if2\"].doTest = function() { top.location.href = \"file_top_navigation_by_location_exotic.html\" };'), doTest();",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 17: top.location.href, via function in top, should NOT be blocked when sandboxed without allow-top-navigation",
       script: "top.setOwnHref()",
       iframeName: "if1",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 18: top.location.href, via function in top, should NOT be blocked when sandboxed with allow-top-navigation",
       script: "top.setOwnHref()",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 19: top.location.href, via eval in top, should NOT be blocked when sandboxed without allow-top-navigation",
       script: "top.eval('location.href = \"file_top_navigation_by_location_exotic.html\"')",
       iframeName: "if1",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 20: top.location.href, via eval in top, should NOT be blocked when sandboxed with allow-top-navigation",
       script: "top.eval('location.href = \"file_top_navigation_by_location_exotic.html\"')",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 21: top.location.href, via eval in top calling us, should be blocked when sandboxed without allow-top-navigation",
       script: "function doTest() { top.location.href = 'file_top_navigation_by_location_exotic.html' } top.eval('window[\"if1\"].doTest()');",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 22: top.location.href, via eval in top calling us, should NOT be blocked when sandboxed with allow-top-navigation",
       script: "function doTest() { top.location.href = 'file_top_navigation_by_location_exotic.html' } top.eval('window[\"if2\"].doTest()');",
       iframeName: "if2",
-      shouldBeBlocked: false
+      shouldBeBlocked: false,
     },
     {
       desc: "Test 23: top.location.href, via function bound to top, should be blocked when sandboxed without allow-top-navigation",
       script: "(function() { top.location.href = 'file_top_navigation_by_location_exotic.html' }).bind(top)();",
       iframeName: "if1",
-      shouldBeBlocked: true
+      shouldBeBlocked: true,
     },
     {
       desc: "Test 24: top.location.href, via function bound to top, should NOT be blocked when sandboxed with allow-top-navigation",
       script: "(function() { top.location.href = 'file_top_navigation_by_location_exotic.html' }).bind(top)();",
       iframeName: "if2",
-      shouldBeBlocked: false
-    }
+      shouldBeBlocked: false,
+    },
   ];
 
   function runNextTest() {
     ++testCaseIndex;
     if (testCaseIndex == testCases.length) {
       testWin.close();
       SimpleTest.finish();
       return;
     }
 
     runScriptNavigationTest(testCases[testCaseIndex]);
   }
 
   window.onmessage = runNextTest;
-  testWin = window.open('file_top_navigation_by_location_exotic.html', "newWindow");
+  testWin = window.open("file_top_navigation_by_location_exotic.html", "newWindow");
 </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=785310">Mozilla Bug 785310</a>
 <p id="display"></p>
 <div id="content">
 Tests for Bug 785310
 </div>
--- a/docshell/test/mochitest/bug570341_recordevents.html
+++ b/docshell/test/mochitest/bug570341_recordevents.html
@@ -1,20 +1,20 @@
 <html>
 <head>
 <script>
     var start = Date.now();
     window._testing_js_start = Date.now();
-    window['_testing_js_after_' + document.readyState] = start;
-    document.addEventListener('DOMContentLoaded',
-      function () {
+    window["_testing_js_after_" + document.readyState] = start;
+    document.addEventListener("DOMContentLoaded",
+      function() {
         window._testing_evt_DOMContentLoaded = Date.now();
       }, true);
-    document.addEventListener('readystatechange', function(){
-      window['_testing_evt_DOM_' + document.readyState] = Date.now();
+    document.addEventListener("readystatechange", function() {
+      window["_testing_evt_DOM_" + document.readyState] = Date.now();
     }, true);
     function recordLoad() {
       window._testing_evt_load = Date.now();
     }
 </script>
 </head>
 <body onload="recordLoad()">This document collects time
 for events related to the page load progress.</body>
--- a/docshell/test/mochitest/file_bug1450164.html
+++ b/docshell/test/mochitest/file_bug1450164.html
@@ -1,14 +1,14 @@
 <html>
   <head>
     <script>
      function go() {
        var a = window.history.state;
-       window.history.replaceState(a,"","1");
+       window.history.replaceState(a, "", "1");
        var ok = opener.ok;
        var SimpleTest = opener.SimpleTest;
        ok("Addition of history in unload did not crash browser");
        SimpleTest.finish();
      }
     </script>
   </head>
   <body onunload="go()">
--- a/docshell/test/mochitest/file_bug385434_3.html
+++ b/docshell/test/mochitest/file_bug385434_3.html
@@ -2,21 +2,21 @@
 Inner frame for test of bug 385434.
 https://bugzilla.mozilla.org/show_bug.cgi?id=385434
 -->
 <html>
 <head>
   <script type="application/javascript">
     // Notify our parent if we have a hashchange and once we're done loading.
     window.addEventListener("hashchange", parent.onIframeHashchange);
-  
+
     window.addEventListener("DOMContentLoaded", function() {
       // This also should trigger a hashchange, becuase the readystate is
       // "interactive", not "complete" during DOMContentLoaded.
       window.location.hash = "2";
     });
-  
+
   </script>
 </head>
 
 <body>
 </body>
 </html>
--- a/docshell/test/mochitest/file_bug598895_1.html
+++ b/docshell/test/mochitest/file_bug598895_1.html
@@ -1,1 +1,1 @@
-<script>window.onload = function() { opener.postMessage('loaded', '*'); }</script><body>Should show</body>
+<script>window.onload = function() { opener.postMessage("loaded", "*"); };</script><body>Should show</body>
--- a/docshell/test/mochitest/file_bug598895_2.html
+++ b/docshell/test/mochitest/file_bug598895_2.html
@@ -1,1 +1,1 @@
-<script>window.onload = function() { opener.postMessage('loaded', '*'); }</script><body></body>
+<script>window.onload = function() { opener.postMessage("loaded", "*"); };</script><body></body>
--- a/docshell/test/mochitest/file_bug637644_1.html
+++ b/docshell/test/mochitest/file_bug637644_1.html
@@ -1,1 +1,1 @@
-<script>window.onload = function() { opener.postMessage('loaded', '*'); }</script><body>Should show</body>
+<script>window.onload = function() { opener.postMessage("loaded", "*"); };</script><body>Should show</body>
--- a/docshell/test/mochitest/file_bug637644_2.html
+++ b/docshell/test/mochitest/file_bug637644_2.html
@@ -1,1 +1,1 @@
-<script>window.onload = function() { opener.postMessage('loaded', '*'); }</script><body></body>
+<script>window.onload = function() { opener.postMessage("loaded", "*"); };</script><body></body>
--- a/docshell/test/mochitest/file_bug660404-1.html
+++ b/docshell/test/mochitest/file_bug660404-1.html
@@ -1,1 +1,1 @@
-<script>window.onload = function() { opener.continueTest(); }</script>
+<script>window.onload = function() { opener.continueTest(); };</script>
--- a/docshell/test/mochitest/file_bug668513.html
+++ b/docshell/test/mochitest/file_bug668513.html
@@ -7,93 +7,88 @@
   var ok = opener.ok;
   var is = opener.is;
 
   function finish() {
     SimpleTest.finish();
     close();
   }
 
-  function onload_test()
-  {
+  function onload_test() {
     var win = frames[0];
-    ok(win.performance, 'Window.performance should be defined');
-    ok(win.performance.navigation, 'Window.performance.navigation should be defined');
+    ok(win.performance, "Window.performance should be defined");
+    ok(win.performance.navigation, "Window.performance.navigation should be defined");
     var navigation = win.performance && win.performance.navigation;
-    if (navigation === undefined)
-    {
+    if (navigation === undefined) {
       // avoid script errors
       finish();
       return;
     }
 
     // do this with a timeout to see the visuals of the navigations.
     setTimeout("nav_frame();", 100);
   }
 
   var step = 1;
-  function nav_frame()
-  {
+  function nav_frame() {
     var navigation_frame = frames[0];
     var navigation = navigation_frame.performance.navigation;
-    switch (step)
-    {
+    switch (step) {
       case 1:
       {
-        navigation_frame.location.href = 'bug570341_recordevents.html';
+        navigation_frame.location.href = "bug570341_recordevents.html";
         step++;
         break;
       }
       case 2:
       {
         is(navigation.type, navigation.TYPE_NAVIGATE,
-           'Expected window.performance.navigation.type == TYPE_NAVIGATE');
+           "Expected window.performance.navigation.type == TYPE_NAVIGATE");
         navigation_frame.history.back();
         step++;
         break;
       }
       case 3:
       {
         is(navigation.type, navigation.TYPE_BACK_FORWARD,
-           'Expected window.performance.navigation.type == TYPE_BACK_FORWARD');
+           "Expected window.performance.navigation.type == TYPE_BACK_FORWARD");
         step++;
         navigation_frame.history.forward();
         break;
       }
       case 4:
       {
         is(navigation.type, navigation.TYPE_BACK_FORWARD,
-           'Expected window.performance.navigation.type == TYPE_BACK_FORWARD');
-        navigation_frame.location.href = 'bug668513_redirect.html';
+           "Expected window.performance.navigation.type == TYPE_BACK_FORWARD");
+        navigation_frame.location.href = "bug668513_redirect.html";
         step++;
         break;
       }
       case 5:
       {
         is(navigation.type, navigation.TYPE_NAVIGATE,
-           'Expected timing.navigation.type as TYPE_NAVIGATE');
-        is(navigation.redirectCount, 1, 
-           'Expected navigation.redirectCount == 1 on an server redirected navigation');
+           "Expected timing.navigation.type as TYPE_NAVIGATE");
+        is(navigation.redirectCount, 1,
+           "Expected navigation.redirectCount == 1 on an server redirected navigation");
 
         var timing = navigation_frame.performance && navigation_frame.performance.timing;
-        if (timing === undefined)
-        {
+        if (timing === undefined) {
           // avoid script errors
           finish();
           break;
         }
-        ok(timing.navigationStart > 0, 'navigationStart should be > 0');
-        sequence = ['navigationStart', 'redirectStart', 'redirectEnd', 'fetchStart'];
+        ok(timing.navigationStart > 0, "navigationStart should be > 0");
+        sequence = ["navigationStart", "redirectStart", "redirectEnd", "fetchStart"];
         for (var j = 1; j < sequence.length; ++j) {
           var prop = sequence[j];
-          var prevProp = sequence[j-1];
+          var prevProp = sequence[j - 1];
           ok(timing[prevProp] <= timing[prop],
-             ['Expected ', prevProp, ' to happen before ', prop,
-              ', got ', prevProp, ' = ', timing[prevProp],
-              ', ', prop, ' = ', timing[prop]].join(''));
+             ["Expected ", prevProp, " to happen before ", prop,
+              ", got ", prevProp, " = ", timing[prevProp],
+              ", ", prop, " = ", timing[prop]].join(""));
         }
         step++;
         finish();
       }
       default:
         break;
     }
   }
--- a/docshell/test/mochitest/file_bug675587.html
+++ b/docshell/test/mochitest/file_bug675587.html
@@ -1,1 +1,1 @@
-<script>location.hash='';</script>
+<script>location.hash = "";</script>
--- a/docshell/test/mochitest/file_close_onpagehide1.html
+++ b/docshell/test/mochitest/file_close_onpagehide1.html
@@ -1,5 +1,5 @@
 <script>
   window.onload = () => {
     opener.postMessage("initial", "*");
-  }
+  };
 </script>
--- a/docshell/test/mochitest/file_close_onpagehide2.html
+++ b/docshell/test/mochitest/file_close_onpagehide2.html
@@ -1,5 +1,5 @@
 <script>
   window.onload = () => {
     opener.postMessage("second", "*");
-  }
+  };
 </script>;
--- a/docshell/test/mochitest/test_anchor_scroll_after_document_open.html
+++ b/docshell/test/mochitest/test_anchor_scroll_after_document_open.html
@@ -22,27 +22,27 @@ https://bugzilla.mozilla.org/show_bug.cg
     if (msg.data == "doTest") {
       if (!gotOnload) {
         addLoadEvent(function() { handleMessage(msg); });
         return;
       }
       frames[0].onscroll = function() {
         ok(true, "Got a scroll event");
         SimpleTest.finish();
-      }
+      };
       frames[0].location.hash = "#target";
       return;
     }
     if (msg.data == "haveHash") {
       ok(false, "Child got reloaded");
     } else {
       ok(false, "Unexpected message");
     }
     SimpleTest.finish();
-  }
+  };
 
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=881487">Mozilla Bug 881487</a>
 <p id="display">
   <!-- iframe goes here so it can scroll -->
 <iframe src="file_anchor_scroll_after_document_open.html"></iframe>
--- a/docshell/test/mochitest/test_bfcache_plus_hash.html
+++ b/docshell/test/mochitest/test_bfcache_plus_hash.html
@@ -15,85 +15,83 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 646641 **/
 
-/* 
+/*
  * In a popup (because navigating the main frame confuses Mochitest), do the
  * following:
  *
  *  * Call history.pushState().
  *  * Navigate to a new page.
  *  * Go back two history entries.
  *
  * Check that we go back, we retrieve the document from bfcache.
  */
 
 SimpleTest.waitForExplicitFinish();
 
 function debug(msg) {
   // Wrap dump so we can turn debug messages on and off easily.
-  dump(msg + '\n');
+  dump(msg + "\n");
 }
 
 var expectedLoadNum = -1;
 function childLoad(n) {
   if (n == expectedLoadNum) {
-    debug('Got load ' + n);
+    debug("Got load " + n);
     expectedLoadNum = -1;
 
     // Spin the event loop before calling gGen.next() so the generator runs
     // outside the onload handler.  This prevents us from encountering all
     // sorts of docshell quirks.
-    setTimeout(function() { gGen.next() }, 0);
-  }
-  else {
-    debug('Got unexpected load ' + n);
-    ok(false, 'Got unexpected load ' + n);
+    setTimeout(function() { gGen.next(); }, 0);
+  } else {
+    debug("Got unexpected load " + n);
+    ok(false, "Got unexpected load " + n);
   }
 }
 
 var expectedPageshowNum = -1;
 function childPageshow(n) {
   if (n == expectedPageshowNum) {
-    debug('Got expected pageshow ' + n);
+    debug("Got expected pageshow " + n);
     expectedPageshowNum = -1;
-    ok(true, 'Got expected pageshow ' + n);
-    setTimeout(function() { gGen.next() }, 0);
-  }
-  else {
-    debug('Got pageshow ' + n);
+    ok(true, "Got expected pageshow " + n);
+    setTimeout(function() { gGen.next(); }, 0);
+  } else {
+    debug("Got pageshow " + n);
   }
 
   // Since a pageshow comes along with an onload, don't fail the test if we get
   // an unexpected pageshow.
 }
 
 function waitForLoad(n) {
-  debug('Waiting for load ' + n);
+  debug("Waiting for load " + n);
   expectedLoadNum = n;
 }
 
 function waitForShow(n) {
-  debug('Waiting for show ' + n);
+  debug("Waiting for show " + n);
   expectedPageshowNum = n;
 }
 
 function* test() {
-  var popup = window.open('file_bfcache_plus_hash_1.html');
+  var popup = window.open("file_bfcache_plus_hash_1.html");
   waitForLoad(1);
   yield undefined;
 
-  popup.history.pushState('', '', '');
+  popup.history.pushState("", "", "");
 
-  popup.location = 'file_bfcache_plus_hash_2.html';
+  popup.location = "file_bfcache_plus_hash_2.html";
   waitForLoad(2);
   yield undefined;
 
   // Now go back 2.  The first page should be retrieved from bfcache.
   popup.history.go(-2);
   waitForShow(1);
   yield undefined;
 
--- a/docshell/test/mochitest/test_bug1045096.html
+++ b/docshell/test/mochitest/test_bug1045096.html
@@ -15,15 +15,15 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 </pre>
   <script type="application/javascript">
 
   /** Test for Bug 1045096 **/
-  var i = document.createElement('iframe');
+  var i = document.createElement("iframe");
   i.src = "javascript:false"; // This is required!
   $("content").appendChild(i);
   ok(i.contentWindow.performance, "Should have a performance object");
   </script>
 </body>
 </html>
--- a/docshell/test/mochitest/test_bug1121701.html
+++ b/docshell/test/mochitest/test_bug1121701.html
@@ -22,37 +22,37 @@ https://bugzilla.mozilla.org/show_bug.cg
     if (page1LoadCount == 1) {
       SimpleTest.executeSoon(function() {
         is(e.persisted, false, "Initial page load shouldn't be persisted.");
         testWin.document.body.innerHTML = "modified";
         testWin.onpagehide = function(e) {
           testWin.onpagehide = null;
           ok(e.persisted, "test page 1 should have been persisted");
           is(testWin.document.body.innerHTML, "modified");
-        }
+        };
         testWin.location.href = testUrl2;
       });
     } else if (page1LoadCount == 2) {
       is(e.persisted, true, "Page load from bfcache should be persisted.");
       is(testWin.document.body.innerHTML, "modified");
       testWin.close();
       SimpleTest.finish();
     }
   }
 
   function child2PageShow(e) {
     testWin.document.body.innerHTML = "<img>";
     SimpleTest.executeSoon(function() {
       testWin.onmessage = function() {
         ok(true, "Got message");
         testWin.document.body.firstChild.src = location.href;
-      }
+      };
       testWin.onbeforeunload = function() {
         testWin.postMessage("foo", "*");
-      }
+      };
       testWin.history.back();
     });
   }
 
   SimpleTest.waitForExplicitFinish();
   addLoadEvent(function() {
     testWin = window.open(testUrl1);
   });
--- a/docshell/test/mochitest/test_bug1151421.html
+++ b/docshell/test/mochitest/test_bug1151421.html
@@ -21,20 +21,19 @@ function childLoad() {
   SimpleTest.executeSoon(childLoad2);
 }
 
 function childLoad2() {
   let cw = iframe.contentWindow;
   let content = cw.document.getElementById("content");
 
   // Create a function to calculate an invariant.
-  let topPlusOffset = function()
-  {
+  let topPlusOffset = function() {
     return Math.round(content.getBoundingClientRect().top + cw.pageYOffset);
-  }
+  };
 
   let initialTPO = topPlusOffset();
 
   // Scroll the iframe to various positions, and check the TPO.
   // Scrolling down to the bottom will adjust the page offset by a fractional amount.
   let positions = [-100, 0.17, 0, 1.5, 10.41, 1e6, 12.1];
 
   // Run some tests with scrollTo() and ensure we have the same invariant after scrolling.
--- a/docshell/test/mochitest/test_bug1186774.html
+++ b/docshell/test/mochitest/test_bug1186774.html
@@ -20,23 +20,23 @@ function runTest() {
     setTimeout(function() {
       child.scrollTo(0, 0);
       child.history.pushState({}, "initial");
       child.scrollTo(0, 3000);
       child.history.pushState({}, "scrolled");
       child.scrollTo(0, 6000);
       child.history.back();
     });
-  }
+  };
 
   child.onpopstate = function() {
-    is(Math.round(child.scrollY),  6000, "Shouldn't have scrolled before popstate");
+    is(Math.round(child.scrollY), 6000, "Shouldn't have scrolled before popstate");
     child.close();
     SimpleTest.finish();
-  }
+  };
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
 
   </script>
 </head>
 <body>
--- a/docshell/test/mochitest/test_bug1450164.html
+++ b/docshell/test/mochitest/test_bug1450164.html
@@ -12,17 +12,17 @@
 
      /** Test for Bug 1450164 **/
 
      function runTest() {
        child = window.open("file_bug1450164.html", "", "width=100,height=100");
        child.onload = function() {
          // After the window loads, close it. If we don't crash in debug, consider that a pass.
          child.close();
-       }
+       };
      }
 
      SimpleTest.waitForExplicitFinish();
      addLoadEvent(runTest);
 
     </script>
   </head>
   <body>
--- a/docshell/test/mochitest/test_bug1507702.html
+++ b/docshell/test/mochitest/test_bug1507702.html
@@ -25,17 +25,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     }
 
     let threw;
     try {
       await fetch(url);
       threw = false;
     } catch (e) {
       threw = true;
-    };
+    }
 
     ok(threw === true, "fetch should reject");
     return testFetch();
   }
 
   document.body.onload = async () => {
     for (const url of ["about:crashparent", "about:crashcontent"]) {
       SimpleTest.doesThrow(() => {
--- a/docshell/test/mochitest/test_bug384014.html
+++ b/docshell/test/mochitest/test_bug384014.html
@@ -18,21 +18,21 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 384014 **/
 SimpleTest.waitForExplicitFinish();
 
 function runTest() {
-  $("f").onload = function () {
+  $("f").onload = function() {
     is($("f").contentDocument.documentElement.textContent, "PASS",
       "We fail");
     SimpleTest.finish();
-  }
+  };
 
   $("f").contentWindow.location.reload();
 }
 
 addLoadEvent(runTest);
 
 </script>
 </pre>
--- a/docshell/test/mochitest/test_bug385434.html
+++ b/docshell/test/mochitest/test_bug385434.html
@@ -30,17 +30,17 @@ var gCallbackOnIframeLoad = false;
 function statusMsg(msg) {
   var msgElem = document.createElement("p");
   msgElem.appendChild(document.createTextNode(msg));
 
   document.getElementById("status").appendChild(msgElem);
 }
 
 function longWait() {
-  setTimeout(function() { gGen.next() }, 1000);
+  setTimeout(function() { gGen.next(); }, 1000);
 }
 
 // onIframeHashchange, onIframeLoad, and onIframeScroll are all called by the
 // content we load into our iframe in order to notify the parent frame of an
 // event which was fired.
 function onIframeHashchange() {
   gNumHashchanges++;
   gGen.next();
--- a/docshell/test/mochitest/test_bug387979.html
+++ b/docshell/test/mochitest/test_bug387979.html
@@ -14,18 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 387979 **/
 function a(s) {
 	var r;
-	try { r = frames[0].document.body; }
-	catch (e) { r = e; }
+	try { r = frames[0].document.body; } catch (e) { r = e; }
         is(r instanceof frames[0].HTMLBodyElement, true,
            "Can't get body" + s);
 }
 var p = 0;
 function b() {
 	switch (++p) {
 	case 1:
 		frames[0].location = "about:blank";
--- a/docshell/test/mochitest/test_bug402210.html
+++ b/docshell/test/mochitest/test_bug402210.html
@@ -30,20 +30,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
 function runTest() {
   $("testlink").href = "https:example.com";
   is($("testlink").href, "https://example.com/", "Setting href on an anchor tag should fixup missing slashes after https protocol");
-  
+
   $("testlink").href = "ftp:example.com";
   is($("testlink").href, "ftp://example.com/", "Setting href on an anchor tag should fixup missing slashes after non-http protocol");
-  
+
   SimpleTest.finish();
 }
 
 addLoadEvent(runTest);
 </script>
 </pre>
 </body>
 </html>
--- a/docshell/test/mochitest/test_bug404548.html
+++ b/docshell/test/mochitest/test_bug404548.html
@@ -22,17 +22,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 var firstRemoved = false;
 var secondHidden = false;
 
 SimpleTest.waitForExplicitFinish();
 
 var w = window.open("bug404548-subframe.html", "", "width=10,height=10");
 
 function finishTest() {
-  is(firstRemoved, true, "Should have removed iframe from the DOM")
+  is(firstRemoved, true, "Should have removed iframe from the DOM");
   is(secondHidden, true, "Should have fired pagehide on second kid");
   w.close();
   SimpleTest.finish();
 }
 </script>
 </pre>
 </body>
 </html>
--- a/docshell/test/mochitest/test_bug413310.html
+++ b/docshell/test/mochitest/test_bug413310.html
@@ -20,19 +20,19 @@ if (navigator.platform.startsWith("Mac")
 }
 
 /** Test for Bug 413310 **/
 
 // NOTE: If we ever make subframes do bfcache stuff, this test will need to be
 // modified accordingly!  It assumes that subframes do NOT get bfcached.
 var onloadCount = 0;
 
-var step = -1;  // One increment will come from the initial subframe onload.
-                // Note that this script should come before the subframe,
-                // so that doNextStep is defined when its onload handler fires.
+var step = -1; // One increment will come from the initial subframe onload.
+               // Note that this script should come before the subframe,
+               // so that doNextStep is defined when its onload handler fires.
 
 var textContent;
 
 SimpleTest.waitForExplicitFinish();
 
 addLoadEvent(doNextStep);
 
 function doNextStep() {
@@ -55,25 +55,25 @@ function doNextStep() {
          "Unexpected subframe location after POST load");
 
       textContent = $("i").contentDocument.body.textContent;
       isDeeply(textContent.match(/^POST /), ["POST "], "Not a POST?");
 
       $("i").contentWindow.location.hash = "foo";
       setTimeout(doNextStep, 0);
       break;
-    case 3: 
+    case 3:
       is(onloadCount, 2, "Anchor scroll should not fire onload");
       is($("i").contentWindow.location.href,
          location.href.replace(/test_bug413310.html/,
                                "bug413310-post.sjs#foo"),
          "Unexpected subframe location after anchor scroll");
       is(textContent, $("i").contentDocument.body.textContent,
          "Did a load when scrolling?");
-      $("i").contentWindow.location.href = "bug413310-subframe.html";;
+      $("i").contentWindow.location.href = "bug413310-subframe.html";
       break;
     case 4:
       is(onloadCount, 3, "Done new load");
       is($("i").contentWindow.location.href,
          location.href.replace(/test_bug413310.html/,
                                "bug413310-subframe.html"),
          "Unexpected subframe location after new load");
       history.back();
--- a/docshell/test/mochitest/test_bug475636.html
+++ b/docshell/test/mochitest/test_bug475636.html
@@ -28,17 +28,17 @@ window.private = 42;
 
 window.addEventListener("message", function(e) {
   gen.next(e.data);
 });
 
 var url = "file_bug475636.sjs?";
 
 function* runTests() {
-  var loader = document.getElementById('loader');
+  var loader = document.getElementById("loader");
   for (var testNum = 1; ; ++testNum) {
     loader.src = url + testNum;
     let res = (yield);
     if (res == "done") {
       SimpleTest.finish();
       return;
     }
     is(res, "pass");
--- a/docshell/test/mochitest/test_bug509055.html
+++ b/docshell/test/mochitest/test_bug509055.html
@@ -26,70 +26,70 @@ var gGen;
 
 function shortWait() {
   setTimeout(function() { gGen.next(); }, 0, false);
 }
 
 function onChildHashchange(e) {
   // gGen might be undefined when we refresh the page, so we have to check here
   dump("onChildHashchange() called.\n");
-  if(gGen)
+  if (gGen)
     gGen.next();
 }
 
 function onChildLoad(e) {
-  if(gGen)
+  if (gGen)
     gGen.next();
 }
 
 function* runTest() {
   var popup = window.open("file_bug509055.html", "popup 0",
                            "height=200,width=200,location=yes," +
                            "menubar=yes,status=yes,toolbar=yes,dependent=yes");
   popup.hashchangeCallback = onChildHashchange;
   popup.onload = onChildLoad;
-  dump('Waiting for initial load.\n');
+  dump("Waiting for initial load.\n");
   yield undefined;
 
   // Without this wait, the change to location.hash below doesn't create a
   // SHEntry or enable the back button.
   shortWait();
-  dump('Got initial load.  Spinning event loop.\n');
+  dump("Got initial load.  Spinning event loop.\n");
   yield undefined;
 
   popup.location.hash = "#1";
-  dump('Waiting for hashchange.\n');
+  dump("Waiting for hashchange.\n");
   yield undefined;
 
   popup.history.back();
-  dump('Waiting for second hashchange.\n');
+  dump("Waiting for second hashchange.\n");
   yield undefined; // wait for hashchange
 
   popup.document.title = "Changed";
 
   // Wait for listeners to be notified of the title change.
   shortWait();
-  dump('Got second hashchange.  Spinning event loop.\n');
+  dump("Got second hashchange.  Spinning event loop.\n");
   yield undefined;
 
   var sh = SpecialPowers.wrap(popup)
                         .docShell
                         .QueryInterface(SpecialPowers.Ci.nsIWebNavigation)
                         .sessionHistory;
 
   // Get the title of the inner popup's current SHEntry
   var sheTitle = sh.legacySHistory.getEntryAtIndex(sh.index).title;
   is(sheTitle, "Changed", "SHEntry's title should change when we change.");
 
   popup.close();
 
   SimpleTest.executeSoon(SimpleTest.finish);
 }
 
-window.addEventListener('load', function() {
+window.addEventListener("load", function() {
   gGen = runTest();
   gGen.next();
 });
 
 </script>
 
 </body>
 </html>
--- a/docshell/test/mochitest/test_bug511449.html
+++ b/docshell/test/mochitest/test_bug511449.html
@@ -19,34 +19,34 @@ https://bugzilla.mozilla.org/show_bug.cg
 <input type="text" id="input">
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 511449 **/
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.requestFlakyTimeout("untriaged");
-window.addEventListener('load', runTest);
+window.addEventListener("load", runTest);
 
 var win = null;
 
 function runTest() {
   document.getElementById("input").focus();
   win = window.open("file_bug511449.html", "");
   SimpleTest.waitForFocus(runNextTest, win);
 }
 
 function runNextTest() {
   var didClose = false;
   win.onunload = function() {
     didClose = true;
-  }
-  synthesizeNativeKey(KEYBOARD_LAYOUT_EN_US, MAC_VK_ANSI_W, {metaKey:1}, "w", "w");
+  };
+  synthesizeNativeKey(KEYBOARD_LAYOUT_EN_US, MAC_VK_ANSI_W, {metaKey: 1}, "w", "w");
 
-  setTimeout(function () {
+  setTimeout(function() {
     ok(didClose, "Cmd+W should have closed the tab");
     if (!didClose) {
       win.close();
     }
     SimpleTest.finish();
   }, 1000);
 }
 
--- a/docshell/test/mochitest/test_bug529119-1.html
+++ b/docshell/test/mochitest/test_bug529119-1.html
@@ -12,45 +12,41 @@ SimpleTest.requestFlakyTimeout("untriage
 
 var workingURL = "http://mochi.test:8888/tests/docshell/test/mochitest/bug529119-window.html";
 var faultyURL = "http://some-nonexistent-domain-27489274c892748217cn2384.com/";
 
 var w = null;
 var phase = 0;
 var gotWrongPageOnTryAgainClick = false;
 
-function pollForPage(f, w)
-{
+function pollForPage(f, w) {
   // Start with polling after a delay, we might mistakenly take the current page
   // as an expected one.
   window.setTimeout(function() {
     var iterationsLeft = 200;
     var int = window.setInterval(function() {
       iterationsLeft--;
 
       var haveErrorPage = false;
       try {
         var title = w.document.title;
-      }
-      catch (ex) {
+      } catch (ex) {
         haveErrorPage = true;
       }
 
       if (iterationsLeft == 0 || haveErrorPage) {
         window.clearInterval(int);
         f(iterationsLeft > 0);
       }
     }, 100);
   }, 1000);
 }
 
-function windowLoaded()
-{
-  switch (phase)
-  {
+function windowLoaded() {
+  switch (phase) {
     case 0:
       /* 2. We have succeededfully loaded a page, now go to a faulty URL */
       window.setTimeout(function() {
         w.location.href = faultyURL;
       }, 0);
 
       phase = 1;
 
@@ -77,18 +73,17 @@ function windowLoaded()
 
     case 1:
       /* 4-check, we must not get here! */
       gotWrongPageOnTryAgainClick = true;
       break;
   }
 }
 
-function startTest()
-{
+function startTest() {
   /* 1. load a URL that leads to an error page */
   w = window.open(workingURL);
 }
 
 </script>
 </head>
 <body onload="startTest();">
 </body>
--- a/docshell/test/mochitest/test_bug529119-2.html
+++ b/docshell/test/mochitest/test_bug529119-2.html
@@ -12,43 +12,40 @@ SimpleTest.requestFlakyTimeout("untriage
 
 var workingURL = "http://mochi.test:8888/tests/docshell/test/mochitest/bug529119-window.html";
 var faultyURL = "http://some-nonexistent-domain-27489274c892748217cn2384.com/";
 
 var w = null;
 var phase = 0;
 var isWindowLoaded = false;
 
-function pollForPage(expectErrorPage, f, w)
-{
+function pollForPage(expectErrorPage, f, w) {
   // Start with polling after a delay, we might mistakenly take the current page
   // as an expected one.
   window.setTimeout(function() {
     var iterationsLeft = 200;
     var int = window.setInterval(function() {
       iterationsLeft--;
 
       var haveErrorPage = false;
       try {
         var title = w.document.title;
-      }
-      catch (ex) {
+      } catch (ex) {
         haveErrorPage = true;
       }
 
       if (iterationsLeft == 0 || expectErrorPage == haveErrorPage) {
         window.clearInterval(int);
         f(iterationsLeft > 0);
       }
     }, 100);
   }, 1000);
 }
 
-function windowLoaded()
-{
+function windowLoaded() {
   // The code under here should only be run once
   // The test popup window workingURL was already opened
   if (isWindowLoaded)
     return;
   isWindowLoaded = true;
 
   /* 2. We have successfully loaded a page, now go to a faulty URL */
   // XXX The test fails when we change the location synchronously
@@ -58,34 +55,32 @@ function windowLoaded()
 
   pollForPage(true, function(succeeded) {
     ok(succeeded, "Waiting for error page succeeded");
     /* 3. now, while we are on the error page, navigate back */
     try {
       // We need the SpecialPowers bit, because this is a cross-origin window
       // and we normally can't touch .history on those.
       SpecialPowers.wrap(w).history.back();
-    }
-    catch(ex) {
+    } catch (ex) {
       ok(false, "w.history.back() threw " + ex);
     }
 
     pollForPage(false, function(succeeded) {
       ok(succeeded, "Waiting for original page succeeded");
       /* 4-finish, check we are back at the original page */
       isnot(SpecialPowers.wrap(w).location.href, faultyURL, "Is on an error page");
       is(SpecialPowers.wrap(w).location.href, workingURL, "Is not on the previous page");
       w.close();
       SimpleTest.finish();
     }, w);
   }, w);
 }
 
-function startTest()
-{
+function startTest() {
   /* 1. load a URL that leads to an error page */
   w = window.open(workingURL);
 }
 
 </script>
 </head>
 <body onload="startTest();">
 </body>
--- a/docshell/test/mochitest/test_bug530396.html
+++ b/docshell/test/mochitest/test_bug530396.html
@@ -20,17 +20,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script class="testbody" type="text/javascript">
 
 // NOTE: If we ever make subframes do bfcache stuff, this test will need to be
 // modified accordingly!  It assumes that subframes do NOT get bfcached.
 var onloadCount = 0;
 
 var step = 0;
 
-var gTestFrame = document.getElementById('testFrame');
+var gTestFrame = document.getElementById("testFrame");
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.requestFlakyTimeout("untriaged");
 addLoadEvent(doNextStep);
 
 function doNextStep() {
   ++step;
   switch (step) {
--- a/docshell/test/mochitest/test_bug551225.html
+++ b/docshell/test/mochitest/test_bug551225.html
@@ -12,21 +12,21 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=551225">Mozilla Bug 551225</a>
 
 <script type="application/javascript">
 
 /** Test for Bug 551225 **/
 
 obj = {
-  a: new Date('1/1/2000'),
+  a: new Date("1/1/2000"),
   b: /^foo$/,
-  c: 'bar'
+  c: "bar",
 };
 
-history.replaceState(obj, '', '');
-is(history.state.a.toString(), new Date('1/1/2000').toString(), 'Date object.');
-is(history.state.b.toString(), '/^foo$/', 'Regex');
-is(history.state.c, 'bar', 'Other state');
+history.replaceState(obj, "", "");
+is(history.state.a.toString(), new Date("1/1/2000").toString(), "Date object.");
+is(history.state.b.toString(), "/^foo$/", "Regex");
+is(history.state.c, "bar", "Other state");
 
 </script>
 </body>
 </html>
--- a/docshell/test/mochitest/test_bug570341.html
+++ b/docshell/test/mochitest/test_bug570341.html
@@ -16,115 +16,115 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   function collectMoments() {
     var win = frames[0];
     var timing = (win.performance && win.performance.timing) || {};
     for (var p in timing) {
       moments[p] = timing[p];
     }
     for (var p in win) {
-      if (p.substring(0,9) == '_testing_') {
+      if (p.substring(0, 9) == "_testing_") {
         moments[p.substring(9)] = win[p];
       }
     }
-    moments['evt_unload'] = unload;
+    moments.evt_unload = unload;
     return moments;
   }
 
-  function showSequence(node){
-    while(node.firstChild) {
+  function showSequence(node) {
+    while (node.firstChild) {
       node.firstChild.remove();
     }
     var sequence = [];
     for (var p in moments) {
       sequence.push(p);
     }
-    sequence.sort(function(a, b){
+    sequence.sort(function(a, b) {
       return moments[a] - moments[b];
     });
-    table = document.createElement('table');
+    table = document.createElement("table");
     node.appendChild(table);
-    row = document.createElement('tr');
+    row = document.createElement("tr");
     table.appendChild(row);
-    cell = document.createElement('td');
+    cell = document.createElement("td");
     row.appendChild(cell);
-    cell.appendChild(document.createTextNode('start'));
-    cell = document.createElement('td');
+    cell.appendChild(document.createTextNode("start"));
+    cell = document.createElement("td");
     row.appendChild(cell);
     cell.appendChild(document.createTextNode(start));
     for (var i = 0; i < sequence.length; ++i) {
       var prop = sequence[i];
-      row = document.createElement('tr');
+      row = document.createElement("tr");
       table.appendChild(row);
-      cell = document.createElement('td');
+      cell = document.createElement("td");
       row.appendChild(cell);
       cell.appendChild(document.createTextNode(prop));
-      cell = document.createElement('td');
+      cell = document.createElement("td");
       row.appendChild(cell);
       cell.appendChild(document.createTextNode(moments[prop]));
     }
   }
 
-  function checkValues(){
+  function checkValues() {
     var win = frames[0];
-    ok(win.performance, 
-        'window.performance is missing or not accessible for frame');
-    ok(!win.performance || win.performance.timing, 
-        'window.performance.timing is missing or not accessible for frame');
+    ok(win.performance,
+        "window.performance is missing or not accessible for frame");
+    ok(!win.performance || win.performance.timing,
+        "window.performance.timing is missing or not accessible for frame");
     collectMoments();
 
     var sequences = [
-      ['navigationStart', 'unloadEventStart', 'unloadEventEnd'],
-      ['navigationStart', 'fetchStart', 'domainLookupStart', 'domainLookupEnd',
-       'connectStart', 'connectEnd', 'requestStart', 'responseStart', 'responseEnd'],
-      ['responseStart', 'domLoading', 'domInteractive', 'domComplete'],
-      ['domContentLoadedEventStart', 'domContentLoadedEventEnd',
-       'loadEventStart', 'loadEventEnd']
-    ]
+      ["navigationStart", "unloadEventStart", "unloadEventEnd"],
+      ["navigationStart", "fetchStart", "domainLookupStart", "domainLookupEnd",
+       "connectStart", "connectEnd", "requestStart", "responseStart", "responseEnd"],
+      ["responseStart", "domLoading", "domInteractive", "domComplete"],
+      ["domContentLoadedEventStart", "domContentLoadedEventEnd",
+       "loadEventStart", "loadEventEnd"],
+    ];
 
     for (var i = 0; i < sequences.length; ++i) {
       var seq = sequences[i];
       for (var j = 0; j < seq.length; ++j) {
         var prop = seq[j];
         if (j > 0) {
-          var prevProp = seq[j-1];
+          var prevProp = seq[j - 1];
           ok(moments[prevProp] <= moments[prop],
-              ['Expected ', prevProp, ' to happen before ', prop,
-              ', got ', prevProp, ' = ', moments[prevProp],
-              ', ', prop, ' = ', moments[prop]].join(''));
+              ["Expected ", prevProp, " to happen before ", prop,
+              ", got ", prevProp, " = ", moments[prevProp],
+              ", ", prop, " = ", moments[prop]].join(""));
         }
       }
     }
 
-    SimpleTest.finish()
+    SimpleTest.finish();
   }
 
 window.onload = function() {
   var win = frames[0];
-  win.addEventListener('unload', function(){
+  win.addEventListener("unload", function() {
     unload = Date.now();
   }, true);
   var seenLoad = 0;
-  win.addEventListener('load', function (){
+  win.addEventListener("load", function() {
     seenLoad = Date.now();
   }, true);
-  frames[0].location = 'bug570341_recordevents.html'
-  var interval = setInterval(function () {
+  frames[0].location = "bug570341_recordevents.html";
+  var interval = setInterval(function() {
     // time constants here are arbitrary, chosen to allow the test to pass
     var stopPolling = (win.performance && win.performance.loadEventEnd) ||
                       (seenLoad && Date.now() >= seenLoad + 3000) ||
                       Date.now() >= start + 30000;
     if (stopPolling) {
       clearInterval(interval);
       checkValues();
     } else if (win._testing_evt_load) {
       seenLoad = Date.now();
     }
   }, 100);
-}
+};
 </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=570341">Mozilla Bug 570341</a>
 <div id="frames">
 <iframe name="child0" src="navigation/blank.html"></iframe>
 </div>
 <button type="button" onclick="showSequence(document.getElementById('display'))">
--- a/docshell/test/mochitest/test_bug580069.html
+++ b/docshell/test/mochitest/test_bug580069.html
@@ -29,17 +29,16 @@ add_task(async function() {
 
   info("iframe's location is: " + iframeCw.location + "\n");
 
   // Submit the forum and wait for the initial page load using a POST load.
   iframeCw.document.getElementById("form").submit();
   let method1 = await new Promise(resolve => {
     window.page2Load = resolve;
   });
-
   info("iframe's location is: " + iframeCw.location + ", method is " + method1 + "\n");
   is(method1, "POST", "Method for first load should be POST.");
 
   // Push a new state, and refresh the page. This refresh shouldn't pop up the
   // "are you sure you want to refresh a page with POST data?" dialog. If it
   // does, this test will hang and fail, and we'll see 'Refreshing iframe...' at
   // the end of the test log.
   iframeCw.history.replaceState('', '', '?replaced');
--- a/docshell/test/mochitest/test_bug590573.html
+++ b/docshell/test/mochitest/test_bug590573.html
@@ -12,145 +12,130 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=590573">Mozilla Bug 590573</a>
 
 <script type='application/javascript'>
 SimpleTest.waitForExplicitFinish();
 
 // Listen to the first callback, since this indicates that the page loaded.
 var page1LoadCallbackEnabled = true;
-function page1Load()
-{
+function page1Load() {
   if (page1LoadCallbackEnabled) {
     page1LoadCallbackEnabled = false;
-    dump('Got page1 load.\n');
+    dump("Got page1 load.\n");
     pageLoad();
-  }
-  else {
-    dump('Ignoring page1 load.\n');
+  } else {
+    dump("Ignoring page1 load.\n");
   }
 }
 
 var page1PopstateCallbackEnabled = false;
-function page1Popstate()
-{
+function page1Popstate() {
   if (page1PopstateCallbackEnabled) {
     page1PopstateCallbackEnabled = false;
-    dump('Got page1 popstate.\n');
+    dump("Got page1 popstate.\n");
     pageLoad();
-  }
-  else {
-    dump('Ignoring page1 popstate.\n');
+  } else {
+    dump("Ignoring page1 popstate.\n");
   }
 }
 
 var page1PageShowCallbackEnabled = false;
-function page1PageShow()
-{
+function page1PageShow() {
   if (page1PageShowCallbackEnabled) {
     page1PageShowCallbackEnabled = false;
-    dump('Got page1 pageshow.\n');
+    dump("Got page1 pageshow.\n");
     pageLoad();
-  }
-  else {
-    dump('Ignoring page1 pageshow.\n');
+  } else {
+    dump("Ignoring page1 pageshow.\n");
   }
 }
 
 var page2LoadCallbackEnabled = false;
-function page2Load()
-{
+function page2Load() {
   if (page2LoadCallbackEnabled) {
     page2LoadCallbackEnabled = false;
-    dump('Got page2 popstate.\n');
+    dump("Got page2 popstate.\n");
     pageLoad();
-  }
-  else {
-    dump('Ignoring page2 popstate.\n');
+  } else {
+    dump("Ignoring page2 popstate.\n");
   }
 }
 
 var page2PopstateCallbackEnabled = false;
-function page2Popstate()
-{
+function page2Popstate() {
   if (page2PopstateCallbackEnabled) {
     page2PopstateCallbackEnabled = false;
-    dump('Got page2 popstate.\n');
+    dump("Got page2 popstate.\n");
     pageLoad();
-  }
-  else {
-    dump('Ignoring page2 popstate.\n');
+  } else {
+    dump("Ignoring page2 popstate.\n");
   }
 }
 
 var page2PageShowCallbackEnabled = false;
-function page2PageShow()
-{
+function page2PageShow() {
   if (page2PageShowCallbackEnabled) {
     page2PageShowCallbackEnabled = false;
-    dump('Got page2 pageshow.\n');
+    dump("Got page2 pageshow.\n");
     pageLoad();
-  }
-  else {
-    dump('Ignoring page2 pageshow.\n');
+  } else {
+    dump("Ignoring page2 pageshow.\n");
   }
 }
 
-function dumpSHistory(theWindow)
-{
+function dumpSHistory(theWindow) {
   let sh = SpecialPowers.wrap(theWindow).docShell
                     .QueryInterface(SpecialPowers.Ci.nsIWebNavigation)
                     .sessionHistory;
   if (!sh) {
     dump(" window has no shistory.\n");
     return;
   }
 
   dump(" count: " + sh.count + "\n");
   dump(" index: " + sh.index + "\n");
   dump(" requestedIndex: " + sh.legacySHistory.requestedIndex + "\n");
 
   for (let i = 0; i < sh.count; i++) {
     let shentry = sh.legacySHistory.getEntryAtIndex(i);
-    dump(" " + i + ": " + shentry.URI.spec + '\n');
+    dump(" " + i + ": " + shentry.URI.spec + "\n");
     for (let j = 0; j < shentry.childCount; j++) {
       let child = shentry.GetChildAt(j);
-      dump("   child " + j + ": " + child.URI.spec + '\n');
+      dump("   child " + j + ": " + child.URI.spec + "\n");
     }
   }
 
   return sh;
 }
 
-var popup = window.open('file_bug590573_1.html');
+var popup = window.open("file_bug590573_1.html");
 
 var gTestContinuation = null;
 var loads = 0;
-function pageLoad()
-{
+function pageLoad() {
   loads++;
-  dump('pageLoad(loads=' + loads + ', page location=' + popup.location + ')\n');
+  dump("pageLoad(loads=" + loads + ", page location=" + popup.location + ")\n");
 
   dumpSHistory(window);
 
   if (!gTestContinuation) {
     gTestContinuation = testBody();
   }
   var ret = gTestContinuation.next();
   if (ret.done) {
     SimpleTest.finish();
   }
 }
 
-function* testBody()
-{
+function* testBody() {
   is(popup.scrollY, 0, "test 1");
   popup.scroll(0, 100);
 
-  popup.history.pushState('', '', '?pushed');
+  popup.history.pushState("", "", "?pushed");
   is(Math.round(popup.scrollY), 100, "test 2");
   popup.scroll(0, 200); // set state-2's position to 200
 
   popup.history.back();
   is(Math.round(popup.scrollY), 100, "test 3");
   popup.scroll(0, 150); // set original page's position to 150
 
   popup.history.forward();
@@ -170,20 +155,20 @@ function* testBody()
   // Now test that the scroll position is persisted when we have real
   // navigations involved.  First, we need to spin the event loop so that the
   // navigation doesn't replace our current history entry.
 
   setTimeout(pageLoad, 0);
   yield;
 
   page2LoadCallbackEnabled = true;
-  popup.location = 'file_bug590573_2.html';
+  popup.location = "file_bug590573_2.html";
   yield;
 
-  ok(popup.location.href.match('file_bug590573_2.html$'),
+  ok(popup.location.href.match("file_bug590573_2.html$"),
      "Location was " + popup.location +
      " but should end with file_bug590573_2.html");
 
   is(popup.scrollY, 0, "test 7");
   popup.scroll(0, 300);
 
   // We need to spin the event loop again before we go back, otherwise the
   // scroll positions don't get updated properly.
@@ -194,17 +179,17 @@ function* testBody()
   popup.history.back();
   yield;
 
   // Spin the event loop again so that we get the right scroll positions.
   setTimeout(pageLoad, 0);
   yield;
 
   is(popup.location.search, "?pushed");
-  ok(popup.document.getElementById('div1'), 'page should have div1.');
+  ok(popup.document.getElementById("div1"), "page should have div1.");
 
   is(Math.round(popup.scrollY), 200, "test 8");
 
   popup.history.back();
   is(Math.round(popup.scrollY), 150, "test 9");
   popup.history.forward();
 
   is(Math.round(popup.scrollY), 200, "test 10");
--- a/docshell/test/mochitest/test_bug598895.html
+++ b/docshell/test/mochitest/test_bug598895.html
@@ -22,31 +22,31 @@ https://bugzilla.mozilla.org/show_bug.cg
 SimpleTest.waitForExplicitFinish();
 
 addLoadEvent(function() {
 var win1 = window.open();
 win1.document.body.textContent = "Should show";
 
 var windowsLoaded = 0;
 
-window.onmessage = function (ev) {
+window.onmessage = function(ev) {
   is(ev.data, "loaded", "Message should be 'loaded'");
   if (++windowsLoaded == 2) {
     var one = snapshotWindow(win1);
     var two = snapshotWindow(win2);
     var three = snapshotWindow(win3);
     win1.close();
     win2.close();
     win3.close();
     ok(compareSnapshots(one, two, true)[0], "Popups should look identical");
     ok(compareSnapshots(one, three, false)[0], "Popups should not look identical");
 
     SimpleTest.finish();
   }
-}
+};
 
 var win2 = window.open("file_bug598895_1.html");
 var win3 = window.open("file_bug598895_2.html");
 });
 </script>
 </pre>
 </body>
 </html>
--- a/docshell/test/mochitest/test_bug634834.html
+++ b/docshell/test/mochitest/test_bug634834.html
@@ -12,40 +12,38 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=634834">Mozilla Bug 634834</a>
 
 <script type='application/javascript'>
 SimpleTest.waitForExplicitFinish();
 
 function iframe_loaded() {
   var loadedAfterPushstate = false;
-  $('iframe').onload = function() {
+  $("iframe").onload = function() {
     loadedAfterPushstate = true;
-  }
+  };
 
-  var obj = { name: 'name' };
-  obj.__defineGetter__('a', function() {
-    $('iframe').contentWindow.location = 'http://example.com';
+  var obj = { name: "name" };
+  obj.__defineGetter__("a", function() {
+    $("iframe").contentWindow.location = "http://example.com";
 
     // Wait until we've loaded example.com.
     do {
         var r = new XMLHttpRequest();
         r.open("GET", location.href, false);
         r.overrideMimeType("text/plain");
-        try { r.send(null); }
-        catch (e) {}
+        try { r.send(null); } catch (e) {}
     } while (!loadedAfterPushstate);
   });
 
   try {
-    $('iframe').contentWindow.history.pushState(obj, '');
-    ok(false, 'pushState should throw exception.');
-  }
-  catch(e) {
-    ok(true, 'pushState threw an exception.');
+    $("iframe").contentWindow.history.pushState(obj, "");
+    ok(false, "pushState should throw exception.");
+  } catch (e) {
+    ok(true, "pushState threw an exception.");
   }
   SimpleTest.finish();
 }
 
 </script>
 
 <iframe id='iframe' src='file_bug634834.html' onload='iframe_loaded()'></iframe>
 
--- a/docshell/test/mochitest/test_bug637644.html
+++ b/docshell/test/mochitest/test_bug637644.html
@@ -22,31 +22,31 @@ https://bugzilla.mozilla.org/show_bug.cg
 SimpleTest.waitForExplicitFinish();
 
 addLoadEvent(function() {
 var win1 = window.open("", "", "height=500,width=500");
 win1.document.body.textContent = "Should show";
 
 var windowsLoaded = 0;
 
-window.onmessage = function (ev) {
+window.onmessage = function(ev) {
   is(ev.data, "loaded", "Message should be 'loaded'");
   if (++windowsLoaded == 2) {
     var one = snapshotWindow(win1);
     var two = snapshotWindow(win2);
     var three = snapshotWindow(win3);
     win1.close();
     win2.close();
     win3.close();
     ok(compareSnapshots(one, two, true)[0], "Popups should look identical");
     ok(compareSnapshots(one, three, false)[0], "Popups should not look identical");
 
     SimpleTest.finish();
   }
-}
+};
 
 var win2 = window.open("file_bug637644_1.html", "", "height=500,width=500");
 var win3 = window.open("file_bug637644_2.html", "", "height=500,width=500");
 });
 </script>
 </pre>
 </body>
 </html>
--- a/docshell/test/mochitest/test_bug640387_1.html
+++ b/docshell/test/mochitest/test_bug640387_1.html
@@ -12,97 +12,96 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=640387">Mozilla Bug 640387</a>
 
 <script type='application/javascript'>
 SimpleTest.waitForExplicitFinish();
 
 function* test() {
   /* Spin the event loop so we get out of the onload handler. */
-  SimpleTest.executeSoon(function() { gGen.next() });
+  SimpleTest.executeSoon(function() { gGen.next(); });
   yield undefined;
 
-  popup.history.pushState('', '', '#hash1');
-  popup.history.pushState('', '', '#hash2');
+  popup.history.pushState("", "", "#hash1");
+  popup.history.pushState("", "", "#hash2");
 
   // Now the history looks like:
   //   file_bug640387.html
   //   file_bug640387.html#hash1
   //   file_bug640387.html#hash2  <-- current
 
   // Going back should trigger a hashchange, which will wake us up from the
   // yield.
   popup.history.back();
   yield undefined;
-  ok(true, 'Got first hashchange.');
+  ok(true, "Got first hashchange.");
 
   // Going back should wake us up again.
   popup.history.back();
   yield undefined;
-  ok(true, 'Got second hashchange.');
+  ok(true, "Got second hashchange.");
 
   // Now the history looks like:
   //   file_bug640387.html        <-- current
   //   file_bug640387.html#hash1
   //   file_bug640387.html#hash2
 
   // Going forward should trigger a hashchange.
   popup.history.forward();
   yield undefined;
-  ok(true, 'Got third hashchange.');
+  ok(true, "Got third hashchange.");
 
   // Now modify the history so it looks like:
   //   file_bug640387.html
   //   file_bug640387.html#hash1
   //   file_bug640387.html#hash1  <-- current
-  popup.history.pushState('', '', '#hash1');
+  popup.history.pushState("", "", "#hash1");
 
   // Now when we go back, we should not get a hashchange.  Instead, wait for a
   // popstate.  We need to asynchronously go back because popstate is fired
   // sync.
   gHashchangeExpected = false;
   gCallbackOnPopstate = true;
-  SimpleTest.executeSoon(function() { popup.history.back() });
+  SimpleTest.executeSoon(function() { popup.history.back(); });
   yield undefined;
-  ok(true, 'Got popstate.');
+  ok(true, "Got popstate.");
   gCallbackOnPopstate = false;
 
   // Spin the event loop so hashchange has a chance to fire, if it's going to.
-  SimpleTest.executeSoon(function() { gGen.next() });
+  SimpleTest.executeSoon(function() { gGen.next(); });
   yield undefined;
 
   popup.close();
   SimpleTest.finish();
 }
 
 gGen = null;
 function childLoad() {
   gGen = test();
   gGen.next();
 }
 
 gHashchangeExpected = true;
 function childHashchange() {
   if (gHashchangeExpected) {
     gGen.next();
-  }
-  else {
+  } else {
     ok(false, "Got hashchange when we weren't expecting one.");
   }
 }
 
 gCallbackOnPopstate = false;
 function childPopstate() {
   if (gCallbackOnPopstate) {
     gGen.next();
   }
 }
 
 /* We need to run this test in a popup, because navigating an iframe
  * back/forwards tends to cause intermittent orange. */
-popup = window.open('file_bug640387.html');
+popup = window.open("file_bug640387.html");
 
 /* Control now flows up to childLoad(), called once the popup loads. */
 
 </script>
 
 </body>
 </html>
--- a/docshell/test/mochitest/test_bug640387_2.html
+++ b/docshell/test/mochitest/test_bug640387_2.html
@@ -32,52 +32,52 @@ function childLoad() {
     gGen.next();
   }
 }
 
 errorOnHashchange = false;
 callbackOnHashchange = false;
 function childHashchange() {
   if (errorOnHashchange) {
-    ok(false, 'Got unexpected hashchange.');
+    ok(false, "Got unexpected hashchange.");
   }
   if (callbackOnHashchange) {
     callbackOnHashchange = false;
     gGen.next();
   }
 }
 
 function* run_test() {
-  var iframe = $('iframe').contentWindow;
+  var iframe = $("iframe").contentWindow;
 
-  ok(true, 'Got first load');
+  ok(true, "Got first load");
 
   // Spin the event loop so we exit the onload handler.
-  SimpleTest.executeSoon(function() { gGen.next() });
+  SimpleTest.executeSoon(function() { gGen.next(); });
   yield undefined;
 
-  let origLocation = iframe.location + '';
+  let origLocation = iframe.location + "";
   callbackOnHashchange = true;
-  iframe.location.hash = '#1';
+  iframe.location.hash = "#1";
   // Wait for a hashchange event.
   yield undefined;
 
-  ok(true, 'Got hashchange.');
+  ok(true, "Got hashchange.");
 
   iframe.location = origLocation;
   // This should produce a load event and *not* a hashchange, because the
   // result of the load is a different document than we had previously.
   callbackOnLoad = true;
   errorOnHashchange = true;
   yield undefined;
 
-  ok(true, 'Got final load.');
+  ok(true, "Got final load.");
 
   // Spin the event loop to give hashchange a chance to fire, if it's going to.
-  SimpleTest.executeSoon(function() { gGen.next() });
+  SimpleTest.executeSoon(function() { gGen.next(); });
   yield undefined;
 
   SimpleTest.finish();
 }
 
 callbackOnLoad = true;
 gGen = run_test();
 
--- a/docshell/test/mochitest/test_bug653741.html
+++ b/docshell/test/mochitest/test_bug653741.html
@@ -18,31 +18,31 @@ https://bugzilla.mozilla.org/show_bug.cg
 SimpleTest.waitForExplicitFinish();
 
 function childLoad() {
   // Spin the event loop so we leave the onload handler.
   SimpleTest.executeSoon(childLoad2);
 }
 
 function childLoad2() {
-  let cw = $('iframe').contentWindow;
+  let cw = $("iframe").contentWindow;
 
   // Save the Y offset.  For sanity's sake, make sure it's not 0, because we
   // should be at the bottom of the page!
   let origYOffset = Math.round(cw.pageYOffset);
-  ok(origYOffset != 0, 'Original Y offset is not 0.');
+  ok(origYOffset != 0, "Original Y offset is not 0.");
 
   // Scroll the iframe to the top, then navigate to #bottom again.
   cw.scrollTo(0, 0);
 
   // Our current location is #bottom, so this should scroll us down to the
   // bottom again.
-  cw.location = cw.location + '';
+  cw.location = cw.location + "";
 
-  is(Math.round(cw.pageYOffset), origYOffset, 'Correct offset after reloading page.');
+  is(Math.round(cw.pageYOffset), origYOffset, "Correct offset after reloading page.");
   SimpleTest.finish();
 }
 
 </script>
 
 <iframe height='100px' id='iframe' src='file_bug653741.html#bottom'></iframe>
 
 </body>
--- a/docshell/test/mochitest/test_bug660404.html
+++ b/docshell/test/mochitest/test_bug660404.html
@@ -22,24 +22,24 @@ SimpleTest.waitForExplicitFinish();
 
 var w;
 
 function continueTest() {
   // Do this async so the load event can finish firing
   SimpleTest.executeSoon(function() {
     w.onpagehide = function(ev) {
       is(ev.persisted, true, "Should be bfcached when navigating to multipart");
-    }
+    };
     w.location.href = "file_bug660404";
   });
 }
 
 function finishTest() {
   is(w.document.documentElement.textContent, "opener.finishTest();");
-  is(w.document.documentElement.innerHTML, "<head><script>opener.finishTest();</"+"script></head>");
+  is(w.document.documentElement.innerHTML, "<head><script>opener.finishTest();</" + "script></head>");
   w.close();
   SimpleTest.finish();
 }
 
 // Have to open a new window, since there's no bfcache in subframes
 w = window.open("file_bug660404-1.html");
 
 </script>
--- a/docshell/test/mochitest/test_bug662170.html
+++ b/docshell/test/mochitest/test_bug662170.html
@@ -18,32 +18,32 @@ https://bugzilla.mozilla.org/show_bug.cg
 SimpleTest.waitForExplicitFinish();
 
 function childLoad() {
   // Spin the event loop so we leave the onload handler.
   SimpleTest.executeSoon(childLoad2);
 }
 
 function childLoad2() {
-  let cw = $('iframe').contentWindow;
+  let cw = $("iframe").contentWindow;
 
   // When we initially load the page, we should be at the top.
-  is(cw.pageYOffset, 0, 'Initial Y offset should be 0.');
+  is(cw.pageYOffset, 0, "Initial Y offset should be 0.");
 
   // Scroll the iframe to the bottom.
   cw.scrollTo(0, 300);
 
   // Did we actually scroll somewhere?
-  isnot(Math.round(cw.pageYOffset), 0, 'Y offset should be non-zero after scrolling.');
+  isnot(Math.round(cw.pageYOffset), 0, "Y offset should be non-zero after scrolling.");
 
   // Now load file_bug662170.html#, which should take us to the top of the
   // page.
-  cw.location = cw.location + '#';
+  cw.location = cw.location + "#";
 
-  is(cw.pageYOffset, 0, 'Correct Y offset after loading #.');
+  is(cw.pageYOffset, 0, "Correct Y offset after loading #.");
   SimpleTest.finish();
 }
 
 </script>
 
 <!-- When the iframe loads, it calls childLoad(). -->
 <iframe height='100px' id='iframe' src='file_bug662170.html'></iframe>
 
--- a/docshell/test/mochitest/test_bug669671.html
+++ b/docshell/test/mochitest/test_bug669671.html
@@ -41,108 +41,105 @@ https://bugzilla.mozilla.org/show_bug.cg
  * instead of pushState.  And for good measure, we test once more, this time
  * modifying only the hash of the URI using replaceState.  In this case, we
  * *should* load from the cache.
  *
  **/
 SimpleTest.requestLongerTimeout(2);
 SimpleTest.waitForExplicitFinish();
 
-function onChildLoad()
-{
-  SimpleTest.executeSoon(function() { gGen.next() });
+function onChildLoad() {
+  SimpleTest.executeSoon(function() { gGen.next(); });
 }
 
 var _loadCount = 0;
-function checkPopupLoadCount()
-{
-  is(popup.document.body.innerHTML, _loadCount + '', 'Load count');
+function checkPopupLoadCount() {
+  is(popup.document.body.innerHTML, _loadCount + "", "Load count");
 
   // We normally want to increment _loadCount here.  But if the test fails
   // because we didn't do a load we should have, let's not cause a cascade of
   // failures by incrementing _loadCount.
   var origCount = _loadCount;
-  if (popup.document.body.innerHTML >= _loadCount + '')
+  if (popup.document.body.innerHTML >= _loadCount + "")
     _loadCount++;
   return origCount;
 }
 
-function* test()
-{
+function* test() {
   // Step 0 - Make sure the count is reset to 0 in case of reload
-  popup.location = 'file_bug669671.sjs?countreset';
+  popup.location = "file_bug669671.sjs?countreset";
   yield;
-  is(popup.document.body.innerHTML, '0',
-     'Load count should be reset to 0');
+  is(popup.document.body.innerHTML, "0",
+     "Load count should be reset to 0");
 
   // Step 1 - The popup's body counts how many times we've requested the
   // resource.  This is the first time we've requested it, so it should be '0'.
   checkPopupLoadCount();
 
   // Step 2 - We'll get another onChildLoad when this finishes.
-  popup.location = 'file_bug669671.sjs';
+  popup.location = "file_bug669671.sjs";
   yield undefined;
 
   // Step 3 - Call pushState and change the URI back to ?pushed.
   checkPopupLoadCount();
-  popup.history.pushState('', '', '?pushed');
+  popup.history.pushState("", "", "?pushed");
 
   // Step 4 - Navigate away.  This should trigger another onChildLoad.
-  popup.location = 'file_bug669671.sjs?navigated-1';
+  popup.location = "file_bug669671.sjs?navigated-1";
   yield undefined;
 
   // Step 5 - Go back.  This should result in another onload (because the file is
   // not in bfcache) and should be the fourth time we've requested the sjs file.
   checkPopupLoadCount();
   popup.history.back();
   yield undefined;
 
   // This is the check which was failing before we fixed the bug.
   checkPopupLoadCount();
 
   popup.close();
 
   // Do the whole thing again, but with replaceState.
-  popup = window.open('file_bug669671.sjs?replaced');
+  popup = window.open("file_bug669671.sjs?replaced");
   yield undefined;
   checkPopupLoadCount();
-  popup.location = 'file_bug669671.sjs';
+  popup.location = "file_bug669671.sjs";
   yield undefined;
   checkPopupLoadCount();
-  popup.history.replaceState('', '', '?replaced');
-  popup.location = 'file_bug669671.sjs?navigated-2';
+  popup.history.replaceState("", "", "?replaced");
+  popup.location = "file_bug669671.sjs?navigated-2";
   yield undefined;
   checkPopupLoadCount();
   popup.history.back();
   yield undefined;
   checkPopupLoadCount();
   popup.close();
 
   // Once more, with feeling.  Notice that we don't have to prime the cache
   // with an extra load here, because X and X#hash share the same cache entry.
-  popup = window.open('file_bug669671.sjs?hash-test');
+  popup = window.open("file_bug669671.sjs?hash-test");
   yield undefined;
   var initialCount = checkPopupLoadCount();
-  popup.history.replaceState('', '', '#hash');
-  popup.location = 'file_bug669671.sjs?navigated-3';
+  popup.history.replaceState("", "", "#hash");
+  popup.location = "file_bug669671.sjs?navigated-3";
   yield undefined;
   checkPopupLoadCount();
   popup.history.back();
   yield undefined;
-  is(popup.document.body.innerHTML, initialCount + '',
-     'Load count (should be cached)');
+  is(popup.document.body.innerHTML, initialCount + "",
+     "Load count (should be cached)");
   popup.close();
 
   SimpleTest.finish();
 }
 
 var gGen = test();
 var popup;
 
 // Disable RCWN to make cache behavior deterministic.
 SpecialPowers.pushPrefEnv({set: [["network.http.rcwn.enabled", false]]}, () => {
   // This will call into onChildLoad once it loads.
-  popup = window.open('file_bug669671.sjs?pushed');
+  popup = window.open("file_bug669671.sjs?pushed");
 });
 </script>
 </pre>
 </body>
 </html>
--- a/docshell/test/mochitest/test_bug680257.html
+++ b/docshell/test/mochitest/test_bug680257.html
@@ -10,50 +10,49 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=680257">Mozilla Bug 680257</a>
 
 <script type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
-var popup = window.open('file_bug680257.html');
+var popup = window.open("file_bug680257.html");
 
 // The popup will call into popupLoaded() once it loads.
 function popupLoaded() {
   // runTests() needs to be called from outside popupLoaded's onload handler.
   // Otherwise, the navigations we do in runTests won't create new SHEntries.
   SimpleTest.executeSoon(runTests);
 }
 
 function runTests() {
-  checkPopupLinkStyle(false, 'Initial');
+  checkPopupLinkStyle(false, "Initial");
 
-  popup.location.hash = 'a';
-  checkPopupLinkStyle(true, 'After setting hash');
+  popup.location.hash = "a";
+  checkPopupLinkStyle(true, "After setting hash");
 
   popup.history.back();
-  checkPopupLinkStyle(false, 'After going back');
+  checkPopupLinkStyle(false, "After going back");
 
   popup.history.forward();
-  checkPopupLinkStyle(true, 'After going forward');
+  checkPopupLinkStyle(true, "After going forward");
 
   popup.close();
   SimpleTest.finish();
 }
 
 function checkPopupLinkStyle(isTarget, desc) {
-  var link = popup.document.getElementById('a');
+  var link = popup.document.getElementById("a");
   var style = popup.getComputedStyle(link);
-  var color = style.getPropertyValue('color');
+  var color = style.getPropertyValue("color");
 
   // Color is red if isTarget, black otherwise.
   if (isTarget) {
-    is(color, 'rgb(255, 0, 0)', desc);
-  }
-  else {
-    is(color, 'rgb(0, 0, 0)', desc);
+    is(color, "rgb(255, 0, 0)", desc);
+  } else {
+    is(color, "rgb(0, 0, 0)", desc);
   }
 }
 
 </script>
 </body>
 </html>
--- a/docshell/test/mochitest/test_bug691547.html
+++ b/docshell/test/mochitest/test_bug691547.html
@@ -13,35 +13,34 @@ https://bugzilla.mozilla.org/show_bug.cg
      function onContentLoad() {
        var frame = frames[0];
        if (!navStart) {
          // First time we perform navigation in subframe. The bug is that
          // load in subframe causes timing.navigationStart to be recorded
          // as if it was a start of the next navigation.
          var innerFrame = frame.frames[0];
          navStart = frame.performance.timing.navigationStart;
-         innerFrame.location = 'bug570341_recordevents.html';
+         innerFrame.location = "bug570341_recordevents.html";
          // Let's wait a bit so the difference is clear anough.
          setTimeout(reload, 3000);
-       } 
-       else {
+       } else {
          // Content reloaded, time to check. We are allowing a huge time slack,
-         // in case clock is imprecise. If we have a bug, the difference is 
-         // expected to be about the timeout value set above.  
+         // in case clock is imprecise. If we have a bug, the difference is
+         // expected to be about the timeout value set above.
          var diff = frame.performance.timing.navigationStart - beforeReload;
          ok(diff >= -200,
-            'navigationStart should be set after reload request. ' + 
-            'Measured difference: ' + diff + ' (should be positive)');
+            "navigationStart should be set after reload request. " +
+            "Measured difference: " + diff + " (should be positive)");
          SimpleTest.finish();
        }
      }
      function reload() {
        var frame = frames[0];
        ok(navStart == frame.performance.timing.navigationStart,
-          'navigationStart should not change when frame loads.');
+          "navigationStart should not change when frame loads.");
        beforeReload = Date.now();
        frame.location.reload();
      }
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=570341">Mozilla Bug 570341</a>
 <div id="frames">
--- a/docshell/test/mochitest/test_bug703855.html
+++ b/docshell/test/mochitest/test_bug703855.html
@@ -18,36 +18,36 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 703855 **/
 
 SimpleTest.waitForExplicitFinish();
 
 var timingAttributes = [
-  'connectEnd',
-  'connectStart',
-  'domComplete',
-  'domContentLoadedEventEnd',
-  'domContentLoadedEventStart',
-  'domInteractive',
-  'domLoading',
-  'domainLookupEnd',
-  'domainLookupStart',
-  'fetchStart',
-  'loadEventEnd',
-  'loadEventStart',
-  'navigationStart',
-  'redirectEnd',
-  'redirectStart',
-  'requestStart',
-  'responseEnd',
-  'responseStart',
-  'unloadEventEnd',
-  'unloadEventStart'
+  "connectEnd",
+  "connectStart",
+  "domComplete",
+  "domContentLoadedEventEnd",
+  "domContentLoadedEventStart",
+  "domInteractive",
+  "domLoading",
+  "domainLookupEnd",
+  "domainLookupStart",
+  "fetchStart",
+  "loadEventEnd",
+  "loadEventStart",
+  "navigationStart",
+  "redirectEnd",
+  "redirectStart",
+  "requestStart",
+  "responseEnd",
+  "responseStart",
+  "unloadEventEnd",
+  "unloadEventStart",
 ];
 var originalTiming = {};
 
 function runTest() {
   var timing = $("f").contentWindow.performance.timing;
   for (i in timingAttributes) {
     originalTiming[timingAttributes[i]] = timing[timingAttributes[i]];
   }
--- a/docshell/test/mochitest/test_bug728939.html
+++ b/docshell/test/mochitest/test_bug728939.html
@@ -12,26 +12,26 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=728939">Mozilla Bug 728939</a>
 
 <script type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
 // Called when the popup finishes loading.
 function popupLoaded() {
-  popup.location.hash = '#foo';
-  is(popup.document.URL, popup.location.href, 'After hashchange.');
+  popup.location.hash = "#foo";
+  is(popup.document.URL, popup.location.href, "After hashchange.");
 
-  popup.history.pushState('', '', 'bar');
-  is(popup.document.URL, popup.location.href, 'After pushState.');
+  popup.history.pushState("", "", "bar");
+  is(popup.document.URL, popup.location.href, "After pushState.");
 
-  popup.history.replaceState('', '', 'baz');
-  is(popup.document.URL, popup.location.href, 'After replaceState.');
+  popup.history.replaceState("", "", "baz");
+  is(popup.document.URL, popup.location.href, "After replaceState.");
 
   popup.close();
   SimpleTest.finish();
 }
 
-var popup = window.open('file_bug728939.html');
+var popup = window.open("file_bug728939.html");
 
 </script>
 </body>
 </html>
--- a/docshell/test/mochitest/test_pushState_after_document_open.html
+++ b/docshell/test/mochitest/test_pushState_after_document_open.html
@@ -13,22 +13,22 @@ https://bugzilla.mozilla.org/show_bug.cg
   /** Test for Bug 957479 **/
   SimpleTest.waitForExplicitFinish();
   // Child needs to invoke us, otherwise our onload will fire before the child
   // has done the write/close bit.
   onmessage = function doTest() {
     is(frames[0].location.pathname, "/tests/docshell/test/mochitest/file_pushState_after_document_open.html",
        "Should have the right path here");
     is(frames[0].location.hash, "", "Should have the right hash here");
-    frames[0].history.pushState({}, '', frames[0].document.URL + "#foopy");
+    frames[0].history.pushState({}, "", frames[0].document.URL + "#foopy");
     is(frames[0].location.pathname, "/tests/docshell/test/mochitest/file_pushState_after_document_open.html",
        "Pathname should not have changed");
     is(frames[0].location.hash, "#foopy", "Hash should have changed");
     SimpleTest.finish();
-  }
+  };
 
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=957479">Mozilla Bug 957479</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 <iframe src="file_pushState_after_document_open.html"></iframe>
--- a/docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
+++ b/docshell/test/mochitest/test_triggeringprincipal_location_seturi.html
@@ -26,67 +26,67 @@ function checkFinish() {
 // ---- test 1 ----
 
 let myFrame1 = document.createElement("iframe");
 myFrame1.src = SAME_ORIGIN_URI;
 myFrame1.addEventListener("load", checkLoadFrame1);
 document.documentElement.appendChild(myFrame1);
 
 function checkLoadFrame1() {
-  myFrame1.removeEventListener('load', checkLoadFrame1, false);
+  myFrame1.removeEventListener("load", checkLoadFrame1);
   // window.location.href is no longer cross-origin accessible in gecko.
   is(SpecialPowers.wrap(myFrame1.contentWindow).location.href, SAME_ORIGIN_URI,
     "initial same origin dummy loaded into frame1");
 
   SpecialPowers.wrap(myFrame1.contentWindow).location.hash = "#bar";
   is(SpecialPowers.wrap(myFrame1.contentWindow).location.href, SAME_ORIGIN_URI + "#bar",
     "initial same origin dummy#bar loaded into iframe1");
 
   myFrame1.addEventListener("load", checkNavFrame1);
   myFrame1.src = CROSS_ORIGIN_URI;
 }
 
 function checkNavFrame1() {
-  myFrame1.removeEventListener('load', checkNavFrame1, false);
+  myFrame1.removeEventListener("load", checkNavFrame1);
   is(SpecialPowers.wrap(myFrame1.contentWindow).location.href, CROSS_ORIGIN_URI,
     "cross origin dummy loaded into frame1");
 
   myFrame1.addEventListener("load", checkBackNavFrame1);
   myFrame1.src = SAME_ORIGIN_URI + "#bar";
 }
 
 function checkBackNavFrame1() {
-  myFrame1.removeEventListener('load', checkBackNavFrame1, false);
+  myFrame1.removeEventListener("load", checkBackNavFrame1);
   is(SpecialPowers.wrap(myFrame1.contentWindow).location.href, SAME_ORIGIN_URI + "#bar",
     "navagiating back to same origin dummy for frame1");
   checkFinish();
 }
 
 // ---- test 2 ----
 
 let myFrame2 = document.createElement("iframe");
 myFrame2.src = "about:blank";
 myFrame2.addEventListener("load", checkLoadFrame2);
 document.documentElement.appendChild(myFrame2);
 
 function checkLoadFrame2() {
-  myFrame2.removeEventListener('load', checkLoadFrame2, false);
+  myFrame2.removeEventListener("load", checkLoadFrame2);
   is(SpecialPowers.wrap(myFrame2.contentWindow).location.href, "about:blank",
     "initial about:blank frame loaded");
 
   myFrame2.contentWindow.location.hash = "#foo";
   is(SpecialPowers.wrap(myFrame2.contentWindow).location.href, "about:blank#foo",
       "about:blank#foo frame loaded");
-  
-  myFrame2.addEventListener('load', checkHistoryFrame2);
+
+  myFrame2.addEventListener("load", checkHistoryFrame2);
   myFrame2.src = "about:blank";
 }
 
 function checkHistoryFrame2() {
-  myFrame2.removeEventListener('load', checkHistoryFrame2, false);
+  myFrame2.removeEventListener("load", checkHistoryFrame2);
   is(SpecialPowers.wrap(myFrame2.contentWindow).location.href, "about:blank",
     "about:blank frame loaded again");
   checkFinish();
 }
 
 // ---- test 3 ----
 
 let myFrame3 = document.createElement("frame");