Bug 1508990 - Enable ESLint for dom/ipc/ (automatic changes) r=Standard8,mrbkap
authoradam.kolodko <adam.kolodko@hotmail.com>
Thu, 13 Dec 2018 00:43:55 +0000
changeset 450416 ee53b81938266fffd38972636e7f992989281048
parent 450415 2a9b1509c18f96d50c06cc29c2342b8c585b963b
child 450417 3bb8efd6f02e7f24d6ee5a590a8bcaf336140675
push id110504
push userbtara@mozilla.com
push dateThu, 13 Dec 2018 22:55:26 +0000
treeherdermozilla-inbound@23f25ef03dd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, mrbkap
bugs1508990
milestone66.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 1508990 - Enable ESLint for dom/ipc/ (automatic changes) r=Standard8,mrbkap Differential Revision: https://phabricator.services.mozilla.com/D13887
.eslintignore
dom/ipc/ManifestMessagesChild.jsm
dom/ipc/tests/browser_domainPolicy.js
dom/ipc/tests/browser_memory_distribution_telemetry.js
dom/ipc/tests/browser_remote_navigation_delay_telemetry.js
dom/ipc/tests/test_CrashService_crash.html
dom/ipc/tests/test_Preallocated.html
dom/ipc/tests/test_blob_sliced_from_child_process.html
dom/ipc/tests/test_blob_sliced_from_parent_process.html
dom/ipc/tests/test_bug1086684.html
dom/ipc/tests/test_child_docshell.html
dom/ipc/tests/test_cpow_cookies.html
dom/ipc/tests/test_temporaryfile_stream.html
--- a/.eslintignore
+++ b/.eslintignore
@@ -185,17 +185,16 @@ dom/console/**
 dom/crypto/**
 dom/encoding/**
 dom/events/**
 dom/fetch/**
 dom/file/**
 dom/flex/**
 dom/grid/**
 dom/html/**
-dom/ipc/**
 dom/jsurl/**
 dom/localstorage/**
 dom/manifest/**
 dom/media/test/**
 dom/media/tests/**
 dom/media/webaudio/**
 dom/media/webspeech/**
 dom/messagechannel/**
--- a/dom/ipc/ManifestMessagesChild.jsm
+++ b/dom/ipc/ManifestMessagesChild.jsm
@@ -108,20 +108,20 @@ class ManifestMessagesChild extends Acto
  */
 function serializeError(aError) {
   const clone = {
     "fileName": aError.fileName,
     "lineNumber": aError.lineNumber,
     "columnNumber": aError.columnNumber,
     "stack": aError.stack,
     "message": aError.message,
-    "name": aError.name
+    "name": aError.name,
   };
   return clone;
 }
 
 function makeMsgResponse(aId) {
   return {
     id: aId,
     success: false,
-    result: undefined
+    result: undefined,
   };
 }
--- a/dom/ipc/tests/browser_domainPolicy.js
+++ b/dom/ipc/tests/browser_domainPolicy.js
@@ -15,17 +15,17 @@ async function test_domainPolicy() {
 
   ChromeUtils.defineModuleGetter(this, "Promise", "resource://gre/modules/Promise.jsm");
   let deferred = Promise.defer();
   let currentTask = deferred.promise;
   SpecialPowers.pushPrefEnv(
     {set: [["dom.ipc.browser_frames.oop_by_default", false],
           ["browser.pagethumbnails.capturing_disabled", false],
           ["dom.mozBrowserFramesEnabled", false]]},
-    () => { return deferred.resolve()});
+    () => { return deferred.resolve(); });
   await currentTask;
 
   // Create tab
   let tab;
 
   // Init test
   function initProcess() {
     tab = BrowserTestUtils.addTab(gBrowser);
@@ -33,20 +33,20 @@ async function test_domainPolicy() {
 
     let initPromise = ContentTask.spawn(tab.linkedBrowser, null, function() {
       ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
       function loadBase() {
         let deferred = PromiseUtils.defer();
         let listener = (event) => {
           removeEventListener("DOMDocElementInserted", listener, true);
           let listener2 = (event) => {
-            content.removeEventListener('load', listener2);
+            content.removeEventListener("load", listener2);
             deferred.resolve();
-          }
-          content.addEventListener('load', listener2);
+          };
+          content.addEventListener("load", listener2);
         };
         addEventListener("DOMDocElementInserted", listener, true);
         return deferred.promise;
       }
 
       return loadBase();
     });
     BrowserTestUtils.loadURI(tab.linkedBrowser, "http://mochi.test:8888/browser/dom/ipc/tests/file_domainPolicy_base.html");
@@ -55,36 +55,36 @@ async function test_domainPolicy() {
 
   // We use ContentTask for the tests, but we also want to pass some data and some helper functions too.
   // To do that, we serialize an input object via JSON |ipcArgs| and some shared helper functions |initUtils|
   // and eval them in the content process.
   var ipcArgs = {};
   function initUtils(obj) {
     obj.checkScriptEnabled = function(win, expectEnabled) {
       win.wrappedJSObject.gFiredOnclick = false;
-      win.document.body.dispatchEvent(new win.Event('click'));
+      win.document.body.dispatchEvent(new win.Event("click"));
       return { passed: win.wrappedJSObject.gFiredOnclick == expectEnabled,
                msg: `Checking script-enabled for ${win.name} (${win.location})`};
-    }
+    };
 
     obj.navigateFrame = function(ifr, src) {
       let deferred = PromiseUtils.defer();
       function onload() {
-        ifr.removeEventListener('load', onload);
+        ifr.removeEventListener("load", onload);
         deferred.resolve();
       }
-      ifr.addEventListener('load', onload);
-      ifr.setAttribute('src', src);
+      ifr.addEventListener("load", onload);
+      ifr.setAttribute("src", src);
       return deferred.promise;
-    }
-  };
+    };
+  }
 
   function runTest(test) {
     return ContentTask.spawn(tab.linkedBrowser,
-      'ipcArgs = ' + JSON.stringify(ipcArgs) + '; (' + initUtils.toSource() + ')(utils)', test);
+      "ipcArgs = " + JSON.stringify(ipcArgs) + "; (" + initUtils.toSource() + ")(utils)", test);
   }
 
   function checkAndCleanup(result) {
     result = [].concat(result);
     for (var i in result)
       ok(result[i].passed, result[i].msg);
     gBrowser.removeTab(tab);
     deactivateDomainPolicy();
@@ -94,41 +94,41 @@ async function test_domainPolicy() {
   function testDomain(domain) {
     ipcArgs.domain = domain;
     return (aUtils) => {
       ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
       var ipcArgs;
       var utils = {};
       eval(aUtils);
 
-      let path = '/browser/dom/ipc/tests/file_disableScript.html';
+      let path = "/browser/dom/ipc/tests/file_disableScript.html";
       let deferred = PromiseUtils.defer();
-      var rootFrame = content.document.getElementById('root');
+      var rootFrame = content.document.getElementById("root");
       utils.navigateFrame(rootFrame, ipcArgs.domain + path).then(() => {
         deferred.resolve(utils.checkScriptEnabled(rootFrame.contentWindow, false));
       });
       return deferred.promise;
-    }
+    };
   }
 
   info("Testing simple blocklist policy");
 
   info("Creating child process first, activating domainPolicy after");
   currentTask = initProcess();
   await currentTask;
   activateDomainPolicy();
   var bl = policy.blocklist;
-  bl.add(Services.io.newURI('http://example.com'));
+  bl.add(Services.io.newURI("http://example.com"));
   currentTask = runTest(testDomain("http://example.com"));
   checkAndCleanup(await currentTask);
 
   info("Activating domainPolicy first, creating child process after");
   activateDomainPolicy();
   var bl = policy.blocklist;
-  bl.add(Services.io.newURI('http://example.com'));
+  bl.add(Services.io.newURI("http://example.com"));
   currentTask = initProcess();
   await currentTask;
   currentTask = runTest(testDomain("http://example.com"));
   checkAndCleanup(await currentTask);
 
   function testList(expectEnabled, list) {
     ipcArgs.expectEnabled = expectEnabled;
     ipcArgs.list = list;
@@ -137,52 +137,52 @@ async function test_domainPolicy() {
       var ipcArgs;
       var utils = {};
       eval(aUtils);
 
       var results = [];
       var testListInternal = function(expectEnabled, list, idx) {
         idx = idx || 0;
         let deferred = PromiseUtils.defer();
-        let path = '/browser/dom/ipc/tests/file_disableScript.html';
+        let path = "/browser/dom/ipc/tests/file_disableScript.html";
         let target = list[idx] + path;
-        var rootFrame = content.document.getElementById('root');
+        var rootFrame = content.document.getElementById("root");
         utils.navigateFrame(rootFrame, target).then(function() {
           results.push(utils.checkScriptEnabled(rootFrame.contentWindow, expectEnabled));
           if (idx == list.length - 1)
             deferred.resolve(results);
           else
             testListInternal(expectEnabled, list, idx + 1).then(function(retArg) { deferred.resolve(retArg); });
         });
         return deferred.promise;
-      }
+      };
       return testListInternal(ipcArgs.expectEnabled, ipcArgs.list);
-    }
+    };
   }
 
   let testPolicy = {
-     exceptions: ['http://test1.example.com', 'http://example.com'],
-     superExceptions: ['http://test2.example.org', 'https://test1.example.com'],
-     exempt: ['http://test1.example.com', 'http://example.com',
-              'http://test2.example.org', 'http://sub1.test2.example.org',
-              'https://sub1.test1.example.com'],
-     notExempt: ['http://test2.example.com', 'http://sub1.test1.example.com',
-                 'http://www.example.com', 'https://test2.example.com',
-                 'https://example.com', 'http://test1.example.org'],
+     exceptions: ["http://test1.example.com", "http://example.com"],
+     superExceptions: ["http://test2.example.org", "https://test1.example.com"],
+     exempt: ["http://test1.example.com", "http://example.com",
+              "http://test2.example.org", "http://sub1.test2.example.org",
+              "https://sub1.test1.example.com"],
+     notExempt: ["http://test2.example.com", "http://sub1.test1.example.com",
+                 "http://www.example.com", "https://test2.example.com",
+                 "https://example.com", "http://test1.example.org"],
   };
 
   function activate(isBlock, exceptions, superExceptions) {
     activateDomainPolicy();
 						let set = isBlock ? policy.blocklist : policy.allowlist;
 						let superSet = isBlock ? policy.superBlocklist : policy.superAllowlist;
 						for (var e of exceptions)
 							set.add(makeURI(e));
 						for (var e of superExceptions)
 							superSet.add(makeURI(e));
-					};
+					}
 
 					info("Testing Blocklist-style Domain Policy");
 					info("Activating domainPolicy first, creating child process after");
 					activate(true, testPolicy.exceptions, testPolicy.superExceptions);
 					currentTask = initProcess();
 					await currentTask;
 					let results = [];
 					currentTask = runTest(testList(true, testPolicy.notExempt));
@@ -200,17 +200,17 @@ async function test_domainPolicy() {
 					results = results.concat(await currentTask);
 					currentTask = runTest(testList(false, testPolicy.exempt));
 					results = results.concat(await currentTask);
 					checkAndCleanup(results);
 
 					info("Testing Allowlist-style Domain Policy");
   deferred = Promise.defer();
   currentTask = deferred.promise;
-  SpecialPowers.pushPrefEnv({set:[["javascript.enabled", false]]}, () => { return deferred.resolve()});
+  SpecialPowers.pushPrefEnv({set: [["javascript.enabled", false]]}, () => { return deferred.resolve(); });
   await currentTask;
 
   info("Activating domainPolicy first, creating child process after");
   activate(false, testPolicy.exceptions, testPolicy.superExceptions);
   currentTask = initProcess();
   await currentTask;
   results = [];
   currentTask = runTest(testList(false, testPolicy.notExempt));
@@ -230,11 +230,11 @@ async function test_domainPolicy() {
   results = results.concat(await currentTask);
   checkAndCleanup(results);
   finish();
 }
 
 
 add_task(test_domainPolicy);
 
-registerCleanupFunction(()=>{
+registerCleanupFunction(() => {
   deactivateDomainPolicy();
-})
+});
--- a/dom/ipc/tests/browser_memory_distribution_telemetry.js
+++ b/dom/ipc/tests/browser_memory_distribution_telemetry.js
@@ -31,29 +31,29 @@ add_task(async function test_memory_dist
   let histogram = Services.telemetry.getKeyedHistogramById("MEMORY_DISTRIBUTION_AMONG_CONTENT");
   histogram.clear();
 
   let tab1 = await BrowserTestUtils.openNewForegroundTab(gBrowser, DUMMY_PAGE_DATA_URI);
   let tab2 = await BrowserTestUtils.openNewForegroundTab(gBrowser, DUMMY_PAGE_DATA_URI);
   let tab3 = await BrowserTestUtils.openNewForegroundTab(gBrowser, DUMMY_PAGE_DATA_URI);
 
   let finishedGathering = new Promise(resolve => {
-    let obs = function () {
+    let obs = function() {
       Services.obs.removeObserver(obs, "gather-memory-telemetry-finished");
       resolve();
-    }
+    };
     Services.obs.addObserver(obs, "gather-memory-telemetry-finished");
   });
 
   session.TelemetrySession.getPayload();
 
   await finishedGathering;
 
   let s = histogram.snapshot();
-  ok("0 - 10 tabs" in s, "We should have some samples by now in this bucket.")
+  ok("0 - 10 tabs" in s, "We should have some samples by now in this bucket.");
   for (var key in s) {
     is(key, "0 - 10 tabs");
     let fewTabsSnapshot = s[key];
     ok(fewTabsSnapshot.sum > 0, "Zero difference between all the content processes is unlikely, what happened?");
     ok(fewTabsSnapshot.sum < 80, "20 percentage difference on average is unlikely, what happened?");
     let values = fewTabsSnapshot.values;
     for (let [bucket, value] of Object.entries(values)) {
       if (bucket >= 10) {
--- a/dom/ipc/tests/browser_remote_navigation_delay_telemetry.js
+++ b/dom/ipc/tests/browser_remote_navigation_delay_telemetry.js
@@ -23,21 +23,21 @@ add_task(async function test_memory_dist
   ok(!tab2.linkedBrowser.isRemoteBrowser, "|tab2| should have a non-remote browser.");
   // Navigate the tab, so it will change remotness and it triggers the SessionStore:restoreTabContent case.
   await BrowserTestUtils.loadURI(tab2.linkedBrowser, "http://example.com");
   ok(tab2.linkedBrowser.isRemoteBrowser, "|tab2| should have a remote browser by now.");
 
   // There is no good way to make sure that the parent received the histogram entries from the child processes.
   // Let's stick to the ugly, spinning the event loop until we have a good approach (Bug 1357509).
   await BrowserTestUtils.waitForCondition(() => {
-    let s = Services.telemetry.getSnapshotForKeyedHistograms("main", false).content["FX_TAB_REMOTE_NAVIGATION_DELAY_MS"];
+    let s = Services.telemetry.getSnapshotForKeyedHistograms("main", false).content.FX_TAB_REMOTE_NAVIGATION_DELAY_MS;
     return s && "WebNavigation:LoadURI" in s && "SessionStore:restoreTabContent" in s;
   });
 
-  let s = Services.telemetry.getSnapshotForKeyedHistograms("main", false).content["FX_TAB_REMOTE_NAVIGATION_DELAY_MS"];
+  let s = Services.telemetry.getSnapshotForKeyedHistograms("main", false).content.FX_TAB_REMOTE_NAVIGATION_DELAY_MS;
   let restoreTabSnapshot = s["SessionStore:restoreTabContent"];
   ok(restoreTabSnapshot.sum > 0, "Zero delay for the restoreTabContent case is unlikely.");
   ok(restoreTabSnapshot.sum < 10000, "More than 10 seconds delay for the restoreTabContent case is unlikely.");
 
   let loadURISnapshot = s["WebNavigation:LoadURI"];
   ok(loadURISnapshot.sum > 0, "Zero delay for the LoadURI case is unlikely.");
   ok(loadURISnapshot.sum < 10000, "More than 10 seconds delay for the LoadURI case is unlikely.");
 
--- a/dom/ipc/tests/test_CrashService_crash.html
+++ b/dom/ipc/tests/test_CrashService_crash.html
@@ -11,84 +11,83 @@ Ensures that content crashes are reporte
 <body>
 
 <script type="application/javascript">
 "use strict";
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.requestFlakyTimeout("untriaged");
 SpecialPowers.addPermission("browser", true, document);
-SpecialPowers.pushPrefEnv({'set':[
+SpecialPowers.pushPrefEnv({"set": [
   ["dom.mozBrowserFramesEnabled", true],
   ["network.disable.ipc.security", true],
-  ["dom.ipc.tabs.disabled", false]
-]}, function () {
+  ["dom.ipc.tabs.disabled", false],
+]}, function() {
 
-  var iframe =  document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe');
+  var iframe =  document.createElementNS("http://www.w3.org/1999/xhtml", "iframe");
   iframe.setAttribute("remote", "true");
   SpecialPowers.wrap(iframe).mozbrowser = true;
   document.documentElement.appendChild(iframe);
 
   SimpleTest.expectChildProcessCrash();
 
   var crashMan =
     SpecialPowers.Cu.import("resource://gre/modules/Services.jsm").
     Services.crashmanager;
 
   // First, clear the crash record store.
   info("Waiting for pruneOldCrashes");
   var future = new Date(Date.now() + 1000 * 60 * 60 * 24);
-  crashMan.pruneOldCrashes(future).then(function () {
+  crashMan.pruneOldCrashes(future).then(function() {
 
     var crashDateMS = Date.now();
 
     // Inject a frame script that crashes the content process.
     var mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
-    mm.loadFrameScript('data:,new ' + function ContentScriptScope() {
+    mm.loadFrameScript("data:,new " + function ContentScriptScope() {
       ChromeUtils.import("resource://gre/modules/ctypes.jsm");
       let crash = function() {
         let zero = new ctypes.intptr_t(8);
         let badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));
         badptr.contents;
       };
       privateNoteIntentionalCrash();
       crash();
     }, false);
 
     // Finally, poll for the new crash record.
     function tryGetCrash() {
       info("Waiting for getCrashes");
-      crashMan.getCrashes().then(SpecialPowers.wrapCallback(function (crashes) {
+      crashMan.getCrashes().then(SpecialPowers.wrapCallback(function(crashes) {
         if (crashes.length) {
           is(crashes.length, 1, "There should be only one record");
           var crash = crashes[0];
           ok(crash.isOfType(crashMan.PROCESS_TYPE_CONTENT,
                             crashMan.CRASH_TYPE_CRASH),
              "Record should be a content crash");
           ok(!!crash.id, "Record should have an ID");
           ok(!!crash.crashDate, "Record should have a crash date");
           var dateMS = crash.crashDate.valueOf();
           var twoMin = 1000 * 60 * 2;
           ok(crashDateMS - twoMin <= dateMS &&
              dateMS <= crashDateMS + twoMin,
              "Record's crash date should be nowish: " +
              "now=" + crashDateMS + " recordDate=" + dateMS);
           SimpleTest.finish();
-        }
-        else {
+        } else {
           setTimeout(tryGetCrash, 1000);
         }
-      }), function (err) {
+      }), function(err) {
         ok(false, "Error getting crashes: " + err);
         SimpleTest.finish();
       });
     }
     setTimeout(tryGetCrash, 1000);
 
-  }, function () {
+  }, function() {
     ok(false, "pruneOldCrashes error");
     SimpleTest.finish();
   });
 });
 
 </script>
 </body>
 </html>
--- a/dom/ipc/tests/test_Preallocated.html
+++ b/dom/ipc/tests/test_Preallocated.html
@@ -13,39 +13,39 @@ Test that the preallocated process start
 <script type="application/javascript">
 "use strict";
 
 SimpleTest.waitForExplicitFinish();
 
 function expectProcessCreated() {
   return new Promise(resolve => {
     function parentExpectProcessCreated() {
-      ChromeUtils.import('resource://gre/modules/Services.jsm');
+      ChromeUtils.import("resource://gre/modules/Services.jsm");
       let topic = "ipc:content-initializing";
-      let obs = { observe: function() {
+      let obs = { observe() {
         Services.obs.removeObserver(obs, topic);
-        sendAsyncMessage('process-created');
-      }}
+        sendAsyncMessage("process-created");
+      }};
       Services.obs.addObserver(obs, topic);
     }
 
     let helper = SpecialPowers.loadChromeScript(parentExpectProcessCreated);
-    SimpleTest.registerCleanupFunction(function() { helper.destroy() });
-    helper.addMessageListener('process-created', resolve);
+    SimpleTest.registerCleanupFunction(function() { helper.destroy(); });
+    helper.addMessageListener("process-created", resolve);
   });
 }
 
 expectProcessCreated().then(() => {
   ok(true, "Process creation detected.");
   SimpleTest.finish();
 });
 
 // Kill existing preallocated process.
-SpecialPowers.pushPrefEnv({'set':[["dom.ipc.processPrelaunch.enabled", false]]}).then(() => {
+SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processPrelaunch.enabled", false]]}).then(() => {
   // Make sure we have the capacity to launch preallocated process.
-  SpecialPowers.pushPrefEnv({'set':[["dom.ipc.processCount", 100]]}).then(() => {
+  SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processCount", 100]]}).then(() => {
     // Enable preallocated process and run the test.
-    SpecialPowers.pushPrefEnv({'set':[["dom.ipc.processPrelaunch.enabled", true]]});
+    SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processPrelaunch.enabled", true]]});
   });
 });
 </script>
 </body>
 </html>
--- a/dom/ipc/tests/test_blob_sliced_from_child_process.html
+++ b/dom/ipc/tests/test_blob_sliced_from_child_process.html
@@ -30,18 +30,18 @@ function childFrameScript() {
 
   let slice = blob.slice(firstSliceStart, firstSliceEnd, blobType);
 
   let secondSliceStart = blobData[2].indexOf("a");
   let secondSliceEnd = secondSliceStart + 2;
 
   slice = slice.slice(secondSliceStart, secondSliceEnd, blobType);
 
-  sendAsyncMessage(messageName, { blob: blob });
-  sendAsyncMessage(messageName, { slice: slice });
+  sendAsyncMessage(messageName, { blob });
+  sendAsyncMessage(messageName, { slice });
 }
 
 function parentFrameScript(mm) {
   const messageName = "test:blob-slice-test";
   const blobData = ["So", " ", "many", " ", "blobs!"];
   const blobText = blobData.join("");
   const blobType = "text/plain";
 
@@ -163,17 +163,17 @@ function setup() {
           SpecialPowers.wrap(iframe).mozbrowser = true;
           iframe.id = "iframe";
           iframe.src =
             "data:text/html,<!DOCTYPE HTML><html><body></body></html>";
 
           iframe.addEventListener("mozbrowserloadend", function() {
             info("Starting tests");
 
-            let mm = SpecialPowers.getBrowserFrameMessageManager(iframe)
+            let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
             parentFrameScript(mm);
           });
 
           document.body.appendChild(iframe);
         }
       );
     }
   );
--- a/dom/ipc/tests/test_blob_sliced_from_parent_process.html
+++ b/dom/ipc/tests/test_blob_sliced_from_parent_process.html
@@ -16,35 +16,35 @@ function childFrameScript() {
   const messageName = "test:blob-slice-test";
   const blobData = ["So", " ", "many", " ", "blobs!"];
   const blobText = blobData.join("");
   const blobType = "text/plain";
 
   const sliceText = "an";
 
   function info(msg) {
-    sendAsyncMessage(messageName, { op: "info", msg: msg });
+    sendAsyncMessage(messageName, { op: "info", msg });
   }
 
   function ok(condition, name, diag) {
     sendAsyncMessage(messageName,
                      { op: "ok",
-                       condition: condition,
-                       name: name,
-                       diag: diag });
+                       condition,
+                       name,
+                       diag });
   }
 
   function is(a, b, name) {
     let pass = a == b;
     let diag = pass ? "" : "got " + a + ", expected " + b;
     ok(pass, name, diag);
   }
 
   function finish(result) {
-    sendAsyncMessage(messageName, { op: "done", result: result });
+    sendAsyncMessage(messageName, { op: "done", result });
   }
 
   function grabAndContinue(arg) {
     testGenerator.next(arg);
   }
 
   function* testSteps() {
     addMessageListener(messageName, grabAndContinue);
@@ -185,17 +185,17 @@ function setup() {
           SpecialPowers.wrap(iframe).mozbrowser = true;
           iframe.id = "iframe";
           iframe.src =
             "data:text/html,<!DOCTYPE HTML><html><body></body></html>";
 
           iframe.addEventListener("mozbrowserloadend", function() {
             info("Starting tests");
 
-            let mm = SpecialPowers.getBrowserFrameMessageManager(iframe)
+            let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
             parentFrameScript(mm);
           });
 
           document.body.appendChild(iframe);
         }
       );
     }
   );
--- a/dom/ipc/tests/test_bug1086684.html
+++ b/dom/ipc/tests/test_bug1086684.html
@@ -94,15 +94,15 @@
       info("Got load event.");
 
       SpecialPowers.addPermission("browser", true, document);
       SpecialPowers.pushPrefEnv({
         "set": [
           ["dom.ipc.browser_frames.oop_by_default", true],
           ["dom.mozBrowserFramesEnabled", true],
           ["network.disable.ipc.security", true],
-          ["browser.pagethumbnails.capturing_disabled", true]
-        ]
+          ["browser.pagethumbnails.capturing_disabled", true],
+        ],
       }, runTests);
     });
   </script>
 </body>
 </html>
--- a/dom/ipc/tests/test_child_docshell.html
+++ b/dom/ipc/tests/test_child_docshell.html
@@ -8,49 +8,49 @@
 </head>
 <body>
 
 <script type="application/javascript">
 "use strict";
 
 SimpleTest.waitForExplicitFinish();
 SpecialPowers.addPermission("browser", true, document);
-SpecialPowers.pushPrefEnv({'set':[
+SpecialPowers.pushPrefEnv({"set": [
   ["dom.mozBrowserFramesEnabled", true],
   ["network.disable.ipc.security", true],
-  ["dom.ipc.tabs.disabled", false]
-]}, function () {
+  ["dom.ipc.tabs.disabled", false],
+]}, function() {
 
-  var iframe =  document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe');
+  var iframe =  document.createElementNS("http://www.w3.org/1999/xhtml", "iframe");
   iframe.setAttribute("remote", "true");
   SpecialPowers.wrap(iframe).mozbrowser = true;
   document.documentElement.appendChild(iframe);
 
   var mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
-  mm.addMessageListener("chromeEventHandler", function (msg) {
+  mm.addMessageListener("chromeEventHandler", function(msg) {
     msg = SpecialPowers.wrap(msg);
     var result = msg.json;
     is(result.processType, SpecialPowers.Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT,
        "The frame script is running in a real distinct child process");
     ok(result.hasCorrectInterface,
        "docshell.chromeEventHandler has EventTarget interface");
   });
 
 
-  mm.addMessageListener("DOMWindowCreatedReceived", function (msg) {
+  mm.addMessageListener("DOMWindowCreatedReceived", function(msg) {
     msg = SpecialPowers.wrap(msg);
     ok(true, "the chrome event handler looks functional");
     var result = msg.json;
     ok(result.stableChromeEventHandler, "docShell.chromeEventHandler is stable");
     ok(result.iframeHasNewDocShell, "iframe spawns a new docShell");
     ok(result.iframeHasSameChromeEventHandler, "but iframe has the same chrome event handler");
     SimpleTest.finish();
   });
   // Inject a frame script in the child process:
-  mm.loadFrameScript('data:,new ' + function ContentScriptScope() {
+  mm.loadFrameScript("data:,new " + function ContentScriptScope() {
     var processType = Cc["@mozilla.org/xre/runtime;1"]
                         .getService(Ci.nsIXULRuntime)
                         .processType;
     var chromeEventHandler = docShell.chromeEventHandler;
     sendAsyncMessage("chromeEventHandler", {
       processType: Services.appinfo.processType,
       hasCorrectInterface: chromeEventHandler &&
                            EventTarget.isInstance(chromeEventHandler),
@@ -65,17 +65,17 @@ SpecialPowers.pushPrefEnv({'set':[
         return;
       }
       chromeEventHandler.removeEventListener("DOMWindowCreated", listener);
       let new_win = evt.target.defaultView;
       let new_docShell = new_win.docShell;
       sendAsyncMessage("DOMWindowCreatedReceived", {
         stableChromeEventHandler: chromeEventHandler === docShell.chromeEventHandler,
         iframeHasNewDocShell: new_docShell !== docShell,
-        iframeHasSameChromeEventHandler: new_docShell.chromeEventHandler === chromeEventHandler
+        iframeHasSameChromeEventHandler: new_docShell.chromeEventHandler === chromeEventHandler,
       });
     });
 
     function go() {
       let i = content.document.createElement("iframe");
       i.setAttribute("src", "data:text/html,foo");
       content.document.documentElement.appendChild(i);
     }
--- a/dom/ipc/tests/test_cpow_cookies.html
+++ b/dom/ipc/tests/test_cpow_cookies.html
@@ -77,14 +77,14 @@
       SpecialPowers.addPermission("browser", true, document);
       SpecialPowers.pushPrefEnv({
         "set": [
           ["dom.ipc.browser_frames.oop_by_default", true],
           ["dom.mozBrowserFramesEnabled", true],
           ["network.disable.ipc.security", true],
           ["browser.pagethumbnails.capturing_disabled", true],
           ["security.data_uri.block_toplevel_data_uri_navigations", false],
-        ]
+        ],
       }, runTests);
     });
   </script>
 </body>
 </html>
--- a/dom/ipc/tests/test_temporaryfile_stream.html
+++ b/dom/ipc/tests/test_temporaryfile_stream.html
@@ -41,42 +41,42 @@ function startTest() {
     // We just want one frame encoded, to see that the recorder produces something readable.
     mediaRecorder.stop();
   };
 
   mediaRecorder.onstop = () => {
     info("Got 'stop' event");
     ok(blob, "Should have gotten a data blob");
     var xhr = new XMLHttpRequest();
-    xhr.open('POST', 'blob_verify.sjs', true);
+    xhr.open("POST", "blob_verify.sjs", true);
     xhr.onload = () => {
       var video = document.createElement("video");
       video.id = "recorded-video";
       video.src = URL.createObjectURL(xhr.response);
       video.play();
       video.onerror = err => {
         ok(false, "Should be able to play the recording. Got error. code=" + video.error.code);
         SimpleTest.finish();
       };
       document.getElementById("content").appendChild(video);
       helper.pixelMustBecome(video, helper.red, {
         threshold: 128,
-        infoString: "Should become red"
+        infoString: "Should become red",
       }).then(SimpleTest.finish);
     };
     xhr.onerror = () => {
       ok(false, "XHR error");
       SimpleTest.finish();
-    }
+    };
     xhr.responseType = "blob";
     xhr.send(blob);
   };
 
   mediaRecorder.start();
   is(mediaRecorder.state, "recording", "Media recorder should be recording");
 }
 
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({set:[["media.recorder.max_memory", 1]]}, startTest);
+SpecialPowers.pushPrefEnv({set: [["media.recorder.max_memory", 1]]}, startTest);
 </script>
 </pre>
 </body>
 </html>