Bug 1508819 - Enable ESLint for dom/bindings (automatic changes) r=nika
authorRuihui Yan <ruihuiyan@icloud.com>
Thu, 28 Mar 2019 09:11:04 +0000
changeset 528718 47b7423393a801c96bd315f98f2bed6ea44865e9
parent 528691 bd03a5a96bde1398d881c364c96cc06ec7d30de7
child 528719 f65788b4d22903b7dd502021fe781715626e2599
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1508819
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 1508819 - Enable ESLint for dom/bindings (automatic changes) r=nika Differential Revision: https://phabricator.services.mozilla.com/D13891
dom/bindings/test/TestInterfaceJS.js
dom/bindings/test/TestInterfaceJSMaplike.js
dom/bindings/test/file_InstanceOf.html
dom/bindings/test/file_dom_xrays.html
dom/bindings/test/file_proxies_via_xray.html
dom/bindings/test/test_ByteString.html
dom/bindings/test/test_InstanceOf.html
dom/bindings/test/test_Object.prototype_props.html
dom/bindings/test/test_async_stacks.html
dom/bindings/test/test_barewordGetsWindow.html
dom/bindings/test/test_bug1036214.html
dom/bindings/test/test_bug1123516_maplikesetlike.html
dom/bindings/test/test_bug1287912.html
dom/bindings/test/test_bug742191.html
dom/bindings/test/test_bug773326.html
dom/bindings/test/test_bug775543.html
dom/bindings/test/test_bug788369.html
dom/bindings/test/test_bug852846.html
dom/bindings/test/test_bug862092.html
dom/bindings/test/test_callback_exceptions.html
dom/bindings/test/test_crossOriginWindowSymbolAccess.html
dom/bindings/test/test_document_location_set_via_xray.html
dom/bindings/test/test_document_location_via_xray_cached.html
dom/bindings/test/test_dom_xrays.html
dom/bindings/test/test_enums.html
dom/bindings/test/test_exceptionSanitization.html
dom/bindings/test/test_exceptionThrowing.html
dom/bindings/test/test_exception_messages.html
dom/bindings/test/test_exception_options_from_jsimplemented.html
dom/bindings/test/test_forOf.html
dom/bindings/test/test_integers.html
dom/bindings/test/test_interfaceToString.html
dom/bindings/test/test_iterable.html
dom/bindings/test/test_jsimplemented_cross_realm_this.html
dom/bindings/test/test_jsimplemented_eventhandler.html
dom/bindings/test/test_lookupGetter.html
dom/bindings/test/test_namedNoIndexed.html
dom/bindings/test/test_named_getter_enumerability.html
dom/bindings/test/test_primitive_this.html
dom/bindings/test/test_promise_rejections_from_jsimplemented.html
dom/bindings/test/test_proxies_via_xray.html
dom/bindings/test/test_proxy_expandos.html
dom/bindings/test/test_returnUnion.html
dom/bindings/test/test_sequence_detection.html
dom/bindings/test/test_sequence_wrapping.html
dom/bindings/test/test_stringBindings.html
dom/bindings/test/test_throwing_method_noDCE.html
dom/bindings/test/test_toJSON.html
dom/bindings/test/test_treat_non_object_as_null.html
dom/bindings/test/test_usvstring.html
dom/bindings/test/test_worker_UnwrapArg.html
--- a/dom/bindings/test/TestInterfaceJS.js
+++ b/dom/bindings/test/TestInterfaceJS.js
@@ -10,159 +10,159 @@ const {Services} = ChromeUtils.import("r
 
 function TestInterfaceJS(anyArg, objectArg) {}
 
 TestInterfaceJS.prototype = {
   classID: Components.ID("{2ac4e026-cf25-47d5-b067-78d553c3cad8}"),
   contractID: "@mozilla.org/dom/test-interface-js;1",
   QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer, Ci.mozITestInterfaceJS]),
 
-  init: function(win) { this._win = win; },
+  init(win) { this._win = win; },
 
-  __init: function (anyArg, objectArg, dictionaryArg) {
+  __init(anyArg, objectArg, dictionaryArg) {
     this._anyAttr = undefined;
     this._objectAttr = null;
     this._anyArg = anyArg;
     this._objectArg = objectArg;
     this._dictionaryArg = dictionaryArg;
   },
 
   get anyArg() { return this._anyArg; },
   get objectArg() { return this._objectArg; },
-  getDictionaryArg: function() { return this._dictionaryArg; },
+  getDictionaryArg() { return this._dictionaryArg; },
   get anyAttr() { return this._anyAttr; },
   set anyAttr(val) { this._anyAttr = val; },
   get objectAttr() { return this._objectAttr; },
   set objectAttr(val) { this._objectAttr = val; },
-  getDictionaryAttr: function() { return this._dictionaryAttr; },
-  setDictionaryAttr: function(val) { this._dictionaryAttr = val; },
-  pingPongAny: function(any) { return any; },
-  pingPongObject: function(obj) { return obj; },
-  pingPongObjectOrString: function(objectOrString) { return objectOrString; },
-  pingPongDictionary: function(dict) { return dict; },
-  pingPongDictionaryOrLong: function(dictOrLong) { return dictOrLong.anyMember || dictOrLong; },
-  pingPongRecord: function(rec) { return JSON.stringify(rec); },
-  objectSequenceLength: function(seq) { return seq.length; },
-  anySequenceLength: function(seq) { return seq.length; },
+  getDictionaryAttr() { return this._dictionaryAttr; },
+  setDictionaryAttr(val) { this._dictionaryAttr = val; },
+  pingPongAny(any) { return any; },
+  pingPongObject(obj) { return obj; },
+  pingPongObjectOrString(objectOrString) { return objectOrString; },
+  pingPongDictionary(dict) { return dict; },
+  pingPongDictionaryOrLong(dictOrLong) { return dictOrLong.anyMember || dictOrLong; },
+  pingPongRecord(rec) { return JSON.stringify(rec); },
+  objectSequenceLength(seq) { return seq.length; },
+  anySequenceLength(seq) { return seq.length; },
 
 
-  getCallerPrincipal: function() { return Cu.getWebIDLCallerPrincipal().origin; },
+  getCallerPrincipal() { return Cu.getWebIDLCallerPrincipal().origin; },
 
-  convertSVS: function(svs) { return svs; },
+  convertSVS(svs) { return svs; },
 
-  pingPongUnion: function(x) { return x; },
-  pingPongUnionContainingNull: function(x) { return x; },
-  pingPongNullableUnion: function(x) { return x; },
-  returnBadUnion: function(x) { return 3; },
+  pingPongUnion(x) { return x; },
+  pingPongUnionContainingNull(x) { return x; },
+  pingPongNullableUnion(x) { return x; },
+  returnBadUnion(x) { return 3; },
 
-  testSequenceOverload: function(arg) {},
-  testSequenceUnion: function(arg) {},
+  testSequenceOverload(arg) {},
+  testSequenceUnion(arg) {},
 
-  testThrowError: function() {
+  testThrowError() {
     throw new this._win.Error("We are an Error");
   },
 
-  testThrowDOMException: function() {
+  testThrowDOMException() {
     throw new this._win.DOMException("We are a DOMException",
                                      "NotSupportedError");
   },
 
-  testThrowTypeError: function() {
+  testThrowTypeError() {
     throw new this._win.TypeError("We are a TypeError");
   },
 
-  testThrowNsresult: function() {
+  testThrowNsresult() {
       throw Cr.NS_BINDING_ABORTED;
   },
 
-  testThrowNsresultFromNative: function(x) {
+  testThrowNsresultFromNative(x) {
     // We want to throw an exception that we generate from an nsresult thrown
     // by a C++ component.
     Services.netUtils.notImplemented();
   },
 
-  testThrowCallbackError: function(callback) {
+  testThrowCallbackError(callback) {
     callback();
   },
 
-  testThrowXraySelfHosted: function() {
+  testThrowXraySelfHosted() {
     this._win.Array.indexOf();
   },
 
-  testThrowSelfHosted: function() {
+  testThrowSelfHosted() {
     Array.indexOf();
   },
 
-  testPromiseWithThrowingChromePromiseInit: function() {
+  testPromiseWithThrowingChromePromiseInit() {
     return new this._win.Promise(function() {
       noSuchMethodExistsYo1();
-    })
+    });
   },
 
-  testPromiseWithThrowingContentPromiseInit: function(func) {
+  testPromiseWithThrowingContentPromiseInit(func) {
       return new this._win.Promise(func);
   },
 
-  testPromiseWithDOMExceptionThrowingPromiseInit: function() {
+  testPromiseWithDOMExceptionThrowingPromiseInit() {
     return new this._win.Promise(() => {
       throw new this._win.DOMException("We are a second DOMException",
                                        "NotFoundError");
-    })
+    });
   },
 
-  testPromiseWithThrowingChromeThenFunction: function() {
+  testPromiseWithThrowingChromeThenFunction() {
     return this._win.Promise.resolve(5).then(function() {
       noSuchMethodExistsYo2();
     });
   },
 
-  testPromiseWithThrowingContentThenFunction: function(func) {
+  testPromiseWithThrowingContentThenFunction(func) {
     return this._win.Promise.resolve(10).then(func);
   },
 
-  testPromiseWithDOMExceptionThrowingThenFunction: function() {
+  testPromiseWithDOMExceptionThrowingThenFunction() {
     return this._win.Promise.resolve(5).then(() => {
       throw new this._win.DOMException("We are a third DOMException",
                                        "NetworkError");
     });
   },
 
-  testPromiseWithThrowingChromeThenable: function() {
+  testPromiseWithThrowingChromeThenable() {
     var thenable =  {
-      then: function() {
-        noSuchMethodExistsYo3()
-      }
+      then() {
+        noSuchMethodExistsYo3();
+      },
     };
     return new this._win.Promise(function(resolve) {
-      resolve(thenable)
+      resolve(thenable);
     });
   },
 
-  testPromiseWithThrowingContentThenable: function(thenable) {
+  testPromiseWithThrowingContentThenable(thenable) {
     // Waive Xrays on the thenable, because we're calling resolve() in the
     // chrome compartment, so that's the compartment the "then" property get
     // will happen in, and if we leave the Xray in place the function-valued
     // property won't return the function.
     return this._win.Promise.resolve(Cu.waiveXrays(thenable));
   },
 
-  testPromiseWithDOMExceptionThrowingThenable: function() {
+  testPromiseWithDOMExceptionThrowingThenable() {
     var thenable =  {
       then: () => {
         throw new this._win.DOMException("We are a fourth DOMException",
                                          "TypeMismatchError");
-      }
+      },
     };
     return new this._win.Promise(function(resolve) {
-      resolve(thenable)
+      resolve(thenable);
     });
   },
 
   get onsomething() {
     return this.__DOM_IMPL__.getEventHandler("onsomething");
   },
 
   set onsomething(val) {
     this.__DOM_IMPL__.setEventHandler("onsomething", val);
-  }
+  },
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestInterfaceJS])
+this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestInterfaceJS]);
--- a/dom/bindings/test/TestInterfaceJSMaplike.js
+++ b/dom/bindings/test/TestInterfaceJSMaplike.js
@@ -9,30 +9,30 @@ const {XPCOMUtils} = ChromeUtils.import(
 
 function TestInterfaceJSMaplike() {}
 
 TestInterfaceJSMaplike.prototype = {
   classID: Components.ID("{4bc6f6f3-e005-4f0a-b42d-4d1663a9013a}"),
   contractID: "@mozilla.org/dom/test-interface-js-maplike;1",
   QueryInterface: ChromeUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer]),
 
-  init: function(win) { this._win = win; },
+  init(win) { this._win = win; },
 
-  __init: function () {},
+  __init() {},
 
-  setInternal: function(aKey, aValue) {
+  setInternal(aKey, aValue) {
     return this.__DOM_IMPL__.__set(aKey, aValue);
   },
 
-  deleteInternal: function(aKey) {
+  deleteInternal(aKey) {
     return this.__DOM_IMPL__.__delete(aKey);
   },
 
-  clearInternal: function() {
+  clearInternal() {
     return this.__DOM_IMPL__.__clear();
   },
 
-  __onget: function(key, value) {
+  __onget(key, value) {
     /* no-op */
   },
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestInterfaceJSMaplike])
+this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TestInterfaceJSMaplike]);
--- a/dom/bindings/test/file_InstanceOf.html
+++ b/dom/bindings/test/file_InstanceOf.html
@@ -1,12 +1,11 @@
 <!DOCTYPE HTML>
 <html>
 <body>
 <script type="application/javascript">
-function runTest()
-{
+function runTest() {
   return [ parent.HTMLElement.prototype instanceof Element,
            parent.HTMLElement.prototype instanceof parent.Element ];
 }
 </script>
 </body>
 </html>
--- a/dom/bindings/test/file_dom_xrays.html
+++ b/dom/bindings/test/file_dom_xrays.html
@@ -4,17 +4,17 @@
     window.expando = 42;
     window.shadowedIframe = 42;
     Object.setPrototypeOf(window, Object.create(Window.prototype,
       {
         shadowedIframe: { value: 42 },
         iframe: { value: 42 },
         document: { value: 42 },
         addEventListener: { value: 42 },
-        toString: { value: 42 }
+        toString: { value: 42 },
       }));
     window.documentElement.expando = 42;
     Object.defineProperty(window.documentElement, "version", { value: 42 });
   </script>
   <iframe name="shadowedIframe" id="shadowedIframe"></iframe>
   <iframe name="iframe" id="iframe"></iframe>
   <iframe name="document" id="document"></iframe>
   <iframe name="self" id="self"></iframe>
--- a/dom/bindings/test/file_proxies_via_xray.html
+++ b/dom/bindings/test/file_proxies_via_xray.html
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
   <script>
-    document.x = 5
+    document.x = 5;
   </script>
   <img id="y" name="y"></div>
   <img id="z" name="z"></div>
 </html>
--- a/dom/bindings/test/test_ByteString.html
+++ b/dom/bindings/test/test_ByteString.html
@@ -15,18 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 
   /** Test for Bug 796850 **/
   var xhr = new XMLHttpRequest();
   caught = false;
   try {
     xhr.open("\u5427", "about:mozilla", true);
-  }
-  catch (TypeError) {
+  } catch (TypeError) {
     caught = true;
   }
   ok(caught, "Character values > 255 not rejected for ByteString");
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/bindings/test/test_InstanceOf.html
+++ b/dom/bindings/test/test_InstanceOf.html
@@ -16,21 +16,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 748983 **/
 
 SimpleTest.waitForExplicitFinish();
 
-function runTest()
-{
-    ok(document instanceof EventTarget, "document is an event target")
+function runTest() {
+    ok(document instanceof EventTarget, "document is an event target");
     ok(new XMLHttpRequest() instanceof XMLHttpRequest, "instanceof should work on XHR");
-    ok(HTMLElement.prototype instanceof Node, "instanceof needs to walk the prototype chain")
+    ok(HTMLElement.prototype instanceof Node, "instanceof needs to walk the prototype chain");
 
     var otherWin = document.getElementById("testFrame").contentWindow;
 
     ok(otherWin.HTMLElement.prototype instanceof otherWin.Node, "Same-origin instanceof of a interface prototype object should work, even if called cross-origin");
     ok(!(otherWin.HTMLElement.prototype instanceof Node), "Cross-origin instanceof of a interface prototype object shouldn't work");
 
     // We need to reset HTMLElement.prototype.__proto__ to the original value
     // before using anything from the harness, otherwise the harness code breaks
--- a/dom/bindings/test/test_Object.prototype_props.html
+++ b/dom/bindings/test/test_Object.prototype_props.html
@@ -8,13 +8,13 @@
 test(function() {
   var props = Object.getOwnPropertyNames(Object.prototype);
   // If you change this list, make sure it continues to match the list in
   // Codegen.py's CGDictionary.getMemberDefinition method.
   var expected = [
       "constructor", "toSource", "toString", "toLocaleString", "valueOf",
       "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable",
       "__defineGetter__", "__defineSetter__", "__lookupGetter__",
-      "__lookupSetter__", "__proto__"
+      "__lookupSetter__", "__proto__",
     ];
   assert_array_equals(props.sort(), expected.sort());
 }, "Own properties of Object.prototype");
 </script>
--- a/dom/bindings/test/test_async_stacks.html
+++ b/dom/bindings/test/test_async_stacks.html
@@ -86,17 +86,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   function runTests() {
     TESTS = [postMessageTest, intervalTest, rafTest, xhrTest, eventTest];
     nextTest();
   }
 
   addLoadEvent(function() {
     SpecialPowers.pushPrefEnv(
-      {"set": [['javascript.options.asyncstack', true]]},
+      {"set": [["javascript.options.asyncstack", true]]},
       runTests);
   });
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1148593">Mozilla Bug 1148593</a>
 <p id="display"></p>
 <div id="content" style="display: none">
--- a/dom/bindings/test/test_barewordGetsWindow.html
+++ b/dom/bindings/test/test_barewordGetsWindow.html
@@ -16,37 +16,37 @@ https://bugzilla.mozilla.org/show_bug.cg
     var desc = Object.getOwnPropertyDescriptor(frames[0], "document");
     if (!desc || !desc.get) {
       todo(false, "This test does nothing so far, but will once Window is on WebIDL bindings");
       SimpleTest.finish();
       return;
     }
     get = desc.get;
     ok(get, "Couldn't find document getter");
-    Object.defineProperty(frames[0], "foo", { get: get, configurable: true });
+    Object.defineProperty(frames[0], "foo", { get, configurable: true });
 
     var barewordFunc = frames[0].eval("(function (count) { var doc; for (var i = 0; i < count; ++i) doc = foo; return doc.documentElement; })");
     var qualifiedFunc = frames[0].eval("(function (count) { var doc; for (var i = 0; i < count; ++i) doc = window.document; return doc.documentElement; })");
-    document.querySelector("iframe").onload = function () {
+    document.querySelector("iframe").onload = function() {
       // interp
       is(barewordFunc(1).innerText, "OLD", "Bareword should see own inner 1");
       is(qualifiedFunc(1).innerText, "NEW",
          "Qualified should see current inner 1");
       // baseline
       is(barewordFunc(100).innerText, "OLD", "Bareword should see own inner 2");
       is(qualifiedFunc(100).innerText, "NEW",
          "Qualified should see current inner 2");
       // ion
       is(barewordFunc(10000).innerText, "OLD", "Bareword should see own inner 3");
       is(qualifiedFunc(10000).innerText, "NEW",
          "Qualified should see current inner 2");
       SimpleTest.finish();
-    }
+    };
     frames[0].location = "file_barewordGetsWindow_frame2.html";
-  }
+  };
 
 
 
 
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=936056">Mozilla Bug 936056</a>
--- a/dom/bindings/test/test_bug1036214.html
+++ b/dom/bindings/test/test_bug1036214.html
@@ -14,31 +14,30 @@ https://bugzilla.mozilla.org/show_bug.cg
   SimpleTest.waitForExplicitFinish();
   var xoObjects = [];
   function setup() {
     xoObjects.push(window[0]);
     xoObjects.push(window[0].location);
     xoObjects.push(SpecialPowers.unwrap(SpecialPowers.wrap(window[0]).document));
     xoObjects.push(SpecialPowers);
     xoObjects.push(SpecialPowers.wrap);
-    SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, go);
+    SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, go);
   }
 
   function checkThrows(f, msg) {
     try {
       f();
       ok(false, "Should have thrown: " + msg);
     } catch (e) {
       ok(true, "Threw correctly: " + msg);
       ok(/denied|insecure/.test(e), "Threw security exception: " + e);
     }
   }
 
   function go() {
-
     //
     // Test the basics of the test interface.
     //
 
     var any = { a: 11 };
     var obj = { b: 22, c: "str" };
     var obj2 = { foo: "baz" };
     var myDict = { anyMember: 42, objectMember: { answer: 42 }, objectOrStringMember: { answer: "anobject" },
@@ -46,57 +45,57 @@ https://bugzilla.mozilla.org/show_bug.cg
                    objectRecordMember: { key: { answer: "fortytwo" } },
                    innerDictionary: { innerObject: { answer: "rabbithole" } } };
     var t = new TestInterfaceJS(any, obj, myDict);
     is(Object.getPrototypeOf(t), TestInterfaceJS.prototype, "Prototype setup works correctly");
     is(t.anyArg, any, "anyArg is correct");
     is(t.objectArg, obj, "objectArg is correct");
     is(t.getDictionaryArg().anyMember, 42, "dictionaryArg looks correct");
     is(t.getDictionaryArg().objectMember.answer, 42, "dictionaryArg looks correct");
-    is(t.getDictionaryArg().objectRecordMember["key"].answer, "fortytwo", "dictionaryArg looks correct");
+    is(t.getDictionaryArg().objectRecordMember.key.answer, "fortytwo", "dictionaryArg looks correct");
     is(t.getDictionaryArg().objectRecordMember.key.answer, "fortytwo", "dictionaryArg looks correct");
     t.anyAttr = 2;
     is(t.anyAttr, 2, "ping-pong any attribute works");
     t.objAttr = obj2;
     is(t.objAttr, obj2, "ping-pong object attribute works");
     t.setDictionaryAttr(myDict);
     is(t.getDictionaryAttr().anyMember, 42, "ping-pong dictionary works");
     is(t.getDictionaryAttr().objectMember.answer, 42, "ping-pong dictionary works");
-    is(t.getDictionaryAttr().objectRecordMember["key"].answer, "fortytwo", "ping-pong dictionary works");
+    is(t.getDictionaryAttr().objectRecordMember.key.answer, "fortytwo", "ping-pong dictionary works");
     is(t.getDictionaryAttr().objectRecordMember.key.answer, "fortytwo", "ping-pong dictionary works");
 
     is(any, t.pingPongAny(any), "ping-pong works with any");
     is(obj, t.pingPongObject(obj), "ping-pong works with obj");
     is(obj, t.pingPongObjectOrString(obj), "ping-pong works with obj or string");
     is("foo", t.pingPongObjectOrString("foo"), "ping-pong works with obj or string");
     is(t.pingPongDictionary(myDict).anyMember, 42, "ping pong works with dict");
     is(t.pingPongDictionary(myDict).objectMember.answer, 42, "ping pong works with dict");
     is(t.pingPongDictionary(myDict).objectOrStringMember.answer, "anobject", "ping pong works with dict");
     is(t.pingPongDictionary(myDict).anySequenceMember[2], "thirdinsequence", "ping pong works with dict");
-    is(t.pingPongDictionary(myDict).objectRecordMember["key"].answer, "fortytwo", "ping pong works with dict");
+    is(t.pingPongDictionary(myDict).objectRecordMember.key.answer, "fortytwo", "ping pong works with dict");
     is(t.pingPongDictionary(myDict).objectRecordMember.key.answer, "fortytwo", "ping pong works with dict");
     is(t.pingPongDictionary(myDict).innerDictionary.innerObject.answer, "rabbithole", "ping pong works with layered dicts");
     is(t.pingPongDictionaryOrLong({anyMember: 42}), 42, "ping pong (dict or long) works with dict");
     is(t.pingPongDictionaryOrLong(42), 42, "ping pong (dict or long) works with long");
     ok(/canary/.test(t.pingPongRecord({ someVal: 42, someOtherVal: "canary" })), "ping pong works with record");
     is(t.objectSequenceLength([{}, {}, {}]), 3, "ping pong works with object sequence");
-    is(t.anySequenceLength([42, 'string', {}, undefined]), 4, "ping pong works with any sequence");
+    is(t.anySequenceLength([42, "string", {}, undefined]), 4, "ping pong works with any sequence");
 
     //
     // Test that we throw in the cross-origin cases.
     //
 
     xoObjects.forEach(function(xoObj) {
       var blank = new TestInterfaceJS();
       checkThrows(() => new TestInterfaceJS(xoObj, undefined), "any param for constructor");
       checkThrows(() => new TestInterfaceJS(undefined, xoObj), "obj param for constructor");
       checkThrows(() => new TestInterfaceJS(undefined, undefined, { anyMember: xoObj }), "any dict param for constructor");
       checkThrows(() => new TestInterfaceJS(undefined, undefined, { objectMember: xoObj }), "object dict param for constructor");
       checkThrows(() => new TestInterfaceJS(undefined, undefined, { objectOrStringMember: xoObj }), "union dict param for constructor");
-      checkThrows(() => new TestInterfaceJS(undefined, undefined, { anySequenceMember: [0, xoObj, 'hi' ] }), "sequence dict param for constructor");
+      checkThrows(() => new TestInterfaceJS(undefined, undefined, { anySequenceMember: [0, xoObj, "hi" ] }), "sequence dict param for constructor");
       checkThrows(() => new TestInterfaceJS(undefined, undefined, { innerDictionary: { innerObject: xoObj } }), "inner dict param for constructor");
       checkThrows(() => t.anyAttr = xoObj, "anyAttr");
       checkThrows(() => t.objectAttr = xoObj, "objAttr");
       checkThrows(() => t.setDictionaryAttr({ anyMember: xoObj }), "dictionaryAttr any");
       checkThrows(() => t.setDictionaryAttr({ objectMember: xoObj }), "dictionaryAttr object");
       checkThrows(() => t.pingPongAny(xoObj), "pingpong any");
       checkThrows(() => t.pingPongObject(xoObj), "pingpong obj");
       checkThrows(() => t.pingPongObjectOrString(xoObj), "pingpong union");
@@ -104,17 +103,17 @@ https://bugzilla.mozilla.org/show_bug.cg
       checkThrows(() => t.pingPongDictionary({ objectMember: xoObj }), "dictionary pingpong object");
       checkThrows(() => t.pingPongDictionary({ anyMember: xoObj, objectMember: xoObj }), "dictionary pingpong both");
       checkThrows(() => t.pingPongDictionary({ objectOrStringMember: xoObj }), "dictionary pingpong objectorstring");
       checkThrows(() => t.pingPongDictionary({ objectRecordMember: { key: xoObj } }), "dictionary pingpong record of object");
       checkThrows(() => t.pingPongDictionaryOrLong({ objectMember: xoObj }), "unionable dictionary");
       checkThrows(() => t.pingPongDictionaryOrLong({ anyMember: xoObj }), "unionable dictionary");
       checkThrows(() => t.pingPongRecord({ someMember: 42, someOtherMember: {}, crossOriginMember: xoObj }), "record");
       checkThrows(() => t.objectSequenceLength([{}, {}, xoObj, {}]), "object sequence");
-      checkThrows(() => t.anySequenceLength([42, 'someString', xoObj, {}]), "any sequence");
+      checkThrows(() => t.anySequenceLength([42, "someString", xoObj, {}]), "any sequence");
     });
 
 
     SimpleTest.finish();
   }
 
   </script>
 </head>
--- a/dom/bindings/test/test_bug1123516_maplikesetlike.html
+++ b/dom/bindings/test/test_bug1123516_maplikesetlike.html
@@ -5,30 +5,29 @@
     <head>
         <title>Test Maplike Interface</title>
         <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
         <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     </head>
     <body>
         <script class="testbody" type="application/javascript">
          SimpleTest.waitForExplicitFinish();
-         SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, function() {
-
+         SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, function() {
              base_properties = [["has", "function", 1],
                                 ["entries", "function", 0],
                                 ["keys", "function", 0],
                                 ["values", "function", 0],
                                 ["forEach", "function", 1],
                                 ["size", "number"]];
              maplike_properties = base_properties.concat([["set", "function", 2]]);
              setlike_properties = base_properties;
              rw_properties = [["clear", "function", 0],
                               ["delete", "function", 1]];
              setlike_rw_properties = base_properties.concat(rw_properties).concat([["add", "function", 1]]);
-             maplike_rw_properties = maplike_properties.concat(rw_properties).concat([["get", "function",1]]);
+             maplike_rw_properties = maplike_properties.concat(rw_properties).concat([["get", "function", 1]]);
              var testExistence = function testExistence(prefix, obj, properties) {
                  for (var [name, type, args] of properties) {
                      // Properties are somewhere up the proto chain, hasOwnProperty won't work
                      isnot(obj[name], undefined,
                         `${prefix} object has property ${name}`);
 
                      is(typeof obj[name], type,
                         `${prefix} object property ${name} is a ${type}`);
@@ -47,17 +46,17 @@
                          if (propDesc) {
                              ok(!propDesc.enumerable,
                                 `${prefix} object property ${name} is not enumerable`);
                              break;
                          }
                          owner = Object.getPrototypeOf(owner);
                      }
                  }
-             }
+             };
 
              var m;
              var testSet;
              var testIndex;
              // Simple map creation and functionality test
              info("SimpleMap: Testing simple map creation and functionality");
              m = new TestInterfaceMaplike();
              ok(m, "SimpleMap: got a TestInterfaceMaplike object");
@@ -176,19 +175,19 @@
              is(m.size, 0, "MapConvenience: size should be 0 after clearInternal");
 
              // Map convenience function test using objects and readonly
 
              info("Testing Map convenience function test using objects and readonly");
              m = new TestInterfaceMaplikeObject();
              ok(m, "ReadOnlyMapConvenience: got a TestInterfaceMaplikeObject object");
              is(m.size, 0, "ReadOnlyMapConvenience: size should be zero");
-             is(m["set"], undefined, "ReadOnlyMapConvenience: readonly map, should be no set function");
-             is(m["clear"], undefined, "ReadOnlyMapConvenience: readonly map, should be no clear function");
-             is(m["delete"], undefined, "ReadOnlyMapConvenience: readonly map, should be no delete function");
+             is(m.set, undefined, "ReadOnlyMapConvenience: readonly map, should be no set function");
+             is(m.clear, undefined, "ReadOnlyMapConvenience: readonly map, should be no clear function");
+             is(m.delete, undefined, "ReadOnlyMapConvenience: readonly map, should be no delete function");
              ok(!m.hasInternal("test"), "ReadOnlyMapConvenience: maplike hasInternal should return false");
              m.setInternal("test");
              is(m.size, 1, "size should be 1");
              ok(m.hasInternal("test"), "ReadOnlyMapConvenience: maplike hasInternal should return true");
              m2 = m.setInternal("test2");
              is(m.size, 2, "size should be 2");
              ok(m.hasInternal("test2"), "ReadOnlyMapConvenience: maplike hasInternal should return true");
              is(m.deleteInternal("test2"), true, "ReadOnlyMapConvenience: maplike deleteInternal should return true");
--- a/dom/bindings/test/test_bug1287912.html
+++ b/dom/bindings/test/test_bug1287912.html
@@ -12,23 +12,22 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1287912">Mozilla Bug 1287912</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 <iframe id="t" src="http://example.org/tests/dom/bindings/test/"></iframe>
 </div>
 <pre id="test">
 <script type="application/javascript">
-function test()
-{
+function test() {
   var win = document.getElementById("t").contentWindow;
   is(Object.getPrototypeOf(win.Image), win.Function.prototype, "The __proto__ of a named constructor is Function.prototype");
   is(win.Image.prototype, win.HTMLImageElement.prototype, "The prototype property of a named constructor is the interface prototype object");
-  is(win.HTMLImageElement['foo'], undefined, "Should not have a property named foo on the HTMLImageElement interface object");
-  is(win.Image['foo'], undefined, "Should not have a property named foo on the Image named constructor");
+  is(win.HTMLImageElement.foo, undefined, "Should not have a property named foo on the HTMLImageElement interface object");
+  is(win.Image.foo, undefined, "Should not have a property named foo on the Image named constructor");
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(test);
 
 </script>
--- a/dom/bindings/test/test_bug742191.html
+++ b/dom/bindings/test/test_bug742191.html
@@ -16,17 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script type="application/javascript">
 
 /** Test for Bug 742191 **/
 function doTest() {
   var gotTypeError = false;
   var ctx = document.createElement("canvas").getContext("2d");
   try {
     ctx.drawImage({}, 0, 0);
-  } catch(e) {
+  } catch (e) {
     if (e instanceof TypeError) {
       gotTypeError = true;
     }
   }
 
   ok(gotTypeError, "passing an invalid argument should cause a type error!");
 }
 doTest();
--- a/dom/bindings/test/test_bug773326.html
+++ b/dom/bindings/test/test_bug773326.html
@@ -2,10 +2,10 @@
 <meta charset=utf-8>
 <title>Test for Bug 773326</title>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <div id=log></div>
 <script>
 test(function() {
   new Worker("data:text/javascript,new XMLHttpRequest(42)");
-}, "Should not crash")
+}, "Should not crash");
 </script>
--- a/dom/bindings/test/test_bug775543.html
+++ b/dom/bindings/test/test_bug775543.html
@@ -15,18 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
 <iframe id="t" src="http://example.org/tests/dom/bindings/test/file_bug775543.html" onload="test();"></iframe>  
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 775543 **/
 
-function test()
-{
+function test() {
   var a = XPCNativeWrapper(document.getElementById("t").contentWindow.wrappedJSObject.worker);
   isnot(XPCNativeWrapper.unwrap(a), a, "XPCNativeWrapper(Worker) should be an Xray wrapper");
   a.toString();
   ok(true, "Shouldn't crash when calling a method on an Xray wrapper around a worker");
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
--- a/dom/bindings/test/test_bug788369.html
+++ b/dom/bindings/test/test_bug788369.html
@@ -14,17 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 788369 **/
 try {
-  var xhr = new(window.ActiveXObject || XMLHttpRequest)("Microsoft.XMLHTTP");
+  var xhr = new (window.ActiveXObject || XMLHttpRequest)("Microsoft.XMLHTTP");
   ok(xhr instanceof XMLHttpRequest, "Should have an XHR object");
 } catch (e) {
   ok(false, "Should not throw exception when constructing: " + e);
 }
 </script>
 </pre>
 </body>
 </html>
--- a/dom/bindings/test/test_bug852846.html
+++ b/dom/bindings/test/test_bug852846.html
@@ -7,24 +7,24 @@ https://bugzilla.mozilla.org/show_bug.cg
   <meta charset="utf-8">
   <title>Test for Bug 852846</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 852846 **/
   var elem = document.createElement("div");
-  is(elem.style.color, "", "Shouldn't have color set on HTML element")
+  is(elem.style.color, "", "Shouldn't have color set on HTML element");
   elem.style = "color: green";
-  is(elem.style.color, "green", "Should have color set on HTML element")
+  is(elem.style.color, "green", "Should have color set on HTML element");
 
   elem = document.createElementNS("http://www.w3.org/2000/svg", "svg");
-  is(elem.style.color, "", "Shouldn't have color set on SVG element")
+  is(elem.style.color, "", "Shouldn't have color set on SVG element");
   elem.style = "color: green";
-  is(elem.style.color, "green", "Should have color set on SVG element")
+  is(elem.style.color, "green", "Should have color set on SVG element");
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=852846">Mozilla Bug 852846</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 
 </div>
--- a/dom/bindings/test/test_bug862092.html
+++ b/dom/bindings/test/test_bug862092.html
@@ -8,22 +8,21 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 862092</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 862092 **/
 
   SimpleTest.waitForExplicitFinish();
-  function runTest()
-  {
+  function runTest() {
     var frameDoc = document.getElementById("f").contentDocument;
     var a = document.createElement("select");
     a.expando = "test";
-    a = frameDoc.adoptNode(a)
+    a = frameDoc.adoptNode(a);
     is(a.expando, "test", "adoptNode needs to preserve expandos");
     SimpleTest.finish();
   }
 
   </script>
 </head>
 <body onload="runTest();">
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=862092">Mozilla Bug 862092</a>
--- a/dom/bindings/test/test_callback_exceptions.html
+++ b/dom/bindings/test/test_callback_exceptions.html
@@ -7,11 +7,11 @@
 <script>
 promise_test(function(t) {
   var iterator = document.createNodeIterator(document, NodeFilter.SHOW_ALL, JSON.parse);
   return promise_rejects(t, new SyntaxError,
                          Promise.resolve().then(iterator.nextNode.bind(iterator)));
 }, "Trying to use JSON.parse as filter should throw a catchable SyntaxError exception even when the filter is invoked async");
 
 promise_test(function(t) {
-  return promise_rejects(t, new SyntaxError, Promise.resolve('{').then(JSON.parse));
+  return promise_rejects(t, new SyntaxError, Promise.resolve("{").then(JSON.parse));
 }, "Trying to use JSON.parse as a promise callback should allow the next promise to handle the resulting exception.");
 </script>
--- a/dom/bindings/test/test_crossOriginWindowSymbolAccess.html
+++ b/dom/bindings/test/test_crossOriginWindowSymbolAccess.html
@@ -1,17 +1,17 @@
 <!DOCTYPE html>
 <meta charset=utf-8>
 <title>Test for accessing symbols on a cross-origin window</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <iframe src="http://www1.w3c-test.org/common/blank.html"></iframe>
 <script>
-async_test(function (t) {
+async_test(function(t) {
   window.addEventListener("load", t.step_func(
     function() {
       assert_equals(document.querySelector("iframe").contentDocument, null, "Should have a crossorigin frame");
       assert_throws("SecurityError", function() {
         frames[0][Symbol.iterator];
       }, "Should throw exception on cross-origin Window symbol-named get");
       assert_throws("SecurityError", function() {
         frames[0].location[Symbol.iterator];
--- a/dom/bindings/test/test_document_location_set_via_xray.html
+++ b/dom/bindings/test/test_document_location_set_via_xray.html
@@ -15,18 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
 <iframe id="t" src="http://example.org/tests/dom/bindings/test/file_document_location_set_via_xray.html"></iframe>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 905493 **/
 
-function test()
-{
+function test() {
   var doc = document.getElementById("t").contentWindow.document;
   ok(!("x" in doc), "Should have an Xray here");
   is(doc.x, undefined, "Really should have an Xray here");
   is(doc.wrappedJSObject.x, 5, "And wrapping the right thing");
   document.getElementById("t").onload = function() {
     ok(true, "Load happened");
     SimpleTest.finish();
   };
--- a/dom/bindings/test/test_document_location_via_xray_cached.html
+++ b/dom/bindings/test/test_document_location_via_xray_cached.html
@@ -15,18 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
 <iframe id="t" src="http://example.org/tests/dom/bindings/test/file_document_location_set_via_xray.html"></iframe>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 1041731 **/
 
-function test()
-{
+function test() {
   var loc = document.getElementById("t").contentWindow.document.location;
   is(loc.toString, loc.toString, "Unforgeable method on the Xray should be cached");
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(test);
 
--- a/dom/bindings/test/test_dom_xrays.html
+++ b/dom/bindings/test/test_dom_xrays.html
@@ -18,54 +18,51 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 1021066 **/
 
 // values should contain the values that the property should have on each of
 // the objects on the prototype chain of obj. A value of undefined signals
 // that the value should not be present on that prototype.
-function checkXrayProperty(obj, name, values)
-{
+function checkXrayProperty(obj, name, values) {
   var instance = obj;
   do {
     var value = values.shift();
     if (typeof value == "undefined") {
       ok(!obj.hasOwnProperty(name), "hasOwnProperty shouldn't see \"" + name + "\" through Xrays");
       is(Object.getOwnPropertyDescriptor(obj, name), undefined, "getOwnPropertyDescriptor shouldn't see \"" + name + "\" through Xrays");
       ok(!Object.keys(obj).includes(name), "Enumerating the Xray should not return \"" + name + "\"");
       ok(!Object.getOwnPropertyNames(obj).includes(name),
-         `The Xray's property names should not include ${name}`)
+         `The Xray's property names should not include ${name}`);
     } else {
       ok(obj.hasOwnProperty(name), "hasOwnProperty should see \"" + name + "\" through Xrays");
       var pd = Object.getOwnPropertyDescriptor(obj, name);
       ok(pd, "getOwnPropertyDescriptor should see \"" + name + "\" through Xrays");
       if (pd && pd.get) {
         is(pd.get.call(instance), value, "Should get the right value for \"" + name + "\" through Xrays");
       } else {
         is(obj[name], value, "Should get the right value for \"" + name + "\" through Xrays");
       }
       if (pd) {
         if (pd.enumerable) {
           ok(Object.keys(obj).indexOf("" + name) > -1, "Enumerating the Xray should return \"" + name + "\"");
         }
         ok(Object.getOwnPropertyNames(obj).indexOf("" + name) > -1,
-           `The Xray's property names should include ${name}`)
+           `The Xray's property names should include ${name}`);
       }
     }
   } while ((obj = Object.getPrototypeOf(obj)));
 }
 
-function checkWindowXrayProperty(obj, name, windowValue, windowPrototypeValue, namedPropertiesValue, eventTargetValue)
-{
+function checkWindowXrayProperty(obj, name, windowValue, windowPrototypeValue, namedPropertiesValue, eventTargetValue) {
   checkXrayProperty(obj, name, [ windowValue, windowPrototypeValue, namedPropertiesValue, eventTargetValue ]);
 }
 
-function test()
-{
+function test() {
   // Window
   var win = document.getElementById("t").contentWindow;
   var doc = document.getElementById("t").contentDocument;
 
   var winProto = Object.getPrototypeOf(win);
   is(winProto, win.Window.prototype, "The proto chain of the Xray should mirror the prototype chain of the Xrayed object");
 
   var namedPropertiesObject = Object.getPrototypeOf(winProto);
@@ -104,20 +101,20 @@ function test()
   // Named properties shouldn't shadow WebIDL- or ECMAScript-defined properties.
   checkWindowXrayProperty(win, "addEventListener", undefined, undefined, undefined, eventTargetProto.addEventListener);
   is(win.addEventListener, eventTargetProto.addEventListener, "Named properties shouldn't shadow WebIDL-defined properties");
 
   is(win.toString, win.Object.prototype.toString, "Named properties shouldn't shadow ECMAScript-defined properties");
 
   // WebIDL interface names should be exposed.
   var waivedWin = Cu.waiveXrays(win);
-  checkWindowXrayProperty(win, "Element", Cu.unwaiveXrays(waivedWin.Element))
+  checkWindowXrayProperty(win, "Element", Cu.unwaiveXrays(waivedWin.Element));
 
   // JS standard classes should be exposed.
-  checkWindowXrayProperty(win, "Array", Cu.unwaiveXrays(waivedWin.Array))
+  checkWindowXrayProperty(win, "Array", Cu.unwaiveXrays(waivedWin.Array));
 
   // HTMLDocument
   // Unforgeable properties live on the instance.
   checkXrayProperty(doc, "location", [ win.location ]);
   is(String(win.location), document.getElementById("t").src,
      "Should have the right stringification");
 
   // HTMLHtmlElement
@@ -192,48 +189,48 @@ function test()
   is(dataTransfer.wrappedJSObject.types.contains, undefined,
      "Underlying object should not have contains() set up as an alias to " +
      "includes()");
 
   // Check that deleters work correctly in the [OverrideBuiltins] case.
   var elem = win.document.documentElement;
   var dataset = elem.dataset;
   is(dataset.foo, undefined, "Should not have a 'foo' property");
-  ok(!('foo' in dataset), "Really should not have a 'foo' property");
+  ok(!("foo" in dataset), "Really should not have a 'foo' property");
   is(elem.getAttribute("data-foo"), null,
      "Should not have a 'data-foo' attribute");
   ok(!elem.hasAttribute("data-foo"),
      "Really should not have a 'data-foo' attribute");
   dataset.foo = "bar";
   is(dataset.foo, "bar", "Should now have a 'foo' property");
-  ok('foo' in dataset, "Really should have a 'foo' property");
+  ok("foo" in dataset, "Really should have a 'foo' property");
   is(elem.getAttribute("data-foo"), "bar",
      "Should have a 'data-foo' attribute");
   ok(elem.hasAttribute("data-foo"),
      "Really should have a 'data-foo' attribute");
   delete dataset.foo;
   is(dataset.foo, undefined, "Should not have a 'foo' property again");
-  ok(!('foo' in dataset), "Really should not have a 'foo' property again");
+  ok(!("foo" in dataset), "Really should not have a 'foo' property again");
   is(elem.getAttribute("data-foo"), null,
      "Should not have a 'data-foo' attribute again");
   ok(!elem.hasAttribute("data-foo"),
      "Really should not have a 'data-foo' attribute again");
 
   // Check that deleters work correctly in the non-[OverrideBuiltins] case.
   var storage = win.sessionStorage;
   is(storage.foo, undefined, "Should not have a 'foo' property");
-  ok(!('foo' in storage), "Really should not have a 'foo' property");
+  ok(!("foo" in storage), "Really should not have a 'foo' property");
   is(storage.getItem("foo"), null, "Should not have an item named 'foo'");
   storage.foo = "bar";
   is(storage.foo, "bar", "Should have a 'foo' property");
-  ok('foo' in storage, "Really should have a 'foo' property");
+  ok("foo" in storage, "Really should have a 'foo' property");
   is(storage.getItem("foo"), "bar", "Should have an item named 'foo'");
-  delete storage.foo
+  delete storage.foo;
   is(storage.foo, undefined, "Should not have a 'foo' property again");
-  ok(!('foo' in storage), "Really should not have a 'foo' property again");
+  ok(!("foo" in storage), "Really should not have a 'foo' property again");
   is(storage.getItem("foo"), null, "Should not have an item named 'foo' again");
 
   // Non-static properties are not exposed on interface objects or instances.
   is(win.HTMLInputElement.checkValidity, undefined,
      "Shouldn't see non-static property on interface objects");
   is(Object.getOwnPropertyDescriptor(win.HTMLInputElement, "checkValidity"), undefined,
      "Shouldn't see non-static property on interface objects");
   is(Object.getOwnPropertyNames(win.HTMLInputElement).indexOf("checkValidity"), -1,
@@ -247,19 +244,19 @@ function test()
 
   // Static properties are not exposed on prototype objects or instances.
   isnot(typeof win.URL.createObjectURL, "undefined",
         "Should see static property on interface objects");
   isnot(typeof Object.getOwnPropertyDescriptor(win.URL, "createObjectURL"), "undefined",
         "Should see static property on interface objects");
   isnot(Object.getOwnPropertyNames(win.URL).indexOf("createObjectURL"), -1,
         "Should see static property on interface objects");
-  is(new URL('http://example.org').createObjectURL, undefined,
+  is(new URL("http://example.org").createObjectURL, undefined,
      "Shouldn't see static property on instances and prototype ojbects");
-  is(Object.getOwnPropertyDescriptor(new URL('http://example.org'), "createObjectURL"), undefined,
+  is(Object.getOwnPropertyDescriptor(new URL("http://example.org"), "createObjectURL"), undefined,
      "Shouldn't see static property on instances");
   is(Object.getOwnPropertyDescriptor(win.URL.prototype, "createObjectURL"), undefined,
      "Shouldn't see static property on prototype objects");
 
   // Unforgeable properties are not exposed on prototype objects or interface
   // objects.
   is(Window.document, undefined,
      "Shouldn't see unforgeable property on interface objects");
--- a/dom/bindings/test/test_enums.html
+++ b/dom/bindings/test/test_enums.html
@@ -2,14 +2,14 @@
 <meta charset=utf-8>
 <title>Enums</title>
 <script src=/resources/testharness.js></script>
 <script src=/resources/testharnessreport.js></script>
 <div id=log></div>
 <script>
 test(function() {
   var xhr = new XMLHttpRequest();
-  xhr.open("get", "foo")
+  xhr.open("get", "foo");
   assert_equals(xhr.responseType, "");
   xhr.responseType = "foo";
   assert_equals(xhr.responseType, "");
 }, "Assigning an invalid value to an enum attribute should not throw.");
 </script>
--- a/dom/bindings/test/test_exceptionSanitization.html
+++ b/dom/bindings/test/test_exceptionSanitization.html
@@ -16,17 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 </div>
 <pre id="test">
 </pre>
   <script type="application/javascript">
 
     SimpleTest.waitForExplicitFinish();
     async function runTests() {
-      await SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]});
+      await SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]});
 
       var t = new TestFunctions();
 
       try {
 	t.testThrowNsresult();
       } catch (e) {
 	try {
 	  is(e.name, "NS_BINDING_ABORTED",
--- a/dom/bindings/test/test_exceptionThrowing.html
+++ b/dom/bindings/test/test_exceptionThrowing.html
@@ -8,36 +8,36 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 847119</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 847119 **/
 
   var xhr = new XMLHttpRequest();
-  var domthrows = function() { xhr.open();  }
+  var domthrows = function() { xhr.open(); };
 
   var count = 20000;
   
   function f() {
     var k = 0;
     for (var j = 0; j < count; ++j) {
-      try { domthrows(); } catch(e) { ++k; }
+      try { domthrows(); } catch (e) { ++k; }
     }
     return k;
   }
   function g() { return count; }
 
   is(f(), count, "Should get count exceptions");
   for (var h of [f, g]) {
     try { is(h(), count, "Should get count exceptions here too"); } catch (e) {}
   }
   ok(true, "We should get here");
 
-  var domthrows = function() { xhr.withCredentials = false; }
+  var domthrows = function() { xhr.withCredentials = false; };
   xhr.open("GET", "");
   xhr.send();
 
   is(f(), count, "Should get count exceptions from getter");
   for (var h of [f, g]) {
     try { is(h(), count, "Should get count exceptions from getter here too"); } catch (e) {}
   }
   ok(true, "We should get here too");
--- a/dom/bindings/test/test_exception_messages.html
+++ b/dom/bindings/test/test_exception_messages.html
@@ -9,58 +9,58 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 882653 **/
   // Each test is a string to eval, the expected exception message, and the
   // test description.
   var tests = [
-      [ 'document.documentElement.appendChild.call({}, new Image())',
+      [ "document.documentElement.appendChild.call({}, new Image())",
         "'appendChild' called on an object that does not implement interface Node.",
         "bogus method this object" ],
       [ 'Object.getOwnPropertyDescriptor(Document.prototype, "documentElement").get.call({})',
         "'get documentElement' called on an object that does not implement interface Document.",
         "bogus getter this object" ],
       [ 'Object.getOwnPropertyDescriptor(Element.prototype, "innerHTML").set.call({})',
         "'set innerHTML' called on an object that does not implement interface Element.",
         "bogus setter this object" ],
-      [ 'document.documentElement.appendChild(5)',
+      [ "document.documentElement.appendChild(5)",
         "Argument 1 of Node.appendChild is not an object.",
         "bogus interface argument" ],
-      [ 'document.documentElement.appendChild(null)',
+      [ "document.documentElement.appendChild(null)",
         "Argument 1 of Node.appendChild is not an object.",
         "null interface argument" ],
-      [ 'document.createTreeWalker(document).currentNode = 5',
+      [ "document.createTreeWalker(document).currentNode = 5",
         "Value being assigned to TreeWalker.currentNode is not an object.",
         "interface setter call" ],
-      [ 'document.documentElement.appendChild({})',
+      [ "document.documentElement.appendChild({})",
         "Argument 1 of Node.appendChild does not implement interface Node.",
         "wrong interface argument" ],
-      [ 'document.createTreeWalker(document).currentNode = {}',
+      [ "document.createTreeWalker(document).currentNode = {}",
         "Value being assigned to TreeWalker.currentNode does not implement interface Node.",
         "wrong interface setter call" ],
       [ 'document.createElement("canvas").getContext("2d").fill("bogus")',
         "Argument 1 of CanvasRenderingContext2D.fill 'bogus' is not a valid value for enumeration CanvasWindingRule.",
         "bogus enum value" ],
-      [ 'document.createTreeWalker(document, 0xFFFFFFFF, { acceptNode: 5 }).nextNode()',
+      [ "document.createTreeWalker(document, 0xFFFFFFFF, { acceptNode: 5 }).nextNode()",
         "Property 'acceptNode' is not callable.",
         "non-callable callback interface operation property" ],
-      [ '(new TextDecoder).decode(new Uint8Array(), 5)',
+      [ "(new TextDecoder).decode(new Uint8Array(), 5)",
         "Argument 2 of TextDecoder.decode can't be converted to a dictionary.",
         "primitive passed for a dictionary" ],
-      [ 'URL.createObjectURL(null)',
+      [ "URL.createObjectURL(null)",
         "Argument 1 is not valid for any of the 1-argument overloads of URL.createObjectURL.",
         "overload resolution failure" ],
       [ 'document.createElement("select").add({})',
         "Argument 1 of HTMLSelectElement.add could not be converted to any of: HTMLOptionElement, HTMLOptGroupElement.",
         "invalid value passed for union" ],
       [ 'document.createElement("canvas").getContext("2d").createLinearGradient(0, 1, 0, 1).addColorStop(NaN, "")',
         "Argument 1 of CanvasGradient.addColorStop is not a finite floating-point value.",
-        "invalid float" ]
+        "invalid float" ],
   ];
 
   for (var i = 0; i < tests.length; ++i) {
       msg = "Correct exception should be thrown for " + tests[i][2];
       try {
           eval(tests[i][0]);
           ok(false, msg);
       } catch (e) {
--- a/dom/bindings/test/test_exception_options_from_jsimplemented.html
+++ b/dom/bindings/test/test_exception_options_from_jsimplemented.html
@@ -84,17 +84,17 @@ https://bugzilla.mozilla.org/show_bug.cg
       is(e.fileName,
          file,
          "Should still have the right file name for TypeError");
       is(e.lineNumber, 72, "Should still have the right line number for TypeError");
       is(e.columnNumber, 9, "Should have the right column number for TypeError");
     }
 
     try {
-      t.testThrowCallbackError(function() { Array.indexOf() });
+      t.testThrowCallbackError(function() { Array.indexOf(); });
     } catch (e) {
       ok(e instanceof TypeError, "Should have a TypeError here (3)");
       ok(!(e instanceof DOMException), "Should not have DOMException here (3)");
       ok(!("code" in e), "Should not have a 'code' property (3)");
       is(e.name, "TypeError", "Should be named TypeError (3)");
       is(e.message, "missing argument 0 when calling function Array.indexOf",
          "Should also have the right message (3)");
       is(e.stack,
@@ -145,17 +145,17 @@ doTest@${file}:92:9
          "Should still have the right file name for sanitized exception (5)");
       is(e.lineNumber, 132, "Should still have the right line number for sanitized exception (5)");
       todo_isnot(e.columnNumber, 0, "Should have the right column number for sanitized exception (5)");
     }
 
     SimpleTest.finish();
   }
 
-  SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
+  SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
                             doTest);
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1107592">Mozilla Bug 1107592</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 
--- a/dom/bindings/test/test_forOf.html
+++ b/dom/bindings/test/test_forOf.html
@@ -28,45 +28,45 @@ https://bugzilla.mozilla.org/show_bug.cg
 function runTestsForDocument(document, msgSuffix) {
     function is(a, b, msg) { SimpleTest.is(a, b, msg + msgSuffix); }
     function isnot(a, b, msg) { SimpleTest.isnot(a, b, msg + msgSuffix); }
 
     var basket = document.getElementById("basket");
     var egg3 = document.createElement("span");
     egg3.id = "egg3";
 
-    var log = '';
+    var log = "";
     for (var x of basket.childNodes) {
         if (x.nodeType != x.TEXT_NODE)
             log += x.id + ";";
     }
     is(log, "egg0;egg1;egg2;", "'for (x of div.childNodes)' should iterate over child nodes");
 
-    log = '';
+    log = "";
     for (var x of basket.childNodes) {
         if (x.nodeType != x.TEXT_NODE) {
             log += x.id + ";";
             if (x.id == "egg1")
                 basket.appendChild(egg3);
         }
     }
     is(log, "egg0;egg1;egg2;egg3;", "'for (x of div.childNodes)' should see elements added during iteration");
 
-    log = '';
+    log = "";
     basket.appendChild(document.createTextNode("some text"));
     for (var x of basket.children)
         log += x.id + ";";
     is(log, "egg0;egg1;egg2;egg3;", "'for (x of div.children)' should iterate over child elements");
 
     var count = 0;
     for (var x of document.getElementsByClassName("hazardous-materials"))
         count++;
     is(count, 0, "'for (x of emptyNodeList)' loop should run zero times");
 
-    var log = '';
+    var log = "";
     for (var x of document.querySelectorAll("span"))
         log += x.id + ";";
     is(log, "egg0;egg1;duckling1;egg2;egg3;", "for-of loop should work with a querySelectorAll() NodeList");
 }
 
 /* All the tests run twice. First, in this document, so without any wrappers. */
 runTestsForDocument(document, "");
 
--- a/dom/bindings/test/test_integers.html
+++ b/dom/bindings/test/test_integers.html
@@ -17,17 +17,17 @@
     // We can use a WebGLRenderingContext to test conversion to 64-bit signed
     // ints edge cases.
     var gl = $("c").getContext("experimental-webgl");
     if (!gl) {
       // No WebGL support on MacOS 10.5.  Just skip this test
       todo(false, "WebGL not supported");
       return;
     }
-    var error = gl.getError()
+    var error = gl.getError();
 
     // on the b2g emulator we get GL_INVALID_FRAMEBUFFER_OPERATION
     if (error == 0x0506) // GL_INVALID_FRAMEBUFFER_OPERATION
         return;
 
     is(error, 0, "Should not start in an error state");
 
     var b = gl.createBuffer();
--- a/dom/bindings/test/test_interfaceToString.html
+++ b/dom/bindings/test/test_interfaceToString.html
@@ -21,27 +21,25 @@ https://bugzilla.mozilla.org/show_bug.cg
 /** Test for Bug 742156 **/
 
 var nativeToString = ("" + String).replace("String", "EventTarget");
 try {
     var eventTargetToString = "" + EventTarget;
     is(eventTargetToString, nativeToString,
        "Stringifying a DOM interface object should return the same string" +
        "as stringifying a native function.");
-}
-catch (e) {
+} catch (e) {
     ok(false, "Stringifying a DOM interface object shouldn't throw.");
 }
 
 try {
     eventTargetToString = Function.prototype.toString.call(EventTarget);
     is(eventTargetToString, nativeToString,
        "Stringifying a DOM interface object via Function.prototype.toString " +
        "should return the same string as stringifying a native function.");
-}
-catch (e) {
+} catch (e) {
     ok(false, "Stringifying a DOM interface object shouldn't throw.");
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/bindings/test/test_iterable.html
+++ b/dom/bindings/test/test_iterable.html
@@ -5,22 +5,21 @@
   <head>
     <title>Test Iterable Interface</title>
     <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
   </head>
   <body>
     <script class="testbody" type="application/javascript">
      SimpleTest.waitForExplicitFinish();
-     SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, function() {
-
+     SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, function() {
        base_properties = [["entries", "function", 0],
                           ["keys", "function", 0],
                           ["values", "function", 0],
-                          ["forEach", "function", 1]]
+                          ["forEach", "function", 1]];
        var testExistence = function testExistence(prefix, obj, properties) {
          for (var [name, type, args] of properties) {
            // Properties are somewhere up the proto chain, hasOwnProperty won't work
            isnot(obj[name], undefined,
                  `${prefix} object has property ${name}`);
 
            is(typeof obj[name], type,
               `${prefix} object property ${name} is a ${type}`);
@@ -39,17 +38,17 @@
              if (propDesc) {
                ok(propDesc.enumerable,
                   `${prefix} object property ${name} is enumerable`);
                break;
              }
              owner = Object.getPrototypeOf(owner);
            }
          }
-       }
+       };
 
        var itr;
        // Simple single type iterable creation and functionality test
        info("IterableSingle: Testing simple iterable creation and functionality");
        itr = new TestInterfaceIterableSingle();
        testExistence("IterableSingle: ", itr, base_properties);
        is(itr[Symbol.iterator], Array.prototype[Symbol.iterator],
           "IterableSingle: Should be using %ArrayIterator% for @@iterator");
@@ -115,17 +114,17 @@
           "iterator prototype should have the right brand");
 
        // Simple dual type iterable creation and functionality test
        info("IterableDouble: Testing simple iterable creation and functionality");
        itr = new TestInterfaceIterableDouble();
        testExistence("IterableDouble: ", itr, base_properties);
        is(itr.entries, itr[Symbol.iterator],
           "IterableDouble: Should be using @@iterator for 'entries'");
-       var elements = [["a", "b"], ["c", "d"], ["e", "f"]]
+       var elements = [["a", "b"], ["c", "d"], ["e", "f"]];
        var keys = [...itr.keys()];
        var values = [...itr.values()];
        var entries = [...itr.entries()];
        var key_itr = itr.keys();
        var value_itr = itr.values();
        var entries_itr = itr.entries();
        for (var i = 0; i < 3; ++i) {
          var key = key_itr.next();
@@ -158,34 +157,34 @@
             "IterableSingle: Should have the right third arg for forEach callback");
          ++callsToForEachCallback;
        }, thisArg);
        is(callsToForEachCallback, 3,
           "IterableDouble: Should have right total number of calls to forEach callback");
 
        var key = key_itr.next();
        var value = value_itr.next();
-       var entry = entries_itr.next()
+       var entry = entries_itr.next();
        is(key.value, undefined, "IterableDouble: Key iterator value should be undefined");
        is(key.done, true, "IterableDouble: Key iterator done should be true");
        is(value.value, undefined, "IterableDouble: Value iterator value should be undefined");
        is(value.done, true, "IterableDouble: Value iterator done should be true");
        is(entry.value, undefined, "IterableDouble: Entry iterator value should be undefined");
        is(entry.done, true, "IterableDouble: Entry iterator done should be true");
        is(Object.prototype.toString.call(Object.getPrototypeOf(key_itr)),
           "[object TestInterfaceIterableDouble Iterator]",
           "iterator prototype should have the right brand");
 
        // Simple dual type iterable creation and functionality test
        info("IterableDoubleUnion: Testing simple iterable creation and functionality");
        itr = new TestInterfaceIterableDoubleUnion();
        testExistence("IterableDoubleUnion: ", itr, base_properties);
        is(itr.entries, itr[Symbol.iterator],
           "IterableDoubleUnion: Should be using @@iterator for 'entries'");
-       var elements = [["long", 1], ["string", "a"]]
+       var elements = [["long", 1], ["string", "a"]];
        var keys = [...itr.keys()];
        var values = [...itr.values()];
        var entries = [...itr.entries()];
        var key_itr = itr.keys();
        var value_itr = itr.values();
        var entries_itr = itr.entries();
        for (var i = 0; i < elements.length; ++i) {
          var key = key_itr.next();
@@ -218,17 +217,17 @@
             "IterableSingle: Should have the right third arg for forEach callback");
          ++callsToForEachCallback;
        }, thisArg);
        is(callsToForEachCallback, 2,
           "IterableDoubleUnion: Should have right total number of calls to forEach callback");
 
        var key = key_itr.next();
        var value = value_itr.next();
-       var entry = entries_itr.next()
+       var entry = entries_itr.next();
        is(key.value, undefined, "IterableDoubleUnion: Key iterator value should be undefined");
        is(key.done, true, "IterableDoubleUnion: Key iterator done should be true");
        is(value.value, undefined, "IterableDoubleUnion: Value iterator value should be undefined");
        is(value.done, true, "IterableDoubleUnion: Value iterator done should be true");
        is(entry.value, undefined, "IterableDoubleUnion: Entry iterator value should be undefined");
        is(entry.done, true, "IterableDoubleUnion: Entry iterator done should be true");
        is(Object.prototype.toString.call(Object.getPrototypeOf(key_itr)),
           "[object TestInterfaceIterableDoubleUnion Iterator]",
--- a/dom/bindings/test/test_jsimplemented_cross_realm_this.html
+++ b/dom/bindings/test/test_jsimplemented_cross_realm_this.html
@@ -23,21 +23,21 @@ https://bugzilla.mozilla.org/show_bug.cg
   SimpleTest.waitForExplicitFinish();
 
   function doTest() {
     var frame = frames[0];
     var obj = new frame.TestInterfaceJS();
     var ex;
     try {
       TestInterfaceJS.prototype.testThrowTypeError.call(obj);
-    } catch(e) {
+    } catch (e) {
       ex = e;
     }
     ok(ex, "Should have an exception");
     SimpleTest.finish();
   }
 
-  SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
+  SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
                             doTest);
 </script>
 
 </body>
 </html>
--- a/dom/bindings/test/test_jsimplemented_eventhandler.html
+++ b/dom/bindings/test/test_jsimplemented_eventhandler.html
@@ -26,17 +26,17 @@ https://bugzilla.mozilla.org/show_bug.cg
       } else {
         is(gottenValue, null, "Should get back null");
       }
     }
 
     SimpleTest.finish();
   }
 
-  SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
+  SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
                             doTest);
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1186696">Mozilla Bug 1186696</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 
--- a/dom/bindings/test/test_lookupGetter.html
+++ b/dom/bindings/test/test_lookupGetter.html
@@ -15,35 +15,35 @@ https://bugzilla.mozilla.org/show_bug.cg
   
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 462428 **/
 var x = new XMLHttpRequest;
 x.open("GET", "");
-var getter = x.__lookupGetter__('readyState');
+var getter = x.__lookupGetter__("readyState");
 ok(getter !== undefined, "But able to look it up the normal way");
-ok(!x.hasOwnProperty('readyState'), "property should still be on the prototype");
+ok(!x.hasOwnProperty("readyState"), "property should still be on the prototype");
 
 var sawProp = false;
 for (var i in x) {
     if (i === "readyState") {
         sawProp = true;
     }
 }
 
 ok(sawProp, "property should be enumerable");
 
 is(getter.call(x), 1, "the getter actually works");
 
-Object.getPrototypeOf(x).__defineSetter__('readyState', function() {});
+Object.getPrototypeOf(x).__defineSetter__("readyState", function() {});
 is(getter.call(x), 1, "the getter works after defineSetter");
 
 is(x.responseType, "", "Should have correct responseType up front");
-var setter = x.__lookupSetter__('responseType');
+var setter = x.__lookupSetter__("responseType");
 setter.call(x, "document");
 is(x.responseType, "document", "the setter is bound correctly");
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/bindings/test/test_namedNoIndexed.html
+++ b/dom/bindings/test/test_namedNoIndexed.html
@@ -20,17 +20,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 /** Test for Bug 808991 **/
 is($("content").dataset[1], "foo",
    "Indexed props should work like named on dataset");
 is($("content").dataset["1"], "foo",
    "Indexed props as strings should work like named on dataset");
 is($("content").dataset.bar, "baz",
    "Named props should work on dataset");
-is($("content").dataset['bar'], "baz",
+is($("content").dataset.bar, "baz",
    "Named props as strings should work on dataset");
 
 
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/bindings/test/test_named_getter_enumerability.html
+++ b/dom/bindings/test/test_named_getter_enumerability.html
@@ -20,21 +20,21 @@ test(function() {
   for (var prop in list) {
     props.push(prop);
   }
   assert_not_equals(props.indexOf("0"), -1, "Should enumerate '0'");
   assert_equals(props.indexOf("log"), -1, "Should not enumerate 'log'");
 }, "Correct enumeration behavior");
 test(function() {
   var list = document.getElementsByTagName("div");
-  props = Object.keys(list)
+  props = Object.keys(list);
   assert_not_equals(props.indexOf("0"), -1, "Keys should contain '0'");
   assert_equals(props.indexOf("log"), -1, "Keys should not contain 'log'");
 }, "Correct keys() behavior");
 test(function() {
   var list = document.getElementsByTagName("div");
-  props = Object.getOwnPropertyNames(list)
+  props = Object.getOwnPropertyNames(list);
   assert_not_equals(props.indexOf("0"), -1,
                     "own prop names should contain '0'");
   assert_not_equals(props.indexOf("log"), -1,
                     "own prop names should contain 'log'");
 }, "Correct getOwnPropertyNames() behavior");
 </script>
--- a/dom/bindings/test/test_primitive_this.html
+++ b/dom/bindings/test/test_primitive_this.html
@@ -8,32 +8,31 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 603201</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 603201 **/
 
   SimpleTest.waitForExplicitFinish();
-  function runTest()
-  {
+  function runTest() {
     var nodes = document.body.childNodes;
 
     Object.setPrototypeOf(Number.prototype, nodes);
 
-    Object.defineProperty(nodes, "getter", {get: function() {
-      "use strict";
-      is(this, 1);
-      return "getter";
-    }});
-    Object.defineProperty(Object.getPrototypeOf(nodes), "getter2", {get: function() {
-      "use strict";
-      is(this, 1);
-      return "getter2";
-    }});
+    Object.defineProperty(nodes, "getter", {get() {
+    "use strict";
+    is(this, 1);
+    return "getter";
+  }});
+    Object.defineProperty(Object.getPrototypeOf(nodes), "getter2", {get() {
+    "use strict";
+    is(this, 1);
+    return "getter2";
+  }});
 
     var number = 1;
     is(number.getter, "getter");
     is(number.getter2, "getter2");
 
     SimpleTest.finish();
   }
 
--- a/dom/bindings/test/test_promise_rejections_from_jsimplemented.html
+++ b/dom/bindings/test/test_promise_rejections_from_jsimplemented.html
@@ -82,17 +82,17 @@ doTest@${ourFile}:56:9
 ` : "") +
                         parentFrame)),
       t.testPromiseWithThrowingChromeThenable().then(
           ensurePromiseFail.bind(null, 5),
           checkExn.bind(null, 0, "InternalError", unwrapError, undefined, "", 5, asyncStack ? (`Async*doTest@${ourFile}:84:9
 ` +
                         parentFrame) : "")),
       t.testPromiseWithThrowingContentThenable({
-            then: function() { thereIsNoSuchContentFunction3(); }
+            then() { thereIsNoSuchContentFunction3(); },
         }).then(
           ensurePromiseFail.bind(null, 6),
           checkExn.bind(null, 90, "ReferenceError",
                         "thereIsNoSuchContentFunction3 is not defined",
                         undefined, ourFile, 6,
                         `then@${ourFile}:90:32
 ` + (asyncStack ? `Async*doTest@${ourFile}:89:9\n` + parentFrame : ""))),
       t.testPromiseWithDOMExceptionThrowingPromiseInit().then(
@@ -117,22 +117,22 @@ doTest@${ourFile}:56:9
                         "We are a fourth DOMException",
                         DOMException.TYPE_MISMATCH_ERR,
                         asyncStack ? ourFile : "", 9,
                         (asyncStack ? `Async*doTest@${ourFile}:114:9
 ` +
                          parentFrame : ""))),
     ]).then(SimpleTest.finish,
             function(err) {
-              ok(false, "One of our catch statements totally failed with err" + err + ', stack: ' + (err ? err.stack : ''));
+              ok(false, "One of our catch statements totally failed with err" + err + ", stack: " + (err ? err.stack : ""));
               SimpleTest.finish();
             });
   }
 
-  SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
+  SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
                             doTest);
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1107592">Mozilla Bug 1107592</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 
--- a/dom/bindings/test/test_proxies_via_xray.html
+++ b/dom/bindings/test/test_proxies_via_xray.html
@@ -15,18 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
 <iframe id="t" src="http://example.org/tests/dom/bindings/test/file_proxies_via_xray.html"></iframe>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 1021066 **/
 
-function test()
-{
+function test() {
   "use strict"; // So we'll get exceptions on sets
   var doc = document.getElementById("t").contentWindow.document;
   ok(!("x" in doc), "Should have an Xray here");
   is(doc.x, undefined, "Really should have an Xray here");
   is(doc.wrappedJSObject.x, 5, "And wrapping the right thing");
 
   // Test overridebuiltins binding without named setter
   is(doc.y, doc.getElementById("y"),
@@ -73,23 +72,23 @@ function test()
   // Check that this actually got passed on to the underlying object.
   is(d.wrappedJSObject.foo, "baz",
      "Set should get forwarded to the underlying object again");
   is(doc.documentElement.getAttribute("data-foo"), "baz",
      "Attribute setter should have been called again");
 
   // Test non-overridebuiltins binding with named setter
   var s = doc.defaultView.localStorage;
-  s["test_proxies_via_xray"] = "bar";
+  s.test_proxies_via_xray = "bar";
   // Check that this actually got passed on to the underlying object.
-  is(s.wrappedJSObject["test_proxies_via_xray"], "bar",
+  is(s.wrappedJSObject.test_proxies_via_xray, "bar",
      "Set should get forwarded to the underlying object without overridebuiltins");
-  s["test_proxies_via_xray"] = "baz";
+  s.test_proxies_via_xray = "baz";
   // Check that this actually got passed on to the underlying object.
-  is(s.wrappedJSObject["test_proxies_via_xray"], "baz",
+  is(s.wrappedJSObject.test_proxies_via_xray, "baz",
      "Set should get forwarded to the underlying object again without overridebuiltins");
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(test);
 
--- a/dom/bindings/test/test_proxy_expandos.html
+++ b/dom/bindings/test/test_proxy_expandos.html
@@ -30,22 +30,22 @@ function testFoo(obj, kind, expected) {
 function getPropTests(obj) {
   // Start with a plain data property.
   obj.foo = "bar";
   testFoo(obj, "plain");
 
   // Now change it to a scripted getter/setter.
   var count = 0;
   var getterSetterVal = 0;
-  Object.defineProperty(obj, "foo", {configurable: true, get: function() {
+  Object.defineProperty(obj, "foo", {configurable: true, get() {
     is(this, obj, "Getter should have the proxy as |this|");
     is(arguments.length, 0, "Shouldn't pass arguments to getters");
     count++;
     return getterSetterVal;
-  }, set: function(v) {
+  }, set(v) {
     is(this, obj, "Setter should have the proxy as |this|");
     is(arguments.length, 1, "Should pass 1 argument to setters");
     getterSetterVal = v;
     count++;
   }});
   testFoo(obj, "scripted getter/setter");
   is(count, iterations * 2, "Should have called the getter/setter enough times");
 
@@ -55,18 +55,18 @@ function getPropTests(obj) {
 }
 
 function getElemTests(obj) {
   // Define two expando properties, then test inline caches for obj[prop]
   // correctly guard on prop being the same.
   var count = 0, getterSetterVal = 0;
   obj.elem1 = 1;
   Object.defineProperty(obj, "elem2", {
-                        get: function() { count++; return getterSetterVal; },
-                        set: function(v) { getterSetterVal = v; count++; }
+                        get() { count++; return getterSetterVal; },
+                        set(v) { getterSetterVal = v; count++; },
   });
   for (var i = 0; i < iterations; i++) {
     var prop = ((i & 1) == 0) ? "elem1" : "elem2";
     obj[prop] = i;
     is(obj[prop], i, "Should return correct property value");
   }
   is(count, iterations, "Should have called the getter/setter enough times");
 }
--- a/dom/bindings/test/test_returnUnion.html
+++ b/dom/bindings/test/test_returnUnion.html
@@ -7,17 +7,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <meta charset="utf-8">
   <title>Test for Bug 1048659</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for returning unions from JS-implemented WebIDL. **/
   SimpleTest.waitForExplicitFinish();
-  SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, go);
+  SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, go);
 
   function go() {
     var t = new TestInterfaceJS();
     var t2 = new TestInterfaceJS();
 
     is(t.pingPongUnion(t2), t2, "ping pong union for left case should be identity");
     is(t.pingPongUnion(12), 12, "ping pong union for right case should be identity");
 
--- a/dom/bindings/test/test_sequence_detection.html
+++ b/dom/bindings/test/test_sequence_detection.html
@@ -7,25 +7,25 @@ https://bugzilla.mozilla.org/show_bug.cg
   <meta charset="utf-8">
   <title>Test for Bug 1066432</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 1066432 **/
   SimpleTest.waitForExplicitFinish();
-  SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, function() {
+  SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, function() {
     var testInterfaceJS = new TestInterfaceJS();
     ok(testInterfaceJS, "got a TestInterfaceJS object");
 
     var nonIterableObject = {[Symbol.iterator]: 5};
 
     try {
       testInterfaceJS.testSequenceOverload(nonIterableObject);
-      ok(false, "Should have thrown in the overload case");  // see long comment above!
+      ok(false, "Should have thrown in the overload case"); // see long comment above!
     } catch (e) {
       is(e.name, "TypeError", "Should get a TypeError for the overload case");
       ok(e.message.includes("not iterable"),
          "Should have a message about being non-iterable in the overload case");
     }
 
     try {
       testInterfaceJS.testSequenceUnion(nonIterableObject);
--- a/dom/bindings/test/test_sequence_wrapping.html
+++ b/dom/bindings/test/test_sequence_wrapping.html
@@ -29,23 +29,23 @@ function doTest() {
   var setterCalled = false;
 
   extLength = gl.getSupportedExtensions().length;
   ok(extLength > 0,
      "This test won't work right if we have no supported extensions");
 
   Object.defineProperty(Array.prototype, "0",
     {
-      set: function(val) {
+      set(val) {
              setterCalled = true;
-           }
+           },
     });
 
   // Test that our property got defined correctly
-  var arr = []
+  var arr = [];
   arr[0] = 5;
   is(setterCalled, true, "Setter should be called when setting prop on array");
 
   setterCalled = false;
 
   is(gl.getSupportedExtensions().length, extLength,
      "We should still have the same number of extensions");
 
--- a/dom/bindings/test/test_stringBindings.html
+++ b/dom/bindings/test/test_stringBindings.html
@@ -37,17 +37,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     is(asFullDOMString, testString, "Full DOMString should be test string");
     is(asShortAString, shortTestString, "Short AString should be short");
     is(asAString, testString, "Full AString should be test string");
 
     SimpleTest.finish();
   }
 
   addLoadEvent(function() {
-    SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
+    SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]},
                               go);
   });
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1334537">Mozilla Bug 1334537</a>
 <p id="display"></p>
 <div id="content" style="display: none">
--- a/dom/bindings/test/test_throwing_method_noDCE.html
+++ b/dom/bindings/test/test_throwing_method_noDCE.html
@@ -5,23 +5,23 @@
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 test(function() {
   function test(root) {
     var threw = false;
     try {
         root.querySelectorAll("");
-    } catch(e){ threw = true; };
+    } catch (e) { threw = true; }
     // Hot loop to make sure the JIT heuristics ion-compile this function even
     // though it's throwing exceptions (which would normally make us back off
     // of ion compilation).
-    for (var i=0; i<1500; i++) {}
+    for (var i = 0; i < 1500; i++) {}
     return threw;
   }
 
   var threw = false;
   var el = document.createElement("div");
-  for (var i=0; i<200; i++)
+  for (var i = 0; i < 200; i++)
       threw = test(el);
   assert_true(threw);
 }, "Shouldn't optimize away throwing functions");
 </script>
--- a/dom/bindings/test/test_toJSON.html
+++ b/dom/bindings/test/test_toJSON.html
@@ -17,17 +17,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 </pre>
   <script type="application/javascript">
 
   /** Test for Bug 1465602 **/
 
   SimpleTest.waitForExplicitFinish();
-  SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, go);
+  SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, go);
 
   function go() {
     var ourObj = new TestFunctions();
     is(ourObj.one, 1, "Basic sanity check for our 'one'");
     is(ourObj.two, undefined, "Basic sanity check for our 'two'");
 
     var otherObj = new frames[0].TestFunctions();
     is(otherObj.one, 1, "Basic sanity check for subframe 'one'");
--- a/dom/bindings/test/test_treat_non_object_as_null.html
+++ b/dom/bindings/test/test_treat_non_object_as_null.html
@@ -9,17 +9,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 952365 **/
 
     var onvolumechange;
     var x = {};
-    
+  
     (function() {
        onvolumechange = x;
        is(onvolumechange, x,
           "Should preserve an object value when assigning to event handler");
        // Test that we don't try to actually call the non-callable object
        window.dispatchEvent(new Event("volumechange"));
        onvolumechange = 5;
        is(onvolumechange, null,
--- a/dom/bindings/test/test_usvstring.html
+++ b/dom/bindings/test/test_usvstring.html
@@ -5,17 +5,17 @@
 <head>
   <title>Test USVString</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <script class="testbody" type="application/javascript">
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]}, function() {
+SpecialPowers.pushPrefEnv({set: [["dom.expose_test_interfaces", true]]}, function() {
   var testInterfaceJS = new TestInterfaceJS();
   ok(testInterfaceJS, "got a TestInterfaceJS object");
   // For expected values, see algorithm definition here:
   //  http://heycam.github.io/webidl/#dfn-obtain-unicode
   var testList = [
     { string:   "foo",
       expected: "foo" },
     { string:   "This is U+2070E: \ud841\udf0e",
@@ -24,17 +24,17 @@ SpecialPowers.pushPrefEnv({set: [['dom.e
       expected: "Missing low surrogate: \ufffd" },
     { string:   "Missing low surrogate with trailer: \ud841!!",
       expected: "Missing low surrogate with trailer: \ufffd!!" },
     { string:   "Missing high surrogate: \udf0e",
       expected: "Missing high surrogate: \ufffd" },
     { string:   "Missing high surrogate with trailer: \udf0e!!",
       expected: "Missing high surrogate with trailer: \ufffd!!" },
     { string:   "U+2070E after malformed: \udf0e\ud841\udf0e",
-      expected: "U+2070E after malformed: \ufffd\ud841\udf0e" }
+      expected: "U+2070E after malformed: \ufffd\ud841\udf0e" },
   ];
   testList.forEach(function(test) {
     is(testInterfaceJS.convertSVS(test.string), test.expected, "Convert '" + test.string + "'");
   });
   SimpleTest.finish();
 });
 </script>
 </body>
--- a/dom/bindings/test/test_worker_UnwrapArg.html
+++ b/dom/bindings/test/test_worker_UnwrapArg.html
@@ -35,20 +35,20 @@ https://bugzilla.mozilla.org/show_bug.cg
   ];
   var curIndex = 0;
   w.onmessage = function(e) {
     if (curIndex == expectedResults.length) {
       is(e.data, "finishTest", "What message is this?");
       SimpleTest.finish();
     } else {
       is(e.data, expectedResults[curIndex],
-         "Message " + (curIndex+1) + " should be correct");
+         "Message " + (curIndex + 1) + " should be correct");
       ++curIndex;
     }
-  }
+  };
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1127206">Mozilla Bug 1127206</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 
 </div>