Bug 1363795 - Enable some Mozilla ESLint recommended rules for dom/indexedDB/test - automatic fixes. r=bevis
authorMark Banner <standard8@mozilla.com>
Wed, 10 May 2017 17:19:34 +0100
changeset 359168 ab9b62e22a5d35a99f9f25c9aefaa8e92fb8e1f6
parent 359167 be00938a685295f9bd6bf5e958c0e799e6afad45
child 359169 de859ae644212accb6e706c2a8408df04f816573
push id42991
push usermbanner@mozilla.com
push dateFri, 19 May 2017 06:25:17 +0000
treeherderautoland@de859ae64421 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbevis
bugs1363795
milestone55.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 1363795 - Enable some Mozilla ESLint recommended rules for dom/indexedDB/test - automatic fixes. r=bevis MozReview-Commit-ID: I8FKV241Inw
dom/indexedDB/test/.eslintrc.js
dom/indexedDB/test/blob_worker_crash_iframe.html
dom/indexedDB/test/browser_forgetThisSite.js
dom/indexedDB/test/browser_permissionsPromptAllow.js
dom/indexedDB/test/browser_permissionsPromptDeny.js
dom/indexedDB/test/browser_permissionsPromptWorker.js
dom/indexedDB/test/browser_permissionsSharedWorker.html
dom/indexedDB/test/browser_permissionsSharedWorker.js
dom/indexedDB/test/browser_permissionsWorker.html
dom/indexedDB/test/browser_permissionsWorker.js
dom/indexedDB/test/browser_perwindow_privateBrowsing.js
dom/indexedDB/test/chromeHelpers.js
dom/indexedDB/test/exceptions_in_events_iframe.html
dom/indexedDB/test/extensions/bootstrap.js
dom/indexedDB/test/file.js
dom/indexedDB/test/head.js
dom/indexedDB/test/helpers.js
dom/indexedDB/test/leaving_page_iframe.html
dom/indexedDB/test/test_blob_simple.html
dom/indexedDB/test/test_blob_worker_crash.html
dom/indexedDB/test/test_blob_worker_xhr_post.html
dom/indexedDB/test/test_blob_worker_xhr_post_multifile.html
dom/indexedDB/test/test_blob_worker_xhr_read.html
dom/indexedDB/test/test_blob_worker_xhr_read_slice.html
dom/indexedDB/test/test_bug937006.html
dom/indexedDB/test/test_file_put_deleted.html
dom/indexedDB/test/test_filehandle_getFile.html
dom/indexedDB/test/test_filehandle_overlapping.html
dom/indexedDB/test/test_filehandle_workers.html
dom/indexedDB/test/test_message_manager_ipc.html
dom/indexedDB/test/test_persistenceType.html
dom/indexedDB/test/test_sandbox.html
dom/indexedDB/test/test_third_party.html
--- a/dom/indexedDB/test/.eslintrc.js
+++ b/dom/indexedDB/test/.eslintrc.js
@@ -8,22 +8,13 @@ module.exports = {
     "plugin:mozilla/mochitest-test",
   ],
   "plugins": [
     "mozilla"
   ],
   "rules": {
     "brace-style": "off",
     "consistent-return": "off",
-    "key-spacing": "off",
-    "keyword-spacing": "off",
-    "no-extra-semi": "off",
     "no-native-reassign": "off",
     "no-shadow": "off",
-    "no-trailing-spaces": "off",
     "no-unused-vars": "off",
-    "object-shorthand": "off",
-    "quotes": "off",
-    "spaced-comment": "off",
-    "space-before-blocks": "off",
-    "space-before-function-paren": "off",
   }
 };
--- a/dom/indexedDB/test/blob_worker_crash_iframe.html
+++ b/dom/indexedDB/test/blob_worker_crash_iframe.html
@@ -33,37 +33,37 @@ dump("EXCEPTION IN CREATION: " + e + "\n
         report(false);
       }
     }
 
     function createAndStoreBlob() {
       const BLOB_DATA = ["fun ", "times ", "all ", "around!"];
       var blob = new Blob(BLOB_DATA, { type: "text/plain" });
       var objectStore = db.transaction("foo", "readwrite").objectStore("foo");
-      objectStore.add({ blob: blob }, 42).onsuccess = refetchBlob;
+      objectStore.add({ blob }, 42).onsuccess = refetchBlob;
     }
 
     function refetchBlob() {
       var foo = db.transaction("foo").objectStore("foo");
       foo.get(42).onsuccess = fetchedBlobCreateWorkerAndSendBlob;
     }
 
     function fetchedBlobCreateWorkerAndSendBlob(event) {
       var idbBlob = event.target.result.blob;
-      var compositeBlob = new Blob(['I like the following blob: ', idbBlob],
+      var compositeBlob = new Blob(["I like the following blob: ", idbBlob],
                                    { type: "text/fancy" });
 
       function workerScript() {
         /* eslint-env worker */
         onmessage = function(event) {
           // Save the Blob to the worker's global scope.
           self.holdOntoBlob = event.data;
           // Send any message so we can serialize and keep our runtime behaviour
           // consistent.
-          postMessage('kung fu death grip established');
+          postMessage("kung fu death grip established");
         }
       }
 
       var url =
         URL.createObjectURL(new Blob(["(", workerScript.toSource(), ")()"]));
 
       // Keep a reference to the worker on the window.
       var worker = window.worker = new Worker(url);
@@ -79,17 +79,17 @@ dump("EXCEPTION IN CREATION: " + e + "\n
       var objectStore = db.transaction("foo", "readwrite").objectStore("foo");
       objectStore.delete(42).onsuccess = closeDBTellOwningThread;
     }
 
     function closeDBTellOwningThread(event) {
       // Now that worker has latched the blob, clean up the database.
       db.close();
       db = null;
-      report('ready');
+      report("ready");
     }
 
     createDatastore();
   }
   </script>
 
 </head>
 
--- a/dom/indexedDB/test/browser_forgetThisSite.js
+++ b/dom/indexedDB/test/browser_forgetThisSite.js
@@ -27,33 +27,33 @@ function test()
   setPermission(testPageURL2, "indexedDB");
   executeSoon(test1);
 }
 
 function test1()
 {
   // Set database version for domain 1
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     setFinishedCallback(function(result, exception) {
       ok(result == 11, "Set version on database in " + testPageURL1);
       ok(!exception, "No exception");
       gBrowser.removeCurrentTab();
 
       executeSoon(test2);
     });
   }, {capture: true, once: true});
   content.location = testPageURL1;
 }
 
 function test2()
 {
   // Set database version for domain 2
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     setFinishedCallback(function(result, exception) {
       ok(result == 11, "Set version on database in " + testPageURL2);
       ok(!exception, "No exception");
       gBrowser.removeCurrentTab();
 
       executeSoon(test3);
     });
   }, {capture: true, once: true});
@@ -68,33 +68,33 @@ function test3()
     executeSoon(test4);
   });
 }
 
 function test4()
 {
   // Get database version for domain 1
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     setFinishedCallback(function(result, exception) {
       ok(result == 11, "Got correct version on database in " + testPageURL3);
       ok(!exception, "No exception");
       gBrowser.removeCurrentTab();
 
       executeSoon(test5);
     });
   }, {capture: true, once: true});
   content.location = testPageURL3;
 }
 
 function test5()
 {
   // Get database version for domain 2
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     setFinishedCallback(function(result, exception) {
       ok(result == 1, "Got correct version on database in " + testPageURL4);
       ok(!exception, "No exception");
       gBrowser.removeCurrentTab();
 
       executeSoon(finish);
     });
   }, {capture: true, once: true});
--- a/dom/indexedDB/test/browser_permissionsPromptAllow.js
+++ b/dom/indexedDB/test/browser_permissionsPromptAllow.js
@@ -16,71 +16,71 @@ function test()
   executeSoon(test1);
 }
 
 function test1()
 {
   info("creating tab");
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
 
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     setFinishedCallback(function(isIDBDatabase, exception) {
       ok(isIDBDatabase,
          "First database creation was successful");
       ok(!exception, "No exception");
       is(getPermission(testPageURL, "indexedDB"),
          Components.interfaces.nsIPermissionManager.ALLOW_ACTION,
          "Correct permission set");
       gBrowser.removeCurrentTab();
       executeSoon(test2);
     });
 
-    registerPopupEventHandler("popupshowing", function () {
+    registerPopupEventHandler("popupshowing", function() {
       ok(true, "prompt showing");
     });
-    registerPopupEventHandler("popupshown", function () {
+    registerPopupEventHandler("popupshown", function() {
       ok(true, "prompt shown");
       triggerMainCommand(this);
     });
-    registerPopupEventHandler("popuphidden", function () {
+    registerPopupEventHandler("popuphidden", function() {
       ok(true, "prompt hidden");
     });
 
   }, {capture: true, once: true});
 
   info("loading test page: " + testPageURL);
   content.location = testPageURL;
 }
 
 function test2()
 {
   info("creating tab");
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
 
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     setFinishedCallback(function(isIDBDatabase, exception) {
       ok(isIDBDatabase,
          "First database creation was successful");
       ok(!exception, "No exception");
       is(getPermission(testPageURL, "indexedDB"),
          Components.interfaces.nsIPermissionManager.ALLOW_ACTION,
          "Correct permission set");
       gBrowser.removeCurrentTab();
       unregisterAllPopupEventHandlers();
       removePermission(testPageURL, "indexedDB");
       executeSoon(finish);
     });
 
-    registerPopupEventHandler("popupshowing", function () {
+    registerPopupEventHandler("popupshowing", function() {
       ok(false, "Shouldn't show a popup this time");
     });
-    registerPopupEventHandler("popupshown", function () {
+    registerPopupEventHandler("popupshown", function() {
       ok(false, "Shouldn't show a popup this time");
     });
-    registerPopupEventHandler("popuphidden", function () {
+    registerPopupEventHandler("popuphidden", function() {
       ok(false, "Shouldn't show a popup this time");
     });
 
   }, {capture: true, once: true});
 
   info("loading test page: " + testPageURL);
   content.location = testPageURL;
 }
--- a/dom/indexedDB/test/browser_permissionsPromptDeny.js
+++ b/dom/indexedDB/test/browser_permissionsPromptDeny.js
@@ -26,53 +26,53 @@ add_task(function* test1() {
 
   info("creating tab");
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
 
   info("loading test page: " + testPageURL);
   gBrowser.selectedBrowser.loadURI(testPageURL);
   yield BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
 
-  registerPopupEventHandler("popupshowing", function () {
+  registerPopupEventHandler("popupshowing", function() {
     ok(true, "prompt showing");
   });
-  registerPopupEventHandler("popupshown", function () {
+  registerPopupEventHandler("popupshown", function() {
     ok(true, "prompt shown");
     triggerSecondaryCommand(this);
   });
-  registerPopupEventHandler("popuphidden", function () {
+  registerPopupEventHandler("popuphidden", function() {
     ok(true, "prompt hidden");
   });
 
   yield promiseMessage("InvalidStateError", gBrowser);
 
   is(getPermission(testPageURL, "indexedDB"),
      Components.interfaces.nsIPermissionManager.DENY_ACTION,
      "Correct permission set");
   gBrowser.removeCurrentTab();
 });
 
 add_task(function* test2() {
   info("creating private window");
-  let win = yield BrowserTestUtils.openNewBrowserWindow({ private : true });
-  
+  let win = yield BrowserTestUtils.openNewBrowserWindow({ private: true });
+
   info("creating private tab");
   win.gBrowser.selectedTab = win.gBrowser.addTab();
 
   info("loading test page: " + testPageURL);
   win.gBrowser.selectedBrowser.loadURI(testPageURL);
   yield BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
-  
-  registerPopupEventHandler("popupshowing", function () {
+
+  registerPopupEventHandler("popupshowing", function() {
     ok(false, "prompt showing");
   });
-  registerPopupEventHandler("popupshown", function () {
+  registerPopupEventHandler("popupshown", function() {
     ok(false, "prompt shown");
   });
-  registerPopupEventHandler("popuphidden", function () {
+  registerPopupEventHandler("popuphidden", function() {
     ok(false, "prompt hidden");
   });
   yield promiseMessage("InvalidStateError", win.gBrowser);
 
   is(getPermission(testPageURL, "indexedDB"),
      Components.interfaces.nsIPermissionManager.DENY_ACTION,
      "Correct permission set");
   unregisterAllPopupEventHandlers();
@@ -83,23 +83,23 @@ add_task(function* test2() {
 add_task(function* test3() {
   info("creating tab");
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
 
   info("loading test page: " + testPageURL);
   gBrowser.selectedBrowser.loadURI(testPageURL);
   yield BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
 
-  registerPopupEventHandler("popupshowing", function () {
+  registerPopupEventHandler("popupshowing", function() {
     ok(false, "Shouldn't show a popup this time");
   });
-  registerPopupEventHandler("popupshown", function () {
+  registerPopupEventHandler("popupshown", function() {
     ok(false, "Shouldn't show a popup this time");
   });
-  registerPopupEventHandler("popuphidden", function () {
+  registerPopupEventHandler("popuphidden", function() {
     ok(false, "Shouldn't show a popup this time");
   });
 
   yield promiseMessage("InvalidStateError", gBrowser);
 
   is(getPermission(testPageURL, "indexedDB"),
      Components.interfaces.nsIPermissionManager.DENY_ACTION,
      "Correct permission set");
--- a/dom/indexedDB/test/browser_permissionsPromptWorker.js
+++ b/dom/indexedDB/test/browser_permissionsPromptWorker.js
@@ -18,35 +18,35 @@ function test()
 function test1()
 {
   // We want a prompt.
   removePermission(testWorkerURL, "indexedDB");
 
   info("creating tab");
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
 
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     setFinishedCallback(function(isIDBDatabase, exception) {
       ok(isIDBDatabase, "First database creation was successful");
       ok(!exception, "No exception");
       is(getPermission(testWorkerURL, "indexedDB"),
          Components.interfaces.nsIPermissionManager.ALLOW_ACTION,
          "Correct permission set");
       gBrowser.removeCurrentTab();
       executeSoon(test2);
     });
 
-    registerPopupEventHandler("popupshowing", function () {
+    registerPopupEventHandler("popupshowing", function() {
       ok(true, "prompt showing");
     });
-    registerPopupEventHandler("popupshown", function () {
+    registerPopupEventHandler("popupshown", function() {
       ok(true, "prompt shown");
       triggerMainCommand(this);
     });
-    registerPopupEventHandler("popuphidden", function () {
+    registerPopupEventHandler("popuphidden", function() {
       ok(true, "prompt hidden");
     });
 
   }, {capture: true, once: true});
 
   info("loading test page: " + testWorkerURL);
   content.location = testWorkerURL;
 }
@@ -54,34 +54,34 @@ function test1()
 function test2()
 {
   // We want a prompt.
   removePermission(testSharedWorkerURL, "indexedDB");
 
   info("creating tab");
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
 
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     setFinishedCallback(function(isIDBDatabase, exception) {
       ok(!isIDBDatabase, "First database creation was successful");
       ok(exception, "No exception");
       is(getPermission(testSharedWorkerURL, "indexedDB"),
          Components.interfaces.nsIPermissionManager.UNKNOWN_ACTION,
          "Correct permission set");
       gBrowser.removeCurrentTab();
       executeSoon(finish);
     });
 
-    registerPopupEventHandler("popupshowing", function () {
+    registerPopupEventHandler("popupshowing", function() {
       ok(false, "prompt showing");
     });
-    registerPopupEventHandler("popupshown", function () {
+    registerPopupEventHandler("popupshown", function() {
       ok(false, "prompt shown");
     });
-    registerPopupEventHandler("popuphidden", function () {
+    registerPopupEventHandler("popuphidden", function() {
       ok(false, "prompt hidden");
     });
 
   }, {capture: true, once: true});
 
   info("loading test page: " + testSharedWorkerURL);
   content.location = testSharedWorkerURL;
 }
--- a/dom/indexedDB/test/browser_permissionsSharedWorker.html
+++ b/dom/indexedDB/test/browser_permissionsSharedWorker.html
@@ -8,19 +8,19 @@
 
     <script type="text/javascript">
     // testFinishedCallback is expected to be set in the scope by head.js.
     /* global testFinishedCallback */
     let testIsIDBDatabase;
     let testException;
 
     function runTest() {
-      let w = new SharedWorker('browser_permissionsSharedWorker.js');
+      let w = new SharedWorker("browser_permissionsSharedWorker.js");
       w.port.onmessage = function(e) {
-        if (e.data.status == 'success') {
+        if (e.data.status == "success") {
           testIsIDBDatabase = e.data.isIDBDatabase;
         } else {
           testException = e.data.error;
         }
 
         setTimeout(testFinishedCallback, 0, testIsIDBDatabase, testException);
       }
 
--- a/dom/indexedDB/test/browser_permissionsSharedWorker.js
+++ b/dom/indexedDB/test/browser_permissionsSharedWorker.js
@@ -1,16 +1,16 @@
 /* eslint-env worker */
 
 onconnect = function(e) {
   e.ports[0].onmessage = function(e) {
     var request = indexedDB.open(e.data, { version: 1,
                                            storage: "persistent" });
     request.onsuccess = function(event) {
-      e.target.postMessage({ status: 'success',
+      e.target.postMessage({ status: "success",
                              isIDBDatabase: (event.target.result instanceof IDBDatabase) });
     }
 
     request.onerror = function(event) {
-      e.target.postMessage({ status: 'error', error: event.target.error.name });
+      e.target.postMessage({ status: "error", error: event.target.error.name });
     }
   }
 }
--- a/dom/indexedDB/test/browser_permissionsWorker.html
+++ b/dom/indexedDB/test/browser_permissionsWorker.html
@@ -8,19 +8,19 @@
 
     <script type="text/javascript">
     // testFinishedCallback is expected to be set in the scope by head.js.
     /* global testFinishedCallback */
     let testIsIDBDatabase;
     let testException;
 
     function runTest() {
-      let w = new Worker('browser_permissionsWorker.js');
+      let w = new Worker("browser_permissionsWorker.js");
       w.onmessage = function(e) {
-        if (e.data.status == 'success') {
+        if (e.data.status == "success") {
           testIsIDBDatabase = e.data.isIDBDatabase;
         } else {
           testException = e.data.error;
         }
 
         setTimeout(testFinishedCallback, 0, testIsIDBDatabase, testException);
       }
 
--- a/dom/indexedDB/test/browser_permissionsWorker.js
+++ b/dom/indexedDB/test/browser_permissionsWorker.js
@@ -1,14 +1,14 @@
 /* eslint-env worker */
 
 onmessage = function(e) {
   var request = indexedDB.open(e.data, { version: 1,
                                          storage: "persistent" });
   request.onsuccess = function(event) {
-    postMessage({ status: 'success',
+    postMessage({ status: "success",
                   isIDBDatabase: (event.target.result instanceof IDBDatabase) });
   }
 
   request.onerror = function(event) {
-    postMessage({ status: 'error', error: event.target.error.name });
+    postMessage({ status: "error", error: event.target.error.name });
   }
 }
--- a/dom/indexedDB/test/browser_perwindow_privateBrowsing.js
+++ b/dom/indexedDB/test/browser_perwindow_privateBrowsing.js
@@ -13,17 +13,17 @@ function test()
   // Avoids the actual prompt
   setPermission(testPageURL, "indexedDB");
   executeSoon(test1);
 }
 
 function test1()
 {
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     if (content.location != testPageURL) {
       content.location = testPageURL;
       return;
     }
     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
 
     setFinishedCallback(function(isIDBDatabase, exception) {
       ok(isIDBDatabase,
@@ -44,17 +44,17 @@ function test2()
     executeSoon(() => test3(win));
   }, {once: true});
   registerCleanupFunction(() => win.close());
 }
 
 function test3(win)
 {
   win.gBrowser.selectedTab = win.gBrowser.addTab();
-  win.gBrowser.selectedBrowser.addEventListener("load", function () {
+  win.gBrowser.selectedBrowser.addEventListener("load", function() {
     if (win.content.location != testPageURL) {
       win.content.location = testPageURL;
       return;
     }
     win.gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
 
     setFinishedCallback(function(isIDBDatabase, exception) {
       ok(!isIDBDatabase, "No database");
--- a/dom/indexedDB/test/chromeHelpers.js
+++ b/dom/indexedDB/test/chromeHelpers.js
@@ -1,14 +1,14 @@
 /**
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
-var { 'classes': Cc, 'interfaces': Ci, 'utils': Cu } = Components;
+var { "classes": Cc, "interfaces": Ci, "utils": Cu } = Components;
 
 // testSteps is expected to be defined by the file including this file.
 /* global testSteps */
 
 var testGenerator = testSteps();
 
 if (!window.runTest) {
   window.runTest = function()
--- a/dom/indexedDB/test/exceptions_in_events_iframe.html
+++ b/dom/indexedDB/test/exceptions_in_events_iframe.html
@@ -53,17 +53,17 @@
     function* testSteps() {
       window.parent.SpecialPowers.addPermission("indexedDB", true, document);
 
       // Test 1: Throwing an exception in an upgradeneeded handler should
       // abort the versionchange transaction and fire an error at the request.
       let request = indexedDB.open(window.location.pathname, 1);
       request.onerror = errorHandler;
       request.onsuccess = unexpectedSuccessHandler;
-      request.onupgradeneeded = function () {
+      request.onupgradeneeded = function() {
         let transaction = request.transaction;
         transaction.oncomplete = unexpectedSuccessHandler;
         transaction.onabort = grabEventAndContinueHandler
         throw "STOP";
       };
 
       let event = yield undefined;
       is(event.type, "abort",
@@ -148,17 +148,17 @@
 
       is(db.objectStoreNames.length, 1, "Correct objectStoreNames length");
       ok(db.objectStoreNames.contains("foo"), "Has correct objectStore");
 
       request = objectStore.add({}, 1);
       request.onerror = errorHandler;
       request = objectStore.add({}, 1);
       request.onsuccess = unexpectedSuccessHandler;
-      request.onerror = function (event) {
+      request.onerror = function(event) {
         event.preventDefault();
         throw "STOP";
       };
 
       event = yield undefined;
 
       is(event.type, "abort", "Got transaction abort event");
       is(event.target.error.name, "AbortError", "Got AbortError object");
--- a/dom/indexedDB/test/extensions/bootstrap.js
+++ b/dom/indexedDB/test/extensions/bootstrap.js
@@ -20,17 +20,17 @@ function testForExpectedSymbols(stage, d
 function GlobalObjectsComponent() {
   this.wrappedJSObject = this;
 }
 
 GlobalObjectsComponent.prototype =
 {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports]),
 
-  runTest: function() {
+  runTest() {
     const name = "Splendid Test";
 
     let ok = this.ok;
     let finishTest = this.finishTest;
 
     let keyRange = IDBKeyRange.only(42);
     ok(keyRange, "Got keyRange");
 
@@ -43,17 +43,17 @@ GlobalObjectsComponent.prototype =
       let db = event.target.result;
       ok(db, "Got database");
       finishTest();
     }
   }
 };
 
 var gFactory = {
-  register: function() {
+  register() {
     var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 
     var classID = Components.ID("{d6f85dcb-537d-447e-b783-75d4b405622d}");
     var description = "IndexedDBTest";
     var contractID = "@mozilla.org/dom/indexeddb/GlobalObjectsComponent;1";
     var factory = XPCOMUtils._getFactory(GlobalObjectsComponent);
 
     registrar.registerFactory(classID, description, contractID, factory);
--- a/dom/indexedDB/test/file.js
+++ b/dom/indexedDB/test/file.js
@@ -54,22 +54,22 @@ function compareBuffers(buffer1, buffer2
       return false;
     }
   }
   return true;
 }
 
 function getBlob(type, view)
 {
-  return new Blob([view], {type: type});
+  return new Blob([view], {type});
 }
 
 function getFile(name, type, view)
 {
-  return new File([view], name, {type: type});
+  return new File([view], name, {type});
 }
 
 function getRandomBlob(size)
 {
   return getBlob("binary/random", getRandomView(size));
 }
 
 function getRandomFile(name, size)
--- a/dom/indexedDB/test/head.js
+++ b/dom/indexedDB/test/head.js
@@ -1,17 +1,17 @@
 /**
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 var gActiveListeners = {};
 
 function registerPopupEventHandler(eventName, callback) {
-  gActiveListeners[eventName] = function (event) {
+  gActiveListeners[eventName] = function(event) {
     if (event.target != PopupNotifications.panel)
       return;
     PopupNotifications.panel.removeEventListener(eventName,
                                                  gActiveListeners[eventName]);
     delete gActiveListeners[eventName];
 
     callback.call(PopupNotifications.panel);
   }
@@ -53,17 +53,17 @@ function triggerSecondaryCommand(popup)
   ok(notifications.length > 0, "at least one notification displayed");
   let notification = notifications[0];
   EventUtils.synthesizeMouseAtCenter(notification.secondaryButton, {});
 }
 
 function dismissNotification(popup)
 {
   info("dismissing notification");
-  executeSoon(function () {
+  executeSoon(function() {
     EventUtils.synthesizeKey("VK_ESCAPE", {});
   });
 }
 
 function setFinishedCallback(callback, win)
 {
   if (!win) {
     win = window;
--- a/dom/indexedDB/test/helpers.js
+++ b/dom/indexedDB/test/helpers.js
@@ -10,30 +10,30 @@ var testGenerator = testSteps();
 // The test js is shared between xpcshell (which has no SpecialPowers object)
 // and content mochitests (where the |Components| object is accessible only as
 // SpecialPowers.Components). Expose Components if necessary here to make things
 // work everywhere.
 //
 // Even if the real |Components| doesn't exist, we might shim in a simple JS
 // placebo for compat. An easy way to differentiate this from the real thing
 // is whether the property is read-only or not.
-var c = Object.getOwnPropertyDescriptor(this, 'Components');
-if ((!c.value || c.writable) && typeof SpecialPowers === 'object')
+var c = Object.getOwnPropertyDescriptor(this, "Components");
+if ((!c.value || c.writable) && typeof SpecialPowers === "object")
   Components = SpecialPowers.Components;
 
 function executeSoon(aFun)
 {
   let comp = SpecialPowers.wrap(Components);
 
   let thread = comp.classes["@mozilla.org/thread-manager;1"]
                    .getService(comp.interfaces.nsIThreadManager)
                    .mainThread;
 
   thread.dispatch({
-    run: function() {
+    run() {
       aFun();
     }
   }, Components.interfaces.nsIThread.DISPATCH_NORMAL);
 }
 
 function clearAllDatabases(callback) {
   let qms = SpecialPowers.Services.qms;
   let principal = SpecialPowers.wrap(document).nodePrincipal;
@@ -152,17 +152,17 @@ function* testHarnessSteps() {
           nextTestHarnessStep();
           break;
 
         case "expectUncaughtException":
           worker._expectingUncaughtException = message.expecting;
           break;
 
         case "clearAllDatabases":
-          clearAllDatabases(function(){
+          clearAllDatabases(function() {
             worker.postMessage({ op: "clearAllDatabasesDone" });
           });
           break;
 
         case "getWasmBinary":
           worker.postMessage({ op: "getWasmBinaryDone",
                                wasmBinary: getWasmBinarySync(message.text) });
           break;
@@ -291,17 +291,17 @@ function expectedErrorHandler(name)
 }
 
 function ExpectError(name, preventDefault)
 {
   this._name = name;
   this._preventDefault = preventDefault;
 }
 ExpectError.prototype = {
-  handleEvent: function(event)
+  handleEvent(event)
   {
     is(event.type, "error", "Got an error event");
     is(event.target.error.name, this._name, "Expected error was thrown.");
     if (this._preventDefault) {
       event.preventDefault();
       event.stopPropagation();
     }
     grabEventAndContinueHandler(event);
@@ -479,17 +479,17 @@ function workerScript() {
   };
 
   self.ExpectError = function(_name_, _preventDefault_)
   {
     this._name = _name_;
     this._preventDefault = _preventDefault_;
   }
   self.ExpectError.prototype = {
-    handleEvent: function(_event_)
+    handleEvent(_event_)
     {
       is(_event_.type, "error", "Got an error event");
       is(_event_.target.error.name, this._name, "Expected error was thrown.");
       if (this._preventDefault) {
         _event_.preventDefault();
         _event_.stopPropagation();
       }
       grabEventAndContinueHandler(_event_);
--- a/dom/indexedDB/test/leaving_page_iframe.html
+++ b/dom/indexedDB/test/leaving_page_iframe.html
@@ -28,16 +28,16 @@ function madeMod() {
     // Make this transaction run until the end of time or until the page is
     // navigated away, whichever comes first.
     function doGet() {
       store.get(42).onsuccess = doGet;
     }
     doGet();
     document.location = "about:blank";
   }
-  
+
 }
   </script>
 </head>
 <body onload="startDBWork();">
   This is page one.
 </body>
 </html>
--- a/dom/indexedDB/test/test_blob_simple.html
+++ b/dom/indexedDB/test/test_blob_simple.html
@@ -31,17 +31,17 @@
     event = yield undefined;
 
 
     info("Let's create a blob and store it in IndexedDB twice.");
 
     const BLOB_DATA = ["fun ", "times ", "all ", "around!"];
     const INDEX_KEY = 5;
     let blob = new Blob(BLOB_DATA, { type: "text/plain" });
-    let data = { blob: blob, index: INDEX_KEY };
+    let data = { blob, index: INDEX_KEY };
 
     objectStore = db.transaction("foo", "readwrite").objectStore("foo");
     objectStore.add(data).onsuccess = grabEventAndContinueHandler;
     event = yield undefined;
 
     info("Added blob to database once");
 
     let key = event.target.result;
--- a/dom/indexedDB/test/test_blob_worker_crash.html
+++ b/dom/indexedDB/test/test_blob_worker_crash.html
@@ -23,17 +23,17 @@
 
   function* testSteps()
   {
     info("Open iframe, wait for it to do its IndexedDB stuff.");
 
     let iframe = document.getElementById("iframe1");
     window.addEventListener("message", grabEventAndContinueHandler);
     // Put it in a different origin to be safe
-    iframe.src = //"http://example.org" +
+    iframe.src = // "http://example.org" +
                  window.location.pathname.replace(
                    "test_blob_worker_crash.html",
                    "blob_worker_crash_iframe.html");
 
     let event = yield unexpectedSuccessHandler;
     is(event.data.result, "ready", "worker initialized correctly");
 
     info("Trigger a GC to clean-up the iframe's main-thread IndexedDB");
@@ -42,17 +42,17 @@
 
     info("Kill the iframe, forget about it, trigger a GC.");
     iframe.remove();
     iframe = null;
     scheduleGC();
     yield undefined;
 
     info("If we are still alive, then we win!");
-    ok('Did not crash / trigger an assert!');
+    ok("Did not crash / trigger an assert!");
 
     finishTest();
   }
   </script>
   <script type="text/javascript" src="helpers.js"></script>
 
 </head>
 
--- a/dom/indexedDB/test/test_blob_worker_xhr_post.html
+++ b/dom/indexedDB/test/test_blob_worker_xhr_post.html
@@ -73,22 +73,22 @@
 
     function workerScript() {
       /* eslint-env worker */
       onmessage = function(event) {
         var blob = event.data;
         var xhr = new XMLHttpRequest();
         // We just want to make sure the error case doesn't fire; it's fine for
         // us to just want a 404.
-        xhr.open('POST', 'http://mochi.test:8888/does-not-exist', true);
+        xhr.open("POST", "http://mochi.test:8888/does-not-exist", true);
         xhr.onload = function() {
           postMessage({ status: xhr.status });
         };
         xhr.onerror = function() {
-          postMessage({ status: 'error' });
+          postMessage({ status: "error" });
         }
         xhr.send(blob);
       }
     }
 
     let workerScriptUrl =
       URL.createObjectURL(new Blob(["(", workerScript.toSource(), ")()"]));
 
--- a/dom/indexedDB/test/test_blob_worker_xhr_post_multifile.html
+++ b/dom/indexedDB/test/test_blob_worker_xhr_post_multifile.html
@@ -73,22 +73,22 @@
       /* eslint-env worker */
       onmessage = function(event) {
         var blob = event.data;
         var compositeBlob = new Blob(["preceding string. ", blob],
                                      { type: "text/plain" });
         var xhr = new XMLHttpRequest();
         // We just want to make sure the error case doesn't fire; it's fine for
         // us to just want a 404.
-        xhr.open('POST', 'http://mochi.test:8888/does-not-exist', true);
+        xhr.open("POST", "http://mochi.test:8888/does-not-exist", true);
         xhr.onload = function() {
           postMessage({ status: xhr.status });
         };
         xhr.onerror = function() {
-          postMessage({ status: 'error' });
+          postMessage({ status: "error" });
         }
         xhr.send(compositeBlob);
       }
     }
 
     let workerScriptUrl =
       URL.createObjectURL(new Blob(["(", workerScript.toSource(), ")()"]));
 
--- a/dom/indexedDB/test/test_blob_worker_xhr_read.html
+++ b/dom/indexedDB/test/test_blob_worker_xhr_read.html
@@ -71,18 +71,18 @@
     info("Sending blob to a worker");
 
     function workerScript() {
       /* eslint-env worker */
       onmessage = function(event) {
         var blob = event.data;
         var blobUrl = URL.createObjectURL(blob);
         var xhr = new XMLHttpRequest();
-        xhr.open('GET', blobUrl, true);
-        xhr.responseType = 'text';
+        xhr.open("GET", blobUrl, true);
+        xhr.responseType = "text";
         xhr.onload = function() {
           postMessage({ data: xhr.response });
           URL.revokeObjectURL(blobUrl);
         };
         xhr.onerror = function() {
           postMessage({ data: null });
           URL.revokeObjectURL(blobUrl);
         }
--- a/dom/indexedDB/test/test_blob_worker_xhr_read_slice.html
+++ b/dom/indexedDB/test/test_blob_worker_xhr_read_slice.html
@@ -73,18 +73,18 @@
 
     function workerScript() {
       /* eslint-env worker */
       onmessage = function(event) {
         var blob = event.data;
         var slicedBlob = blob.slice(0, 3, "text/plain");
         var blobUrl = URL.createObjectURL(slicedBlob);
         var xhr = new XMLHttpRequest();
-        xhr.open('GET', blobUrl, true);
-        xhr.responseType = 'text';
+        xhr.open("GET", blobUrl, true);
+        xhr.responseType = "text";
         xhr.onload = function() {
           postMessage({ data: xhr.response });
           URL.revokeObjectURL(blobUrl);
         };
         xhr.onerror = function() {
           postMessage({ data: null });
           URL.revokeObjectURL(blobUrl);
         }
--- a/dom/indexedDB/test/test_bug937006.html
+++ b/dom/indexedDB/test/test_bug937006.html
@@ -13,17 +13,17 @@
 </head>
 <body onload="runTest();">
   <script type="text/javascript">
 
   function runTest() {
     // doing this IDBRequest should not be able to retrieve the filename and
     // line number.
     SimpleTest.requestFlakyTimeout("untriaged");
-    setTimeout(indexedDB.deleteDatabase.bind(indexedDB), 0, 'x');
+    setTimeout(indexedDB.deleteDatabase.bind(indexedDB), 0, "x");
     setTimeout(function() {
       ok(true, "Still alive");
       SimpleTest.finish();
     }, 10);
   }
 
   </script>
 </body>
--- a/dom/indexedDB/test/test_file_put_deleted.html
+++ b/dom/indexedDB/test/test_file_put_deleted.html
@@ -86,17 +86,17 @@
     // must not start with a directory separator.)
     let fileRelPath =
       fileFullPath.substring(fileFullPath.search(/[/\\]storage[/\\]default[/\\]/) + 1);
     info("trying to delete: " + fileRelPath);
     // by using the existing SpecialPowers mechanism to create files and clean
     // them up.  We clobber our existing content, then trigger deletion to
     // clean up after it.
     SpecialPowers.createFiles(
-      [{ name: fileRelPath, data: '' }],
+      [{ name: fileRelPath, data: "" }],
       grabEventAndContinueHandler, errorCallbackHandler);
     yield undefined;
     // This is async without a callback because it's intended for cleanup.
     // Since IDB is PBackground, we can't depend on serial ordering, so we need
     // to use another async action.
     SpecialPowers.removeFiles();
     SpecialPowers.executeAfterFlushingMessageQueue(grabEventAndContinueHandler);
     yield undefined;
--- a/dom/indexedDB/test/test_filehandle_getFile.html
+++ b/dom/indexedDB/test/test_filehandle_getFile.html
@@ -29,21 +29,21 @@
     event = yield undefined;
 
     let mutableFile = event.target.result;
     mutableFile.onerror = errorHandler;
 
     request = mutableFile.getFile();
     ok(request instanceof DOMRequest, "Correct interface");
     ok(!(request instanceof IDBFileRequest), "Correct interface");
-    ok(!('fileHandle' in request), "Property should not exist");
+    ok(!("fileHandle" in request), "Property should not exist");
     ok(request.fileHandle === undefined, "Property should not exist");
-    ok(!('lockedFile' in request), "Property should not exist");
+    ok(!("lockedFile" in request), "Property should not exist");
     ok(request.lockedFile === undefined, "Property should not exist");
-    ok(!('onprogress' in request), "Property should not exist");
+    ok(!("onprogress" in request), "Property should not exist");
     ok(request.onprogress === undefined, "Property should not exist");
 
     finishTest();
   }
   </script>
   <script type="text/javascript" src="helpers.js"></script>
 
 </head>
--- a/dom/indexedDB/test/test_filehandle_overlapping.html
+++ b/dom/indexedDB/test/test_filehandle_overlapping.html
@@ -51,17 +51,17 @@
       request = mutableFile.open("readwrite").append("string3");
       request.onsuccess = function(event) {
         is(stepNumber, 3, "This callback came third");
         stepNumber++;
         event.target.fileHandle.oncomplete = grabEventAndContinueHandler;
       }
 
       stepNumber++;
-      yield undefined; yield undefined; yield undefined;;
+      yield undefined; yield undefined; yield undefined;
 
       is(stepNumber, 4, "All callbacks received");
     }
 
     finishTest();
   }
   </script>
   <script type="text/javascript" src="helpers.js"></script>
--- a/dom/indexedDB/test/test_filehandle_workers.html
+++ b/dom/indexedDB/test/test_filehandle_workers.html
@@ -42,17 +42,17 @@
     request.onsuccess = grabEventAndContinueHandler;
     event = yield undefined;
 
     let mutableFile = event.target.result;
 
     function dummyWorkerScript() {
       /* eslint-env worker */
       onmessage = function(event) {
-        throw("Shouldn't be called!");
+        throw ("Shouldn't be called!");
       }
     }
 
     let url =
       URL.createObjectURL(new Blob(["(", dummyWorkerScript.toSource(), ")()"]));
 
     let worker1 = new Worker(url);
     try {
--- a/dom/indexedDB/test/test_message_manager_ipc.html
+++ b/dom/indexedDB/test/test_message_manager_ipc.html
@@ -25,35 +25,35 @@ function childFrameScript() {
 
   const blobData = ["So", " ", "many", " ", "blobs!"];
   const blobText = blobData.join("");
   const blobType = "text/plain";
 
   Cu.importGlobalProperties(["indexedDB"]);
 
   function info(msg) {
-    sendAsyncMessage(mmName, { op: "info", msg: msg });
+    sendAsyncMessage(mmName, { op: "info", msg });
   }
 
   function ok(condition, name, diag) {
     sendAsyncMessage(mmName,
                      { 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(mmName, { op: "done", result: result });
+    sendAsyncMessage(mmName, { op: "done", result });
   }
 
   function grabAndContinue(arg) {
     testGenerator.next(arg);
   }
 
   function errorHandler(event) {
     ok(false,
--- a/dom/indexedDB/test/test_persistenceType.html
+++ b/dom/indexedDB/test/test_persistenceType.html
@@ -16,27 +16,27 @@
       const name = window.location.pathname;
       const version = 1;
       const storages = ["persistent", "temporary", "default"];
 
       const objectStoreName = "Foo";
       const data = { key: 1, value: "bar" };
 
       try {
-        indexedDB.open(name, { version: version, storage: "unknown" });
+        indexedDB.open(name, { version, storage: "unknown" });
         ok(false, "Should have thrown!");
       }
       catch (e) {
         ok(e instanceof TypeError, "Got TypeError.");
         is(e.name, "TypeError", "Good error name.");
       }
 
       for (let storage of storages) {
-        let request = indexedDB.open(name, { version: version,
-                                             storage: storage });
+        let request = indexedDB.open(name, { version,
+                                             storage });
 
         if (storage == "persistent" &&
             SpecialPowers.Services.appinfo.widgetToolkit == "android") {
           request.onerror = expectedErrorHandler("InvalidStateError");
           request.onupgradeneeded = unexpectedSuccessHandler;
           request.onsuccess = unexpectedSuccessHandler;
           let event = yield undefined;
 
--- a/dom/indexedDB/test/test_sandbox.html
+++ b/dom/indexedDB/test/test_sandbox.html
@@ -9,95 +9,95 @@
 <script type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
 // This runs inside a same-origin sandbox.
 // The intent being to show that the data store is the same.
 function storeValue() {
   function createDB_inner() {
-    var op = indexedDB.open('db');
+    var op = indexedDB.open("db");
     op.onupgradeneeded = e => {
       var db = e.target.result;
-      db.createObjectStore('store');
+      db.createObjectStore("store");
     };
     return new Promise(resolve => {
       op.onsuccess = e => resolve(e.target.result);
     });
   }
 
   function add(k, v) {
     return createDB_inner().then(db => {
-      var tx = db.transaction('store', 'readwrite');
-      var store = tx.objectStore('store');
+      var tx = db.transaction("store", "readwrite");
+      var store = tx.objectStore("store");
       var op = store.add(v, k);
       return new Promise((resolve, reject) => {
         op.onsuccess = e => resolve(e.target.result);
         op.onerror = _ => reject(op.error);
         tx.onabort = _ => reject(tx.error);
       });
     });
   }
 
-  return add('x', [ 10, {} ])
+  return add("x", [ 10, {} ])
     .then(_ => step_done(),
-          _ => ok(false, 'failed to store'));
+          _ => ok(false, "failed to store"));
 }
 
 function createDB_outer() {
-  var op = indexedDB.open('db');
+  var op = indexedDB.open("db");
   op.onupgradeneeded = e => {
-    ok(false, 'upgrade should not be needed');
+    ok(false, "upgrade should not be needed");
     var db = e.target.result;
-    db.createObjectStore('store');
+    db.createObjectStore("store");
   };
   return new Promise(resolve => {
     op.onsuccess = e => resolve(e.target.result);
   });
 }
 
 function get(k) {
   return createDB_outer().then(db => {
-      var tx = db.transaction('store', 'readonly');
-      var store = tx.objectStore('store');
+      var tx = db.transaction("store", "readonly");
+      var store = tx.objectStore("store");
       var op = store.get(k);
       return new Promise((resolve, reject) => {
         op.onsuccess = e => resolve(e.target.result);
         op.onerror = _ => reject(op.error);
         tx.onabort = _ => reject(tx.error);
       });
   });
 }
 
 function runInSandbox(sandbox, testFunc) {
-  is(typeof testFunc, 'function');
+  is(typeof testFunc, "function");
   var resolvePromise;
   // Step-done is defined in the sandbox and used in the add() function above.
   /* global step_done */
   var testPromise = new Promise(r => resolvePromise = r);
   SpecialPowers.Cu.exportFunction(_ => resolvePromise(), sandbox,
-                                  { defineAs: 'step_done' });
-  SpecialPowers.Cu.evalInSandbox('(' + testFunc.toSource() + ')()' +
-                                 '.then(step_done);', sandbox);
+                                  { defineAs: "step_done" });
+  SpecialPowers.Cu.evalInSandbox("(" + testFunc.toSource() + ")()" +
+                                 ".then(step_done);", sandbox);
   return testPromise;
 }
 
 // Use the window principal for the sandbox; location.origin is not sufficient.
 var sb = new SpecialPowers.Cu.Sandbox(window,
-                                      { wantGlobalProperties: ['indexedDB'] });
+                                      { wantGlobalProperties: ["indexedDB"] });
 
 sb.ok = SpecialPowers.Cu.exportFunction(ok, sb);
 
 Promise.resolve()
   .then(_ => runInSandbox(sb, storeValue))
-  .then(_ => get('x'))
+  .then(_ => get("x"))
   .then(x => {
-    ok(x, 'a value should be present');
+    ok(x, "a value should be present");
     is(x.length, 2);
     is(x[0], 10);
-    is(typeof x[1], 'object');
+    is(typeof x[1], "object");
     is(Object.keys(x[1]).length, 0);
   })
   .then(_ => SimpleTest.finish());
 
 </script>
 </body>
 </html>
--- a/dom/indexedDB/test/test_third_party.html
+++ b/dom/indexedDB/test/test_third_party.html
@@ -57,17 +57,17 @@
     function setiframe() {
       let iframe = document.getElementById("iframe1");
 
       if (!testRunning) {
         testRunning = true;
         iframe.addEventListener("load", iframeLoaded);
       }
       SpecialPowers.pushPrefEnv({
-        'set': [["network.cookie.cookieBehavior", testData[testIndex].cookieBehavior]]
+        "set": [["network.cookie.cookieBehavior", testData[testIndex].cookieBehavior]]
       }, () => {
         iframe.src = testData[testIndex].host + iframe1Path;
       });
       // SpecialPowers.setIntPref("network.cookie.cookieBehavior", testData[testIndex].cookieBehavior);
     }
 
     function messageListener(event) {
       // eslint-disable-next-line no-eval