Bug 1489980 - Enable ESLint for editor/ - automatic fixes r=masayuki
authorMark Banner <standard8@mozilla.com>
Thu, 13 Sep 2018 07:58:19 +0000
changeset 436109 de36f39840c6
parent 436108 ea73513d7c25
child 436110 0d8eb8a0c2b4
push id69210
push usermbanner@mozilla.com
push dateThu, 13 Sep 2018 08:01:02 +0000
treeherderautoland@0d8eb8a0c2b4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1489980
milestone64.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 1489980 - Enable ESLint for editor/ - automatic fixes r=masayuki These are all automatically generated by ESLint with the --fix option. Depends on D5584 Differential Revision: https://phabricator.services.mozilla.com/D5585
editor/AsyncSpellCheckTestHelper.jsm
editor/composer/test/test_bug1266815.html
editor/composer/test/test_bug348497.html
editor/composer/test/test_bug389350.html
editor/libeditor/tests/browser_bug527935.js
editor/libeditor/tests/browser_bug629172.js
editor/libeditor/tests/file_bug674770-1.html
editor/libeditor/tests/file_select_all_without_body.html
editor/libeditor/tests/test_abs_positioner_positioning_elements.html
editor/libeditor/tests/test_bug1026397.html
editor/libeditor/tests/test_bug1053048.html
editor/libeditor/tests/test_bug1094000.html
editor/libeditor/tests/test_bug1100966.html
editor/libeditor/tests/test_bug1101392.html
editor/libeditor/tests/test_bug1102906.html
editor/libeditor/tests/test_bug1109465.html
editor/libeditor/tests/test_bug1130651.html
editor/libeditor/tests/test_bug1140617.html
editor/libeditor/tests/test_bug1153237.html
editor/libeditor/tests/test_bug1154791.html
editor/libeditor/tests/test_bug1162952.html
editor/libeditor/tests/test_bug1186799.html
editor/libeditor/tests/test_bug1230473.html
editor/libeditor/tests/test_bug1248185.html
editor/libeditor/tests/test_bug1250010.html
editor/libeditor/tests/test_bug1270235.html
editor/libeditor/tests/test_bug1310912.html
editor/libeditor/tests/test_bug1315065.html
editor/libeditor/tests/test_bug1316302.html
editor/libeditor/tests/test_bug1318312.html
editor/libeditor/tests/test_bug1330796.html
editor/libeditor/tests/test_bug1332876.html
editor/libeditor/tests/test_bug1352799.html
editor/libeditor/tests/test_bug1358025.html
editor/libeditor/tests/test_bug1361008.html
editor/libeditor/tests/test_bug1361052.html
editor/libeditor/tests/test_bug1368544.html
editor/libeditor/tests/test_bug1394758.html
editor/libeditor/tests/test_bug1409520.html
editor/libeditor/tests/test_bug1425997.html
editor/libeditor/tests/test_bug290026.html
editor/libeditor/tests/test_bug291780.html
editor/libeditor/tests/test_bug318065.html
editor/libeditor/tests/test_bug358033.html
editor/libeditor/tests/test_bug366682.html
editor/libeditor/tests/test_bug404320.html
editor/libeditor/tests/test_bug408231.html
editor/libeditor/tests/test_bug414526.html
editor/libeditor/tests/test_bug417418.html
editor/libeditor/tests/test_bug430392.html
editor/libeditor/tests/test_bug432225.html
editor/libeditor/tests/test_bug449243.html
editor/libeditor/tests/test_bug455992.html
editor/libeditor/tests/test_bug456244.html
editor/libeditor/tests/test_bug460740.html
editor/libeditor/tests/test_bug471319.html
editor/libeditor/tests/test_bug471722.html
editor/libeditor/tests/test_bug478725.html
editor/libeditor/tests/test_bug480972.html
editor/libeditor/tests/test_bug483651.html
editor/libeditor/tests/test_bug484181.html
editor/libeditor/tests/test_bug487524.html
editor/libeditor/tests/test_bug490879.html
editor/libeditor/tests/test_bug502673.html
editor/libeditor/tests/test_bug520189.html
editor/libeditor/tests/test_bug525389.html
editor/libeditor/tests/test_bug549262.html
editor/libeditor/tests/test_bug551704.html
editor/libeditor/tests/test_bug552782.html
editor/libeditor/tests/test_bug569988.html
editor/libeditor/tests/test_bug570144.html
editor/libeditor/tests/test_bug578771.html
editor/libeditor/tests/test_bug596333.html
editor/libeditor/tests/test_bug597331.html
editor/libeditor/tests/test_bug611182.html
editor/libeditor/tests/test_bug620906.html
editor/libeditor/tests/test_bug629845.html
editor/libeditor/tests/test_bug635636.html
editor/libeditor/tests/test_bug636465.html
editor/libeditor/tests/test_bug645914.html
editor/libeditor/tests/test_bug668599.html
editor/libeditor/tests/test_bug674770-1.html
editor/libeditor/tests/test_bug674770-2.html
editor/libeditor/tests/test_bug674861.html
editor/libeditor/tests/test_bug676401.html
editor/libeditor/tests/test_bug677752.html
editor/libeditor/tests/test_bug686203.html
editor/libeditor/tests/test_bug697842.html
editor/libeditor/tests/test_bug772796.html
editor/libeditor/tests/test_bug790475.html
editor/libeditor/tests/test_bug795418-2.html
editor/libeditor/tests/test_bug795418-3.html
editor/libeditor/tests/test_bug795785.html
editor/libeditor/tests/test_bug796839.html
editor/libeditor/tests/test_bug830600.html
editor/libeditor/tests/test_bug832025.html
editor/libeditor/tests/test_bug850043.html
editor/libeditor/tests/test_bug915962.html
editor/libeditor/tests/test_bug998188.html
editor/libeditor/tests/test_composition_event_created_in_chrome.html
editor/libeditor/tests/test_contenteditable_focus.html
editor/libeditor/tests/test_contenteditable_text_input_handling.html
editor/libeditor/tests/test_css_chrome_load_access.html
editor/libeditor/tests/test_documentCharacterSet.html
editor/libeditor/tests/test_dom_input_event_on_htmleditor.html
editor/libeditor/tests/test_dom_input_event_on_texteditor.html
editor/libeditor/tests/test_dragdrop.html
editor/libeditor/tests/test_htmleditor_keyevent_handling.html
editor/libeditor/tests/test_keypress_untrusted_event.html
editor/libeditor/tests/test_nsITableEditor_getCellAt.html
editor/libeditor/tests/test_nsITableEditor_getCellIndexes.html
editor/libeditor/tests/test_nsITableEditor_getFirstRow.html
editor/libeditor/tests/test_nsITableEditor_getFirstSelectedCell.html
editor/libeditor/tests/test_nsITableEditor_getNextSelectedCell.html
editor/libeditor/tests/test_nsITableEditor_getTableSize.html
editor/libeditor/tests/test_resizers_appearance.html
editor/libeditor/tests/test_resizers_resizing_elements.html
editor/libeditor/tests/test_root_element_replacement.html
editor/libeditor/tests/test_select_all_without_body.html
editor/libeditor/tests/test_selection_move_commands.html
editor/libeditor/tests/test_texteditor_keyevent_handling.html
editor/spellchecker/tests/test_async_UpdateCurrentDictionary.html
editor/spellchecker/tests/test_bug1200533.html
editor/spellchecker/tests/test_bug1204147.html
editor/spellchecker/tests/test_bug1205983.html
editor/spellchecker/tests/test_bug1209414.html
editor/spellchecker/tests/test_bug1219928.html
editor/spellchecker/tests/test_bug1365383.html
editor/spellchecker/tests/test_bug338427.html
editor/spellchecker/tests/test_bug678842.html
editor/spellchecker/tests/test_bug697981.html
editor/spellchecker/tests/test_bug717433.html
--- a/editor/AsyncSpellCheckTestHelper.jsm
+++ b/editor/AsyncSpellCheckTestHelper.jsm
@@ -34,18 +34,17 @@ function onSpellCheck(editableElement, c
   }
   if (!editor)
     throw new Error("Unable to find editor for element " + editableElement);
 
   try {
     // False is important here.  Pass false so that the inline spell checker
     // isn't created if it doesn't already exist.
     var isc = editor.getInlineSpellChecker(false);
-  }
-  catch (err) {
+  } catch (err) {
     // getInlineSpellChecker throws if spell checking is not enabled instead of
     // just returning null, which seems kind of lame.  (Spell checking is not
     // enabled on Android.)  The point here is only to determine whether spell
     // check is pending, and if getInlineSpellChecker throws, then it's not
     // pending.
   }
   let waitingForEnded = isc && isc.spellCheckPending;
   let count = 0;
@@ -72,9 +71,9 @@ function onSpellCheck(editableElement, c
     // declaring that no spell checks will start.
     if (waitingForEnded || ++count < 50)
       return;
     timer.cancel();
     os.removeObserver(observe, SPELL_CHECK_STARTED_TOPIC);
     os.removeObserver(observe, SPELL_CHECK_ENDED_TOPIC);
     callback();
   }, 0, Ci.nsITimer.TYPE_REPEATING_SLACK);
-};
+}
--- a/editor/composer/test/test_bug1266815.html
+++ b/editor/composer/test/test_bug1266815.html
@@ -27,23 +27,23 @@ var registrar = SpecialPowers.wrap(Compo
 
 var helperAppDlgPromise = new Promise(function(resolve) {
   var mockHelperAppService;
 
   function HelperAppLauncherDialog() {
   }
 
   HelperAppLauncherDialog.prototype = {
-    show: function(aLauncher, aWindowContext, aReason) {
+    show(aLauncher, aWindowContext, aReason) {
       ok(true, "Whether showing Dialog");
       resolve();
       registrar.unregisterFactory(MOCK_HELPERAPP_DIALOG_CID,
                                   mockHelperAppService);
     },
-    QueryInterface: ChromeUtils.generateQI([Ci.nsIHelperAppLauncherDialog])
+    QueryInterface: ChromeUtils.generateQI([Ci.nsIHelperAppLauncherDialog]),
   };
 
   mockHelperAppService = XPCOMUtils._getFactory(HelperAppLauncherDialog);
   registrar.registerFactory(MOCK_HELPERAPP_DIALOG_CID, "",
                             HELPERAPP_DIALOG_CONTRACT_ID,
                             mockHelperAppService);
 });
 
--- a/editor/composer/test/test_bug348497.html
+++ b/editor/composer/test/test_bug348497.html
@@ -15,22 +15,22 @@ https://bugzilla.mozilla.org/show_bug.cg
   This page should not crash Mozilla<br>
   <iframe id="testIframe"></iframe>
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 348497 **/
 function doe() {
-    document.getElementById('testIframe').style.display = 'block';
-    document.getElementById('testIframe').contentDocument.designMode = 'on';
+    document.getElementById("testIframe").style.display = "block";
+    document.getElementById("testIframe").contentDocument.designMode = "on";
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(doe);
-addLoadEvent(function() { ok(true, "enabling designmode on an iframe onload does not crash Mozilla")});
+addLoadEvent(function() { ok(true, "enabling designmode on an iframe onload does not crash Mozilla"); });
 addLoadEvent(SimpleTest.finish);
 
 </script>
 </pre>
 </body>
 </html>
 
--- a/editor/composer/test/test_bug389350.html
+++ b/editor/composer/test/test_bug389350.html
@@ -7,20 +7,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 
 <script type="text/javascript">
 
 function runTest() {
   var e = document.getElementById("edit");
-  e.contentDocument.designMode='on';
-  e.style.display='block';
+  e.contentDocument.designMode = "on";
+  e.style.display = "block";
   e.focus();
-  sendString('abc');
+  sendString("abc");
   var expected = "<head></head><body>abc</body>";
   var result = e.contentDocument.documentElement.innerHTML;
   is(result, expected, "iframe with designmode on had incorrect content");
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
--- a/editor/libeditor/tests/browser_bug527935.js
+++ b/editor/libeditor/tests/browser_bug527935.js
@@ -1,15 +1,15 @@
 add_task(async function() {
   await new Promise(resolve => waitForFocus(resolve, window));
 
   const kPageURL = "http://example.org/browser/editor/libeditor/tests/bug527935.html";
   await BrowserTestUtils.withNewTab({
     gBrowser,
-    url: kPageURL
+    url: kPageURL,
   }, async function(aBrowser) {
     var popupShown = false;
     function listener() {
       popupShown = true;
     }
     SpecialPowers.addAutoCompletePopupEventListener(window, "popupshowing", listener);
 
     await ContentTask.spawn(aBrowser, {}, async function() {
--- a/editor/libeditor/tests/browser_bug629172.js
+++ b/editor/libeditor/tests/browser_bug629172.js
@@ -1,15 +1,15 @@
 add_task(async function() {
   await new Promise(resolve => waitForFocus(resolve, window));
 
   const kPageURL = "http://example.org/browser/editor/libeditor/tests/bug629172.html";
   await BrowserTestUtils.withNewTab({
     gBrowser,
-    url: kPageURL
+    url: kPageURL,
   }, async function(aBrowser) {
     await ContentTask.spawn(aBrowser, {}, async function() {
       var window = content.window.wrappedJSObject;
       var document = window.document;
 
       // Note: Using the with keyword, we would have been able to write this as:
       //
       // with (window) {
@@ -71,17 +71,17 @@ add_task(async function() {
                             initialDir,
                           "Reference " + initialDir + " textarea");
         t.focus();
         is(window.inputEventCount, 0, "input event count must be 0 before");
       });
       await simulateCtrlShiftX(aBrowser);
       await ContentTask.spawn(aBrowser, {initialDir}, function({initialDir}) {
         var window = content.window.wrappedJSObject;
-        var expectedDir = initialDir == "ltr" ? "rtl" : "ltr"
+        var expectedDir = initialDir == "ltr" ? "rtl" : "ltr";
         is(window.t.getAttribute("dir"), expectedDir,
            "The dir attribute must be correctly updated");
         is(window.inputEventCount, 1, "input event count must be 1 after");
         window.t.blur();
         var s2 = window.snapshotWindow(window);
         window.ok = ok; // for assertSnapshots
         window.
           assertSnapshots(s2, window.Screenshots.get(expectedDir), true,
--- a/editor/libeditor/tests/file_bug674770-1.html
+++ b/editor/libeditor/tests/file_bug674770-1.html
@@ -1,5 +1,5 @@
 <!DOCTYPE>
 <script>
-  localStorage["clicked"] = "true";
+  localStorage.clicked = "true";
   close();
 </script>
--- a/editor/libeditor/tests/file_select_all_without_body.html
+++ b/editor/libeditor/tests/file_select_all_without_body.html
@@ -1,36 +1,33 @@
 <html>
 <head>
 <script type="text/javascript">
 
-function is(aLeft, aRight, aMessage)
-{
+function is(aLeft, aRight, aMessage) {
   window.opener.SimpleTest.is(aLeft, aRight, aMessage);
 }
 
-function unload()
-{
+function unload() {
   window.opener.SimpleTest.finish();
 }
 
-function boom()
-{
+function boom() {
   var root = document.documentElement;
-  while(root.firstChild) {
+  while (root.firstChild) {
     root.firstChild.remove();
   }
   root.appendChild(document.createTextNode("Mozilla"));
   root.focus();
   cespan = document.createElementNS("http://www.w3.org/1999/xhtml", "span");
   cespan.setAttributeNS(null, "contenteditable", "true");
   root.appendChild(cespan);
   try {
     document.execCommand("selectAll", false, null);
-  } catch(e) { }
+  } catch (e) { }
 
   is(window.getSelection().toString(), "Mozilla",
      "The nodes are not selected");
 
   window.close();
 }
 
 window.opener.SimpleTest.waitForFocus(boom, window);
--- a/editor/libeditor/tests/test_abs_positioner_positioning_elements.html
+++ b/editor/libeditor/tests/test_abs_positioner_positioning_elements.html
@@ -62,17 +62,17 @@ SimpleTest.waitForFocus(async function()
 
       let rect = target.getBoundingClientRect();
 
       ok(target.hasAttribute("_moz_abspos"),
          description + "While enableAbsolutePositionEditing is enabled, the positioner should appear");
 
       // left is abs positioned element's left + margin-left + border-left-width + 12.
       // XXX Perhaps, we need to add border-left-width here if you add new test to have thick border.
-      const kPositionerX = 18
+      const kPositionerX = 18;
       // top is abs positioned element's top + margin-top + border-top-width - 14.
       // XXX Perhaps, we need to add border-top-width here if you add new test to have thick border.
       const kPositionerY = -7;
 
       // Click on the positioner.
       synthesizeMouse(target, kPositionerX, kPositionerY, {type: "mousedown"});
       // Drag it delta pixels.
       synthesizeMouse(target, kPositionerX + aDeltaX, kPositionerY + aDeltaY, {type: "mousemove"});
@@ -85,19 +85,19 @@ SimpleTest.waitForFocus(async function()
       synthesizeMouseAtCenter(outOfEditor, {});
 
       // Get the new dimensions for the absolute positioned element.
       let newRect = target.getBoundingClientRect();
       isfuzzy(newRect.x, rect.x + aDeltaX, 1, description + "The left should be increased by " + aDeltaX + " pixels");
       isfuzzy(newRect.y, rect.y + aDeltaY, 1, description + "The top should be increased by " + aDeltaY + "pixels");
     }
 
-    await testPositioner( 10,  10);
+    await testPositioner( 10, 10);
     await testPositioner( 10, -10);
-    await testPositioner(-10,  10);
+    await testPositioner(-10, 10);
     await testPositioner(-10, -10);
   }
 
   const kTests = [
     { description: "Positioner for <img>",
       innerHTML: "<img id=\"target\" src=\"green.png\">",
     },
     { description: "Positioner for <table>",
--- a/editor/libeditor/tests/test_bug1026397.html
+++ b/editor/libeditor/tests/test_bug1026397.html
@@ -16,25 +16,23 @@ https://bugzilla.mozilla.org/show_bug.cg
 <input id="input">
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 1026397 **/
 SimpleTest.waitForExplicitFinish();
 
-function runTests()
-{
+function runTests() {
   var input = document.getElementById("input");
   input.focus();
 
   function doTest(aMaxLength, aInitialValue, aCaretOffset,
                   aInsertString, aExpectedValueDuringComposition,
-                  aExpectedValueAfterCompositionEnd, aAdditionalExplanation)
-  {
+                  aExpectedValueAfterCompositionEnd, aAdditionalExplanation) {
     input.value = aInitialValue;
     var maxLengthStr = "";
     if (aMaxLength >= 0) {
       input.maxLength = aMaxLength;
       maxLengthStr = aMaxLength.toString();
     } else {
       input.removeAttribute("maxlength");
       maxLengthStr = "not specified";
@@ -46,20 +44,20 @@ function runTests()
       aAdditionalExplanation = "";
     }
 
     synthesizeCompositionChange(
       { "composition":
         { "string": aInsertString,
           "clauses":
           [
-            { "length": aInsertString.length, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
-          ]
+            { "length": aInsertString.length, "attr": COMPOSITION_ATTR_RAW_CLAUSE },
+          ],
         },
-        "caret": { "start": aInsertString.length, "length": 0 }
+        "caret": { "start": aInsertString.length, "length": 0 },
       });
     is(input.value, aExpectedValueDuringComposition,
        "The value of input whose maxlength is " + maxLengthStr + " should be "
          + aExpectedValueDuringComposition + " during composition" + aAdditionalExplanation);
     synthesizeComposition({ type: "compositioncommitasis" });
     is(input.value, aExpectedValueAfterCompositionEnd,
        "The value of input whose maxlength is " + maxLengthStr + " should be "
          + aExpectedValueAfterCompositionEnd + " after compositionend" + aAdditionalExplanation);
--- a/editor/libeditor/tests/test_bug1053048.html
+++ b/editor/libeditor/tests/test_bug1053048.html
@@ -12,32 +12,30 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="application/javascript">
 
   /** Test for Bug 1053048 **/
   SimpleTest.waitForExplicitFinish();
   SimpleTest.waitForFocus(runTests);
 
   const nsISelectionListener = SpecialPowers.Ci.nsISelectionListener;
 
-  function runTests()
-  {
+  function runTests() {
     var textarea = SpecialPowers.wrap(document.getElementById("textarea"));
     textarea.focus();
 
     var editor = textarea.editor;
     var selectionPrivate = editor.selection;
 
     var selectionListener = {
       count: 0,
-      notifySelectionChanged: function (aDocument, aSelection, aReason)
-      {
-        ok(true, "selectionStart: " + textarea.selectionStart);
-        ok(true, "selectionEnd: " + textarea.selectionEnd);
-        this.count++;
-      }
+      notifySelectionChanged(aDocument, aSelection, aReason) {
+      ok(true, "selectionStart: " + textarea.selectionStart);
+      ok(true, "selectionEnd: " + textarea.selectionEnd);
+      this.count++;
+    },
     };
 
     // Move caret to the end of the textarea
     synthesizeMouse(textarea, 290, 10, {});
     is(textarea.selectionStart, 3, "selectionStart should be 3 (after \"foo\")");
     is(textarea.selectionEnd, 3, "selectionEnd should be 3 (after \"foo\")");
 
     selectionPrivate.addSelectionListener(selectionListener);
--- a/editor/libeditor/tests/test_bug1094000.html
+++ b/editor/libeditor/tests/test_bug1094000.html
@@ -25,18 +25,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script type="application/javascript">
 
 /** Test for Bug 1094000 **/
 
 SimpleTest.waitForExplicitFinish();
 
 const kIsLinux = navigator.platform.indexOf("Linux") == 0;
 
-function runTests()
-{
+function runTests() {
   var editor0 = document.getElementById("editor0");
   var editor1 = document.getElementById("editor1");
   var editor2 = document.getElementById("editor2");
   var editor3 = document.getElementById("editor3");
   var editor4 = document.getElementById("editor4");
   var editor5 = document.getElementById("editor5");
   var editor6 = document.getElementById("editor6");
 
--- a/editor/libeditor/tests/test_bug1100966.html
+++ b/editor/libeditor/tests/test_bug1100966.html
@@ -42,18 +42,18 @@ SimpleTest.waitForFocus(function() {
         onSpellCheck(div, function() {
           var sel = getSpellCheckSelection();
           is(sel.rangeCount, 2, "We should have two misspelled words");
           is(String(sel.getRangeAt(0)), "fivee", "Correct misspelled word");
           is(String(sel.getRangeAt(1)), "sixx", "Correct misspelled word");
 
           SimpleTest.finish();
         });
-      },0);
-    },0);
+      }, 0);
+    }, 0);
   });
 });
 
 function getEditor() {
   var Ci = SpecialPowers.Ci;
   var editingSession = SpecialPowers.wrap(window).docShell.editingSession;
   return editingSession.getEditorForWindow(window);
 }
--- a/editor/libeditor/tests/test_bug1101392.html
+++ b/editor/libeditor/tests/test_bug1101392.html
@@ -9,18 +9,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 1101392 **/
   SimpleTest.waitForExplicitFinish();
   SimpleTest.waitForFocus(runTests);
 
-  function runCopyCommand(element, compareText, nextTest)
-  {
+  function runCopyCommand(element, compareText, nextTest) {
     element.focus();
     var expectedEndpoint, sel;
     if (element.localName == "textarea") {
       element.select();
       expectedEndpoint = element.selectionEnd;
     } else {
       sel = getSelection();
       sel.selectAllChildren(element.parentNode);
@@ -43,30 +42,27 @@ https://bugzilla.mozilla.org/show_bug.cg
       nextTest();
     }
 
     SimpleTest.waitForClipboard(compareText,
         () => SpecialPowers.doCommand(window, "cmd_copyAndCollapseToEnd"),
         checkCollapse, checkCollapse);
   }
 
-  function testDiv()
-  {
+  function testDiv() {
     var content = document.getElementById("content");
-    runCopyCommand(content, 'abc', testTextarea);
+    runCopyCommand(content, "abc", testTextarea);
   }
 
-  function testTextarea()
-  {
+  function testTextarea() {
     var textarea = document.getElementById("textarea");
-    runCopyCommand(textarea, 'def', SimpleTest.finish);
+    runCopyCommand(textarea, "def", SimpleTest.finish);
   }
 
-  function runTests()
-  {
+  function runTests() {
     testDiv();
   }
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1101392">Mozilla Bug 1101392</a>
 <div><div id="content">abc</div></div>
 
--- a/editor/libeditor/tests/test_bug1102906.html
+++ b/editor/libeditor/tests/test_bug1102906.html
@@ -16,17 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg
    "use strict";
 
   /* Test for Bug 1102906 */
   /* The caret should be movable by using keyboard after drag-and-drop. */
 
   SimpleTest.waitForExplicitFinish();
   SimpleTest.waitForFocus( () => {
     let content = document.getElementById("content");
-    let drag = document.getElementById("drag")
+    let drag = document.getElementById("drag");
       let selection = window.getSelection();
 
     /* Perform drag-and-drop for an arbitrary content. The caret should be at
        the end of the contenteditable. */
     selection.selectAllChildren(drag);
     synthesizeDrop(drag, content, {}, "copy");
 
     let textContentAfterDrop = content.textContent;
--- a/editor/libeditor/tests/test_bug1109465.html
+++ b/editor/libeditor/tests/test_bug1109465.html
@@ -38,20 +38,20 @@ SimpleTest.waitForFocus(function() {
   // Compose an IME string
   var composingString = "\u306B";
   // FYI: "compositionstart" will be dispatched automatically.
   synthesizeCompositionChange(
     { "composition":
       { "string": composingString,
         "clauses":
         [
-          { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
-        ]
+          { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE },
+        ],
       },
-      "caret": { "start": 1, "length": 0 }
+      "caret": { "start": 1, "length": 0 },
     });
   synthesizeComposition({ type: "compositioncommitasis" });
   is(t.value, "foo\u306B\nbar", "Correct value after composition");
 
   // Now undo to test that the transaction merger has correctly detected the
   // IMETextTxn.
   synthesizeKey("Z", {accelKey: true});
   is(t.value, "foo\nbar", "Correct value after undo");
--- a/editor/libeditor/tests/test_bug1130651.html
+++ b/editor/libeditor/tests/test_bug1130651.html
@@ -6,12 +6,12 @@
 <div contenteditable>a b</div>
 <script>
 var div = document.querySelector("div");
 div.focus();
 getSelection().collapse(div.firstChild, 2);
 try {
   document.execCommand("inserttext", false, "\n");
   ok(true, "No exception thrown");
-} catch(e) {
+} catch (e) {
   ok(false, "Exception: " + e);
 }
 </script>
--- a/editor/libeditor/tests/test_bug1140617.html
+++ b/editor/libeditor/tests/test_bug1140617.html
@@ -6,17 +6,17 @@
    target="_blank">Mozilla Bug 1140617</a>
 <iframe id="i1" width="200" height="100" src="about:blank"></iframe>
 <img id="i" src="green.png">
 <script>
 function runTest() {
   SpecialPowers.setCommandNode(window, document.getElementById("i"));
   SpecialPowers.doCommand(window, "cmd_copyImageContents");
 
-  var e = document.getElementById('i1');
+  var e = document.getElementById("i1");
   var doc = e.contentDocument;
   doc.designMode = "on";
   doc.defaultView.focus();
   var selection = doc.defaultView.getSelection();
   selection.removeAllRanges();
   selection.selectAllChildren(doc.body);
   selection.collapseToEnd();
 
--- a/editor/libeditor/tests/test_bug1153237.html
+++ b/editor/libeditor/tests/test_bug1153237.html
@@ -10,22 +10,21 @@ https://bugzilla.mozilla.org/show_bug.cg
   <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   SimpleTest.waitForExplicitFinish();
 
   // Avoid platform selection differences
   SimpleTest.waitForFocus(function() {
     SpecialPowers.pushPrefEnv({
-      "set": [["layout.word_select.eat_space_to_next_word", true]]
+      "set": [["layout.word_select.eat_space_to_next_word", true]],
     }, runTests);
   });
 
-  function runTests()
-  {
+  function runTests() {
     var element = document.getElementById("editor");
     var sel = window.getSelection();
 
     element.focus();
     is(sel.getRangeAt(0).startOffset, 0, "offset is zero");
 
     SpecialPowers.doCommand(window, "cmd_selectRight2");
     is(sel.toString(), "Some ",
--- a/editor/libeditor/tests/test_bug1154791.html
+++ b/editor/libeditor/tests/test_bug1154791.html
@@ -42,18 +42,18 @@ SimpleTest.waitForFocus(function() {
         onSpellCheck(div, function() {
           var sel = getSpellCheckSelection();
           is(sel.rangeCount, 2, "We should have two misspelled words");
           is(String(sel.getRangeAt(0)), "thiss", "Correct misspelled word");
           is(String(sel.getRangeAt(1)), "onee", "Correct misspelled word");
 
           SimpleTest.finish();
         });
-      },0);
-    },0);
+      }, 0);
+    }, 0);
   });
 });
 
 function getEditor() {
   var Ci = SpecialPowers.Ci;
   var editingSession = SpecialPowers.wrap(window).docShell.editingSession;
   return editingSession.getEditorForWindow(window);
 }
--- a/editor/libeditor/tests/test_bug1162952.html
+++ b/editor/libeditor/tests/test_bug1162952.html
@@ -16,28 +16,28 @@ https://bugzilla.mozilla.org/show_bug.cg
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 1162952 **/
 var userCallbackRun = false;
 
-document.addEventListener('keydown', function() {
+document.addEventListener("keydown", function() {
     // During a user callback, the commands should be enabled
     userCallbackRun = true;
-    is(true, document.queryCommandEnabled('cut'));
-    is(true, document.queryCommandEnabled('copy'));
+    is(true, document.queryCommandEnabled("cut"));
+    is(true, document.queryCommandEnabled("copy"));
 });
 
 // Otherwise, they should be disabled
-is(false, document.queryCommandEnabled('cut'));
-is(false, document.queryCommandEnabled('copy'));
+is(false, document.queryCommandEnabled("cut"));
+is(false, document.queryCommandEnabled("copy"));
 
 // Fire a user callback
-sendString('A');
+sendString("A");
 
 ok(userCallbackRun, "User callback should've been run");
 
 </script>
 </pre>
 </body>
 </html>
--- a/editor/libeditor/tests/test_bug1186799.html
+++ b/editor/libeditor/tests/test_bug1186799.html
@@ -27,47 +27,46 @@ SimpleTest.waitForFocus(function() {
   var editor = document.getElementById("editor");
   editor.focus();
 
   synthesizeCompositionChange(
     { "composition":
       { "string": "\u3042",
         "clauses":
         [
-          { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
-        ]
+          { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE },
+        ],
       },
-      "caret": { "start": 1, "length": 0 }
+      "caret": { "start": 1, "length": 0 },
     });
 
   ok(isThereIMESelection(), "There should be IME selection");
 
   var compositionEnd = false;
-  editor.addEventListener("compositionend", function () { compositionEnd = true; }, true);
+  editor.addEventListener("compositionend", function() { compositionEnd = true; }, true);
 
   synthesizeMouseAtCenter(span, {});
 
   ok(compositionEnd, "composition end should be fired at clicking outside of the editor");
   ok(!isThereIMESelection(), "There should be no IME selection");
 
   SimpleTest.finish();
 });
 
-function isThereIMESelection()
-{
+function isThereIMESelection() {
   var selCon = SpecialPowers.wrap(window).
         docShell.
         editingSession.
         getEditorForWindow(window).
         selectionController;
   const kIMESelections = [
     SpecialPowers.Ci.nsISelectionController.SELECTION_IME_RAWINPUT,
     SpecialPowers.Ci.nsISelectionController.SELECTION_IME_SELECTEDRAWTEXT,
     SpecialPowers.Ci.nsISelectionController.SELECTION_IME_CONVERTEDTEXT,
-    SpecialPowers.Ci.nsISelectionController.SELECTION_IME_SELECTEDCONVERTEDTEXT
+    SpecialPowers.Ci.nsISelectionController.SELECTION_IME_SELECTEDCONVERTEDTEXT,
   ];
   for (var i = 0; i < kIMESelections.length; i++) {
     var sel = selCon.getSelection(kIMESelections[i]);
     if (sel && sel.rangeCount) {
       return true;
     }
   }
   return false;
--- a/editor/libeditor/tests/test_bug1230473.html
+++ b/editor/libeditor/tests/test_bug1230473.html
@@ -13,30 +13,30 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1230473">Mozilla Bug 1230473</a>
 <input id="input">
 <textarea id="textarea"></textarea>
 <div id="div" contenteditable></div>
 <script type="application/javascript">
 /** Test for Bug 1230473 **/
 SimpleTest.waitForExplicitFinish();
-SimpleTest.waitForFocus(()=>{
+SimpleTest.waitForFocus(() => {
   function runTest(aEditor) {
     function committer() {
       aEditor.blur();
       aEditor.focus();
     }
     function isNSEditableElement() {
       return aEditor.tagName.toLowerCase() == "input" || aEditor.tagName.toLowerCase() == "textarea";
     }
     function value() {
       return isNSEditableElement() ? aEditor.value : aEditor.textContent;
     }
     function isComposing() {
-      return isNSEditableElement() ?  SpecialPowers.wrap(aEditor)
+      return isNSEditableElement() ? SpecialPowers.wrap(aEditor)
                                                    .editor
                                                    .composing :
                                       SpecialPowers.wrap(window)
                                                    .docShell
                                                    .editor
                                                    .composing;
     }
     function clear() {
--- a/editor/libeditor/tests/test_bug1248185.html
+++ b/editor/libeditor/tests/test_bug1248185.html
@@ -10,22 +10,21 @@ https://bugzilla.mozilla.org/show_bug.cg
   <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   SimpleTest.waitForExplicitFinish();
 
   // Avoid platform selection differences
   SimpleTest.waitForFocus(function() {
     SpecialPowers.pushPrefEnv({
-      "set": [["layout.word_select.eat_space_to_next_word", true]]
+      "set": [["layout.word_select.eat_space_to_next_word", true]],
     }, runTests);
   });
 
-  function runTests()
-  {
+  function runTests() {
     var editor = document.querySelector("#test");
     editor.focus();
 
     var sel = window.getSelection();
 
     SpecialPowers.doCommand(window, "cmd_moveRight2");
     SpecialPowers.doCommand(window, "cmd_moveRight2");
     SpecialPowers.doCommand(window, "cmd_moveRight2");
--- a/editor/libeditor/tests/test_bug1250010.html
+++ b/editor/libeditor/tests/test_bug1250010.html
@@ -16,18 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="test1" contenteditable><p><b><font color="red">1234567890</font></b></p></div>
 <div id="test2" contenteditable><p><tt>xyz</tt></p><p><tt><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAFklEQVQImWMwjWhCQwxECoW3oCHihAB0LyYv5/oAHwAAAABJRU5ErkJggg=="></tt></p></div>
 
 <pre id="test">
 </pre>
 
 <script class="testbody" type="application/javascript">
 
-function getImageDataURI()
-{
+function getImageDataURI() {
   return document.getElementsByTagName("img")[0].getAttribute("src");
 }
 
 /** Test for Bug 1250010 **/
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
 
   // First test: Empty paragraph is split correctly.
--- a/editor/libeditor/tests/test_bug1270235.html
+++ b/editor/libeditor/tests/test_bug1270235.html
@@ -13,33 +13,33 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1270235">Mozilla Bug 1270235</a>
 <p id="display"></p>
 <div id="content" style="display: none;"></div>
 
 <div id="edit1" contenteditable="true"><p>AB</p></div>
 <script type="application/javascript">
 SimpleTest.waitForExplicitFinish();
-SimpleTest.waitForFocus(()=>{
-  let element = document.getElementById('edit1');
+SimpleTest.waitForFocus(() => {
+  let element = document.getElementById("edit1");
   element.focus();
   let textNode = element.firstChild.firstChild;
   let node = textNode.splitText(0);
   node.parentNode.removeChild(node);
 
-  ok(!node.parentNode, 'parent must be null');
+  ok(!node.parentNode, "parent must be null");
 
-  let  newRange = document.createRange();
+  let newRange = document.createRange();
   newRange.setStart(node, 0);
   newRange.setEnd(node, 0);
   let selection = document.getSelection();
   selection.removeAllRanges();
   selection.addRange(newRange);
 
-  ok(selection.isCollapsed, 'isCollapsed must be true');
+  ok(selection.isCollapsed, "isCollapsed must be true");
 
   // Don't crash by user input
   sendString("X");
 
   SimpleTest.finish();
 });
 </script>
 </body>
--- a/editor/libeditor/tests/test_bug1310912.html
+++ b/editor/libeditor/tests/test_bug1310912.html
@@ -27,56 +27,56 @@ SimpleTest.waitForFocus(function() {
   elm.focus();
   let sel = window.getSelection();
   sel.collapse(elm.childNodes[0], elm.textContent.length);
 
   synthesizeCompositionChange({
     composition: {
       string: "DEF",
       clauses: [
-        { length: 3, attr: COMPOSITION_ATTR_RAW_CLAUSE }
-      ]
+        { length: 3, attr: COMPOSITION_ATTR_RAW_CLAUSE },
+      ],
     },
-    caret: { start: 3, length: 0 }
+    caret: { start: 3, length: 0 },
   });
   ok(elm.textContent == "ABCDEF", "composing text should be set");
 
   window.getSelection().getRangeAt(0).insertNode(document.createTextNode(""));
   synthesizeCompositionChange({
     composition: {
       string: "GHI",
       clauses: [
-        { length: 3, attr: COMPOSITION_ATTR_CONVERTED_CLAUSE }
-      ]
+        { length: 3, attr: COMPOSITION_ATTR_CONVERTED_CLAUSE },
+      ],
     },
-    caret: { start: 0, length: 0 }
+    caret: { start: 0, length: 0 },
   });
   ok(elm.textContent == "ABCGHI", "composing text should be replaced");
 
   window.getSelection().getRangeAt(0).insertNode(document.createTextNode(""));
   synthesizeCompositionChange({
     composition: {
       string: "JKL",
       clauses: [
-        { length: 3, attr: COMPOSITION_ATTR_CONVERTED_CLAUSE }
-      ]
+        { length: 3, attr: COMPOSITION_ATTR_CONVERTED_CLAUSE },
+      ],
     },
-    caret: { start: 0, length: 0 }
+    caret: { start: 0, length: 0 },
   });
   ok(elm.textContent == "ABCJKL", "composing text should be replaced");
 
   window.getSelection().getRangeAt(0).insertNode(document.createTextNode(""));
   synthesizeCompositionChange({
     composition: {
       string: "MNO",
       clauses: [
-        { length: 3, attr: COMPOSITION_ATTR_CONVERTED_CLAUSE }
-      ]
+        { length: 3, attr: COMPOSITION_ATTR_CONVERTED_CLAUSE },
+      ],
     },
-    caret: { start: 1, length: 0 }
+    caret: { start: 1, length: 0 },
   });
   ok(elm.textContent == "ABCMNO", "composing text should be replaced");
 
   window.getSelection().getRangeAt(0).insertNode(document.createTextNode(""));
   synthesizeComposition({ type: "compositioncommitasis" });
   ok(elm.textContent == "ABCMNO", "composing text should be committed");
 
   synthesizeKey("Z", { accelKey: true });
--- a/editor/libeditor/tests/test_bug1315065.html
+++ b/editor/libeditor/tests/test_bug1315065.html
@@ -11,17 +11,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1315065">Mozilla Bug 1315065</a>
 <div contenteditable><p>abc<br></p></div>
 <script type="application/javascript">
 /** Test for Bug 1315065 **/
 SimpleTest.waitForExplicitFinish();
-SimpleTest.waitForFocus(()=>{
+SimpleTest.waitForFocus(() => {
   var editor = document.getElementsByTagName("div")[0];
   function initForBackspace(aSelectionCollapsedTo /* = 0 ~ 3 */) {
     editor.innerHTML = "<p id='p'>abc<br></p>";
     var p = document.getElementById("p");
     // FYI: We cannot inserting empty text nodes as expected with
     //      Node.appendChild() nor Node.insertBefore(). Therefore, let's use
     //      Range.insertNode() like actual web apps.
     var selection = window.getSelection();
--- a/editor/libeditor/tests/test_bug1316302.html
+++ b/editor/libeditor/tests/test_bug1316302.html
@@ -13,17 +13,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1316302">Mozilla Bug 1316302</a>
 <div contenteditable>
 <blockquote><p>abc</p></blockquote>
 </div>
 <script type="application/javascript">
 /** Test for Bug 1316302 **/
 SimpleTest.waitForExplicitFinish();
-SimpleTest.waitForFocus(()=>{
+SimpleTest.waitForFocus(() => {
   var editor = document.getElementsByTagName("div")[0];
   var blockquote = document.getElementsByTagName("blockquote")[0];
   var selection = window.getSelection();
 
   editor.focus();
 
   // Try to remove the last character from the end of the <blockquote>
   selection.collapse(blockquote, blockquote.childNodes.length);
--- a/editor/libeditor/tests/test_bug1318312.html
+++ b/editor/libeditor/tests/test_bug1318312.html
@@ -12,18 +12,17 @@
 <div id="outerEditor" contenteditable><p>content of outer editor</p>
 <div id="staticInEditor" contenteditable="false"><p>static content of outer editor</p>
 <div id="innerEditor" contenteditable><p>content of inner editor</p></div></div></div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 var outerEditor = document.getElementById("outerEditor");
 
-function runTests()
-{
+function runTests() {
   outerEditor.focus();
   is(document.activeElement, outerEditor,
      "outerEditor should have focus");
 
   // Move cursor into the innerEditor with ArrowDown key.  Then, focus shouldn't
   // be moved to innerEditor from outerEditor.
   // Note that Chrome moves focus in this case.  However, we should do that
   // at least for now because user can move focus with ArrowUp key even from
--- a/editor/libeditor/tests/test_bug1330796.html
+++ b/editor/libeditor/tests/test_bug1330796.html
@@ -50,17 +50,17 @@ var tests = [
   [ "<span _moz_quote=true>&gt; mailcite<br></span>", 0,
     "x<br><span>&gt; mailcite<br></span>" ],
   [ "<span _moz_quote=true>&gt; mailcite<br></span>", 5,
     "<span>&gt; mai</span><br>x<br><span>lcite<br></span>" ],
   [ "<span _moz_quote=true>&gt; mailcite<br></span>", 10,
     "<span>&gt; mailcite<br></span>x<br>" ],
   // No <br> at the end to simulate prior deletion to the end of the quote.
   [ "<span _moz_quote=true>&gt; mailcite</span>", 10,
-    "<span>&gt; mailcite</span><br>x<br>" ]
+    "<span>&gt; mailcite</span><br>x<br>" ],
 ];
 
 /** Test for Bug 1330796 **/
 
 SimpleTest.waitForExplicitFinish();
 
 SimpleTest.waitForFocus(function() {
 
--- a/editor/libeditor/tests/test_bug1332876.html
+++ b/editor/libeditor/tests/test_bug1332876.html
@@ -21,29 +21,29 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 
 <script type="application/javascript">
 
 /** Test for Bug 1332876 **/
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
   var iframe = document.querySelector("iframe");
-  iframe.contentDocument.designMode='on';
+  iframe.contentDocument.designMode = "on";
 
-  iframe.contentWindow.addEventListener('keypress', function() {
-    iframe.style.display='none';
+  iframe.contentWindow.addEventListener("keypress", function() {
+    iframe.style.display = "none";
     document.body.offsetHeight;
     ok(true, "did not crash");
     SimpleTest.finish();
   });
 
-  iframe.contentWindow.addEventListener('click', function() {
-    synthesizeKey('a', {}, iframe.contentWindow);
+  iframe.contentWindow.addEventListener("click", function() {
+    synthesizeKey("a", {}, iframe.contentWindow);
   });
 
-  synthesizeMouse(iframe,20,20,{})
+  synthesizeMouse(iframe, 20, 20, {});
 });
 
 </script>
 
 </pre>
 </body>
 </html>
--- a/editor/libeditor/tests/test_bug1352799.html
+++ b/editor/libeditor/tests/test_bug1352799.html
@@ -20,63 +20,63 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 1352799 **/
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(() => {
   var input = document.getElementById("input");
 
-  var inputcontainer = document.getElementById('input-container');
-  input.setAttribute('maxlength', 2);
-  inputcontainer.style.display = 'block';
+  var inputcontainer = document.getElementById("input-container");
+  input.setAttribute("maxlength", 2);
+  inputcontainer.style.display = "block";
 
   input.focus();
 
   sendString("123");
 
-  is(input.value, '12', 'value should be 12 with maxlength = 2');
+  is(input.value, "12", "value should be 12 with maxlength = 2");
 
-  input.value = '';
-  inputcontainer.style.display = 'none';
+  input.value = "";
+  inputcontainer.style.display = "none";
 
   window.setTimeout(() => {
-    input.setAttribute('maxlength', 4);
-    inputcontainer.style.display = 'block';
+    input.setAttribute("maxlength", 4);
+    inputcontainer.style.display = "block";
 
     input.focus();
 
     sendString("45678");
 
-    is(input.value, '4567', 'value should be 4567 with maxlength = 4');
+    is(input.value, "4567", "value should be 4567 with maxlength = 4");
 
-    inputcontainer.style.display = 'none';
+    inputcontainer.style.display = "none";
 
     window.setTimeout(() => {
-      input.setAttribute('maxlength', 2);
-      inputcontainer.style.display = 'block';
+      input.setAttribute("maxlength", 2);
+      inputcontainer.style.display = "block";
 
       input.focus();
 
       sendString("12");
 
-      todo_is(input.value, '45', 'value should be 45 with maxlength = 2');
+      todo_is(input.value, "45", "value should be 45 with maxlength = 2");
 
-      input.value = '';
-      inputcontainer.style.display = 'none';
+      input.value = "";
+      inputcontainer.style.display = "none";
 
       window.setTimeout(() => {
-        input.removeAttribute('maxlength');
-        inputcontainer.style.display = 'block';
+        input.removeAttribute("maxlength");
+        inputcontainer.style.display = "block";
 
         input.focus();
 
         sendString("12345678");
 
-        is(input.value, '12345678', 'value should be 12345678 without maxlength');
+        is(input.value, "12345678", "value should be 12345678 without maxlength");
 
         SimpleTest.finish();
       }, 0);
     }, 0);
   }, 0);
 });
 </script>
 </pre>
--- a/editor/libeditor/tests/test_bug1358025.html
+++ b/editor/libeditor/tests/test_bug1358025.html
@@ -26,74 +26,74 @@ SimpleTest.waitForFocus(() => {
 
   // Create undo transaction
   SpecialPowers.wrap(input).setUserInput("XXX");
   SpecialPowers.wrap(input).setUserInput("");
 
   // Enable undo because this is user input
   SpecialPowers.wrap(input).setUserInput("");
   is(input.value, "", "value is empty");
-  ok(controller.isCommandEnabled('cmd_undo'),
+  ok(controller.isCommandEnabled("cmd_undo"),
      "Undo is enabled by same empty string");
 
   SpecialPowers.wrap(input).setUserInput("ABC");
   is(input.value, "ABC", "value is ABC");
-  ok(controller.isCommandEnabled('cmd_undo'), "Undo is enabled by a string");
+  ok(controller.isCommandEnabled("cmd_undo"), "Undo is enabled by a string");
 
   SpecialPowers.wrap(input).setUserInput("ABC");
   is(input.value, "ABC", "value is ABC");
-  ok(controller.isCommandEnabled('cmd_undo'), "Undo is enabled by same string");
+  ok(controller.isCommandEnabled("cmd_undo"), "Undo is enabled by same string");
 
   SpecialPowers.wrap(input).setUserInput("DEF");
   is(input.value, "DEF", "value is DEF");
-  ok(controller.isCommandEnabled('cmd_undo'),
+  ok(controller.isCommandEnabled("cmd_undo"),
      "Undo is enabled by different string");
 
   SpecialPowers.wrap(input).setUserInput("");
   is(input.value, "", "value is empty");
-  ok(controller.isCommandEnabled('cmd_undo'),
+  ok(controller.isCommandEnabled("cmd_undo"),
      "Undo is enabled by empty string");
 
   // disable undo because this is by script
 
   // But Edge and Chrome still turn on undo when setting empty value from
   // empty value.  So we are same behaviour for this case.
   input.value = "";
-  is (input.value, "", "value is empty");
-  ok(controller.isCommandEnabled('cmd_undo'),
+  is(input.value, "", "value is empty");
+  ok(controller.isCommandEnabled("cmd_undo"),
      "Undo is still enabled by same empty string");
 
   input.value = "ABC";
   is(input.value, "ABC", "value is ABC");
-  ok(!controller.isCommandEnabled('cmd_undo'), "Undo is disabled by a string");
+  ok(!controller.isCommandEnabled("cmd_undo"), "Undo is disabled by a string");
 
   // When setting same value by script, all browsers (Edge, Safari and Chrome)
   // keep undo state.
   input.value = "";
   SpecialPowers.wrap(input).setUserInput("ABC");
-  ok(controller.isCommandEnabled('cmd_undo'), "Undo is enabled");
+  ok(controller.isCommandEnabled("cmd_undo"), "Undo is enabled");
   input.value = "ABC";
   is(input.value, "ABC", "value is ABC");
-  ok(controller.isCommandEnabled('cmd_undo'),
+  ok(controller.isCommandEnabled("cmd_undo"),
      "Undo is still enabled by same string");
 
   input.value = "";
   SpecialPowers.wrap(input).setUserInput("ABC");
-  ok(controller.isCommandEnabled('cmd_undo'), "Undo is enabled");
+  ok(controller.isCommandEnabled("cmd_undo"), "Undo is enabled");
   input.value = "DEF";
   is(input.value, "DEF", "value is DEF");
-  ok(!controller.isCommandEnabled('cmd_undo'),
+  ok(!controller.isCommandEnabled("cmd_undo"),
      "Undo is disabled by different string");
 
   input.value = "";
   SpecialPowers.wrap(input).setUserInput("DEF");
-  ok(controller.isCommandEnabled('cmd_undo'), "Undo is enabled");
+  ok(controller.isCommandEnabled("cmd_undo"), "Undo is enabled");
   input.value = "";
   is(input.value, "", "value is empty");
-  ok(!controller.isCommandEnabled('cmd_undo'),
+  ok(!controller.isCommandEnabled("cmd_undo"),
      "Undo is disabled by empty string");
 
   SimpleTest.finish();
 }, window);
 </script>
 </pre>
 </body>
 </html>
--- a/editor/libeditor/tests/test_bug1361008.html
+++ b/editor/libeditor/tests/test_bug1361008.html
@@ -17,45 +17,45 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <div contenteditable="true" id="edit2">
   <br>
 </div>
 <pre id="test">
 <script type="application/javascript">
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(() => {
-  document.execCommand("defaultparagraphseparator", false, "div")
+  document.execCommand("defaultparagraphseparator", false, "div");
   let edit1 = document.getElementById("edit1");
   edit1.focus();
   let selection = window.getSelection();
   // Insert text before BR element
   selection.collapse(edit1, 0);
   sendString("AB");
   synthesizeKey("KEY_Enter");
   // count <div> element into contenteidable
-  is(edit1.getElementsByTagName('div').length, 2,
+  is(edit1.getElementsByTagName("div").length, 2,
      "DIV element should be 2 children");
-  is(edit1.getElementsByTagName('div')[0].innerText,
+  is(edit1.getElementsByTagName("div")[0].innerText,
      "AB", "AB should be in 1st DIV element");
-  is(edit1.getElementsByTagName('div')[1].innerHTML,
+  is(edit1.getElementsByTagName("div")[1].innerHTML,
      "<br>", "BR element should be in 2nd DIV element");
 
-  document.execCommand("defaultparagraphseparator", false, "p")
+  document.execCommand("defaultparagraphseparator", false, "p");
   let edit2 = document.getElementById("edit2");
   edit2.focus();
   selection.collapse(edit2, 0);
   // Insert text before BR element
   sendString("AB");
   synthesizeKey("KEY_Enter");
 
-  is(edit2.getElementsByTagName('p').length, 2,
+  is(edit2.getElementsByTagName("p").length, 2,
      "P element should be 2 children");
-  is(edit2.getElementsByTagName('p')[0].innerText,
+  is(edit2.getElementsByTagName("p")[0].innerText,
      "AB", "AB should be in 1st P element");
-  is(edit2.getElementsByTagName('p')[1].innerHTML,
+  is(edit2.getElementsByTagName("p")[1].innerHTML,
      "<br>", "BR element should be into 2nd P element");
 
   SimpleTest.finish();
 });
 </script>
 </pre>
 </body>
 </html>
--- a/editor/libeditor/tests/test_bug1361052.html
+++ b/editor/libeditor/tests/test_bug1361052.html
@@ -12,24 +12,24 @@
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 <script class="testbody" type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
 SimpleTest.waitForFocus(() => {
-  var strike = document.createElement('strike');
+  var strike = document.createElement("strike");
   strike.contentEditable = true;
   document.documentElement.appendChild(strike);
 
-  var textarea = document.createElement('textarea');
+  var textarea = document.createElement("textarea");
   document.documentElement.appendChild(textarea);
 
-  var h5 = document.createElement('h5');
+  var h5 = document.createElement("h5");
   strike.appendChild(h5);
 
   textarea.setCustomValidity("A");
   document.documentElement.dir = "rtl";
   document.designMode = "on";
   document.execCommand("styleWithCSS", false, true);
   document.designMode = "off";
   textarea.reportValidity();
--- a/editor/libeditor/tests/test_bug1368544.html
+++ b/editor/libeditor/tests/test_bug1368544.html
@@ -17,17 +17,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 <script class="testbody" type="application/javascript">
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(() => {
   let textarea = document.getElementById("textarea");
   let editor = SpecialPowers.wrap(textarea).editor;
 
   let spellChecker =
-    SpecialPowers.Cc['@mozilla.org/editor/editorspellchecker;1']
+    SpecialPowers.Cc["@mozilla.org/editor/editorspellchecker;1"]
     .createInstance(SpecialPowers.Ci.nsIEditorSpellCheck);
   spellChecker.InitSpellChecker(editor, false);
 
   textarea.focus();
 
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm")
   .onSpellCheck(textarea, () => {
--- a/editor/libeditor/tests/test_bug1394758.html
+++ b/editor/libeditor/tests/test_bug1394758.html
@@ -21,18 +21,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 611182 **/
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
-  var editable = document.getElementById('editable');
-  var span = document.getElementById('span');
+  var editable = document.getElementById("editable");
+  var span = document.getElementById("span");
   var beforeSpan = span.textContent;
 
   editable.focus();
   window.getSelection().collapse(span.nextSibling, 0);
 
   synthesizeKey("KEY_ArrowRight");
   synthesizeKey("KEY_ArrowRight");
   synthesizeKey("KEY_ArrowRight");
--- a/editor/libeditor/tests/test_bug1409520.html
+++ b/editor/libeditor/tests/test_bug1409520.html
@@ -23,17 +23,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 <script class="testbody" type="application/javascript">
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
   var selection = window.getSelection();
   var editor = document.getElementById("editor");
   editor.focus();
   selection.collapse(editor, 0);
-  document.execCommand('insertText', false, 'A');
+  document.execCommand("insertText", false, "A");
   is(editor.firstChild.textContent, "A",
      "'A' should be inserted at start of the editor");
   is(editor.firstChild.nextSibling.tagName, "SELECT",
      "<select> element shouldn't be removed by inserting 'A'");
   is(selection.getRangeAt(0).startContainer, editor.firstChild,
      "Caret should be moved after 'A'");
   is(selection.getRangeAt(0).startOffset, 1,
      "Caret should be moved after 'A'");
--- a/editor/libeditor/tests/test_bug1425997.html
+++ b/editor/libeditor/tests/test_bug1425997.html
@@ -40,17 +40,17 @@ SimpleTest.waitForFocus(function() {
     //   after 3rd delete: "\n<!-- -->\n"
     while (editor.innerHTML.includes("&nbsp;")) {
       document.execCommand("delete", false);
     }
   }
   editor.addEventListener("DOMCharacterDataModified", onCharacterDataModified, { once: true });
   editor.focus();
   selection.selectAllChildren(document.getElementById("inline"));
-  document.execCommand('insertHTML', false, 'text');
+  document.execCommand("insertHTML", false, "text");
   // This expected result is just same as the result of Chrome.
   // If the spec says this is wrong, feel free to change this result.
   todo_is(editor.innerHTML, "\n<!-- --><span id=\"inline\">text</span>",
           "The 'foo' should be replaced with 'text' and whitespaces before the span element should be removed");
   SimpleTest.finish();
 });
 </script>
 </pre>
--- a/editor/libeditor/tests/test_bug290026.html
+++ b/editor/libeditor/tests/test_bug290026.html
@@ -16,17 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 290026 **/
 SimpleTest.waitForExplicitFinish();
 
 var editor = document.getElementById("editor");
-editor.innerHTML = '<p></p><ul><li>Item 1</li><li>Item 2</li></ul><p></p>';
+editor.innerHTML = "<p></p><ul><li>Item 1</li><li>Item 2</li></ul><p></p>";
 editor.focus();
 
 addLoadEvent(function() {
   document.execCommand("stylewithcss", false, "true");
   var sel = window.getSelection();
   sel.removeAllRanges();
   var lis = document.getElementsByTagName("li");
   var range = document.createRange();
--- a/editor/libeditor/tests/test_bug291780.html
+++ b/editor/libeditor/tests/test_bug291780.html
@@ -33,17 +33,17 @@ addLoadEvent(function() {
   var range = document.createRange();
   range.setStart(lis[1], 0);
   range.setEnd(lis[2], lis[2].childNodes.length);
   sel.addRange(range);
   document.execCommand("indent", false, false);
   var expected = '<ul style="margin-left: 40px;"><li>Item 1</li><ul><li>Item 2</li><li>Item 3</li></ul><li>Item 4</li></ul>';
   is(editor.innerHTML, expected, "indenting part of an already indented bulleted list");
   document.execCommand("outdent", false, false);
-  is(editor.innerHTML, original, "outdenting the partially indented part of an already indented bulleted list"); 
+  is(editor.innerHTML, original, "outdenting the partially indented part of an already indented bulleted list");
 
   // done
   SimpleTest.finish();
 });
 
 </script>
 </pre>
 </body>
--- a/editor/libeditor/tests/test_bug318065.html
+++ b/editor/libeditor/tests/test_bug318065.html
@@ -35,17 +35,17 @@ https://bugzilla.mozilla.org/show_bug.cg
                         "Undo of typing",
                         "Redo of typing"];
         var step = 0;
 
         function onInput() {
           is(this.value, expectedValues[step], messages[step]);
           step++;
           if (step == expectedValues.length) {
-            this.removeEventListener("input", onInput); 
+            this.removeEventListener("input", onInput);
             SimpleTest.finish();
           }
         }
 
         var input = document.getElementById("t1");
         input.addEventListener("input", onInput);
         var input2 = document.getElementById("t2");
         input2.addEventListener("input", onInput);
--- a/editor/libeditor/tests/test_bug358033.html
+++ b/editor/libeditor/tests/test_bug358033.html
@@ -16,17 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <input type="text" id="input1">
 </div>
 <pre id="test">
 <script>
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
   let input = document.getElementById("input1");
 
-  input.value = "ABC DEF"
+  input.value = "ABC DEF";
   input.focus();
   input.setSelectionRange(4, 7, "backward");
   synthesizeKey("KEY_Backspace");
   is(input.value, "ABC ", "KEY_Backspace should remove selected string");
   synthesizeKey("Z", { accelKey: true });
   is(input.value, "ABC DEF", "Undo should restore string");
   synthesizeKey("KEY_ArrowLeft", { shiftKey: true });
   synthesizeKey("KEY_ArrowLeft", { shiftKey: true });
--- a/editor/libeditor/tests/test_bug366682.html
+++ b/editor/libeditor/tests/test_bug366682.html
@@ -21,17 +21,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 /** Test for Bug 366682 **/
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
 
 var gMisspeltWords;
 
 function getEdit() {
-  return document.getElementById('edit');
+  return document.getElementById("edit");
 }
 
 function editDoc() {
   return getEdit().contentDocument;
 }
 
 function getEditor() {
   var Ci = SpecialPowers.Ci;
--- a/editor/libeditor/tests/test_bug404320.html
+++ b/editor/libeditor/tests/test_bug404320.html
@@ -20,35 +20,32 @@ https://bugzilla.mozilla.org/show_bug.cg
 /** Test for Bug 404320 **/
 
 SimpleTest.waitForExplicitFinish();
 
 function runTests() {
   var win = document.getElementById("testIframe").contentWindow;
   var doc = document.getElementById("testIframe").contentDocument;
 
-  function testFormatBlock(tag, withAngleBrackets, shouldSucceed)
-  {
+  function testFormatBlock(tag, withAngleBrackets, shouldSucceed) {
     win.getSelection().selectAllChildren(doc.body.firstChild);
     doc.execCommand("FormatBlock", false,
                     withAngleBrackets ? tag : "<" + tag + ">");
     var resultNode;
     if (shouldSucceed && (tag == "dd" || tag == "dt")) {
       is(doc.body.firstChild.tagName, "DL", "tag was changed");
       resultNode = doc.body.firstChild.firstChild;
-    }
-    else {
+    } else {
       resultNode = doc.body.firstChild;
     }
 
     is(resultNode.tagName, shouldSucceed ? tag.toUpperCase() : "P", "tag was changed");
   }
 
-  function formatBlockTests(tags, shouldSucceed)
-  {
+  function formatBlockTests(tags, shouldSucceed) {
     var html = "<p>Content</p>";
     for (var i = 0; i < tags.length; ++i) {
       var tag = tags[i];
       var resultTag = tag.toUpperCase();
 
       doc.body.innerHTML = html;
       testFormatBlock(tag, false, shouldSucceed);
 
--- a/editor/libeditor/tests/test_bug408231.html
+++ b/editor/libeditor/tests/test_bug408231.html
@@ -51,17 +51,17 @@ https://bugzilla.mozilla.org/show_bug.cg
       ["selectall", "true"],
       ["strikethrough", "true"],
       ["styleWithCSS", "true"],
       ["subscript", "true"],
       ["superscript", "true"],
       ["underline", "true"],
       ["undo", "false"],
       ["unlink", "true"],
-      ["not-a-command", "false"]
+      ["not-a-command", "false"],
     ];
 
     var commandIndetermResults = [
       ["contentReadOnly", "false"],
       ["copy", "false"],
       ["createlink", "false"],
       ["cut", "false"],
       ["decreasefontsize", "false"],
@@ -80,30 +80,30 @@ https://bugzilla.mozilla.org/show_bug.cg
       ["insertunorderedlist", "false"],
       ["insertparagraph", "false"],
       ["italic", "false"],
       ["justifycenter", "false"],
       ["justifyfull", "false"],
       ["justifyleft", "false"],
       ["justifyright", "false"],
       ["outdent", "false"],
-      //["paste", "false"],
+      // ["paste", "false"],
       ["redo", "false"],
       ["removeformat", "false"],
       ["selectall", "false"],
       ["strikethrough", "false"],
       ["styleWithCSS", "false"],
       ["subscript", "false"],
       ["superscript", "false"],
       ["underline", "false"],
       ["undo", "false"],
       ["unlink", "false"],
-      ["not-a-command", "false"]
+      ["not-a-command", "false"],
     ];
-    
+
     var commandStateResults = [
       ["contentReadOnly", "false"],
       ["copy", "false"],
       ["createlink", "false"],
       ["cut", "false"],
       ["decreasefontsize", "false"],
       ["delete", "false"],
       ["fontname", "false"],
@@ -120,30 +120,30 @@ https://bugzilla.mozilla.org/show_bug.cg
       ["insertunorderedlist", "false"],
       ["insertparagraph", "false"],
       ["italic", "false"],
       ["justifycenter", "false"],
       ["justifyfull", "false"],
       ["justifyleft", "true"],
       ["justifyright", "false"],
       ["outdent", "false"],
-      //["paste", "false"],
+      // ["paste", "false"],
       ["redo", "false"],
       ["removeformat", "false"],
       ["selectall", "false"],
       ["strikethrough", "false"],
       ["styleWithCSS", "false"],
       ["subscript", "false"],
       ["superscript", "false"],
       ["underline", "false"],
       ["undo", "false"],
       ["unlink", "false"],
-      ["not-a-command", "false"]
+      ["not-a-command", "false"],
     ];
-    
+
     var commandValueResults = [
       ["contentReadOnly", ""],
       ["copy", ""],
       ["createlink", ""],
       ["cut", ""],
       ["decreasefontsize", ""],
       ["delete", ""],
       ["fontname", "serif"],
@@ -160,91 +160,91 @@ https://bugzilla.mozilla.org/show_bug.cg
       ["insertunorderedlist", ""],
       ["insertparagraph", ""],
       ["italic", ""],
       ["justifycenter", "left"],
       ["justifyfull", "left"],
       ["justifyleft", "left"],
       ["justifyright", "left"],
       ["outdent", ""],
-      //["paste", ""],
+      // ["paste", ""],
       ["redo", ""],
       ["removeformat", ""],
       ["selectall", ""],
       ["strikethrough", ""],
       ["styleWithCSS", ""],
       ["subscript", ""],
       ["superscript", ""],
       ["underline", ""],
       ["undo", ""],
       ["unlink", ""],
       ["not-a-command", ""],
     ];
-    
-  
+
+
     function callQueryCommandEnabled(cmdName) {
       var result;
       try {
-        result = '' + document.queryCommandEnabled( cmdName );
-      } catch( error ) {
-        result = 'name' in error ? error.name : 'exception';
+        result = "" + document.queryCommandEnabled( cmdName );
+      } catch ( error ) {
+        result = "name" in error ? error.name : "exception";
       }
       return result;
     }
 
     function callQueryCommandIndeterm(cmdName) {
       var result;
       try {
-        result = '' + document.queryCommandIndeterm( cmdName );
-      } catch( error ) {
-        result = 'name' in error ? error.name : 'exception';
+        result = "" + document.queryCommandIndeterm( cmdName );
+      } catch ( error ) {
+        result = "name" in error ? error.name : "exception";
       }
       return result;
     }
-    
+
     function callQueryCommandState(cmdName) {
       var result;
       try {
-        result = '' + document.queryCommandState( cmdName );
-      } catch( error ) {
-        result = 'name' in error ? error.name : 'exception';
+        result = "" + document.queryCommandState( cmdName );
+      } catch ( error ) {
+        result = "name" in error ? error.name : "exception";
       }
       return result;
     }
 
     function callQueryCommandValue(cmdName) {
       var result;
       try {
-        result = '' + document.queryCommandValue( cmdName );
-      } catch( error ) {
-        result = 'name' in error ? error.name : 'exception';
+        result = "" + document.queryCommandValue( cmdName );
+      } catch ( error ) {
+        result = "name" in error ? error.name : "exception";
       }
-      return result;    
+      return result;
     }
 
     function testQueryCommand(expectedResults, fun, funName) {
-      for (i=0; i<expectedResults.length; i++) {
+      for (i = 0; i < expectedResults.length; i++) {
         var commandName = expectedResults[i][0];
         var expectedResult = expectedResults[i][1];
         var result = fun(commandName);
-        ok(result == expectedResult, funName + '('+commandName+') result=' +result+ ' expected=' + expectedResult);
+        ok(result == expectedResult, funName + "(" + commandName + ") result=" + result + " expected=" + expectedResult);
       }
     }
 
     function runTests() {
-      document.designMode='on';
+      document.designMode = "on";
       window.getSelection().collapse(document.body, 0);
       testQueryCommand(commandEnabledResults, callQueryCommandEnabled, "queryCommandEnabled");
       testQueryCommand(commandIndetermResults, callQueryCommandIndeterm, "queryCommandIndeterm");
       testQueryCommand(commandStateResults, callQueryCommandState, "queryCommandState");
       testQueryCommand(commandValueResults, callQueryCommandValue, "queryCommandValue");
-      document.designMode='off';
+      document.designMode = "off";
       SimpleTest.finish();
     }
-    
+
     window.onload = runTests;
     SimpleTest.waitForExplicitFinish();
 
 </script>
 </pre>
 </body>
 </html>
 
--- a/editor/libeditor/tests/test_bug414526.html
+++ b/editor/libeditor/tests/test_bug414526.html
@@ -13,35 +13,31 @@
 <pre id="test">
 </pre>
 
 <script class="testbody" type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTests);
 
-function runTests()
-{
+function runTests() {
 
   var container = document.getElementById("display");
 
-  function reset()
-  {
+  function reset() {
     document.execCommand("Undo", false, null);
   }
 
   var selection = window.getSelection();
-  function moveCaretToStartOf(aEditor)
-  {
+  function moveCaretToStartOf(aEditor) {
     selection.selectAllChildren(aEditor);
     selection.collapseToStart();
   }
 
-  function moveCaretToEndOf(aEditor)
-  {
+  function moveCaretToEndOf(aEditor) {
     selection.selectAllChildren(aEditor);
     selection.collapseToEnd();
   }
 
   /* TestCase #1
    */
   const kTestCase1 =
     "<p id=\"editor1\" contenteditable=\"true\">editor1</p>" +
--- a/editor/libeditor/tests/test_bug417418.html
+++ b/editor/libeditor/tests/test_bug417418.html
@@ -26,24 +26,24 @@ https://bugzilla.mozilla.org/show_bug.cg
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTest);
 
 function resetSelection() {
   window.getSelection().collapse(document.getElementById("coin"), 0);
 }
 
 function runTest() {
-    var rightClickDown = {type: 'mousedown', button: 2},
-        rightClickUp = {type: 'mouseup', button: 2},
-        singleClickDown = {type: 'mousedown', button: 0},
-        singleClickUp = {type: 'mouseup', button: 0};
+    var rightClickDown = {type: "mousedown", button: 2},
+        rightClickUp = {type: "mouseup", button: 2},
+        singleClickDown = {type: "mousedown", button: 0},
+        singleClickUp = {type: "mouseup", button: 0};
     var selection = window.getSelection();
 
-    var div = document.getElementById('display');
-    var img = document.getElementById('img');
+    var div = document.getElementById("display");
+    var img = document.getElementById("img");
     var divRect = div.getBoundingClientRect();
     var imgselected;
 
     resetSelection();
     synthesizeMouse(div, divRect.width - 1, divRect.height - 1, rightClickDown);
     synthesizeMouse(div, divRect.width - 1, divRect.height - 1, rightClickUp);
     ok(selection.isCollapsed, "selection is not collapsed");
 
--- a/editor/libeditor/tests/test_bug430392.html
+++ b/editor/libeditor/tests/test_bug430392.html
@@ -35,59 +35,59 @@ function test() {
     getSelection().collapse(edit.firstChild, 0);
     synthesizeKey("KEY_ArrowRight");
     synthesizeKey("KEY_Enter");
     synthesizeKey("KEY_Enter");
     synthesizeKey("KEY_Backspace");
     synthesizeKey("KEY_Backspace");
   // For some reason this test fails if the separator is not "br"
   }, () => document.queryCommandValue("defaultParagraphSeparator") == "br"
-           ?  undefined : " A; B ; C "],
+           ? undefined : " A; B ; C "],
   ["adding shift-returns", () => {
     getSelection().collapse(edit.firstChild, 0);
     synthesizeKey("KEY_ArrowRight");
     synthesizeKey("KEY_Enter", {shiftKey: true});
     synthesizeKey("KEY_Enter", {shiftKey: true});
     synthesizeKey("KEY_Backspace");
     synthesizeKey("KEY_Backspace");
   }, "A ; B ; C "]];
   [
     "insertorderedlist",
     "insertunorderedlist",
     ["formatblock", "p"],
   ]
   .forEach(item => {
       var cmd = Array.isArray(item) ? item[0] : item;
       var param = Array.isArray(item) ? item[1] : "";
-      tests.push([cmd, () => { document.execCommand(cmd, false, param) }]);
+      tests.push([cmd, () => { document.execCommand(cmd, false, param); }]);
    });
   // These are all TODO -- they don't move the non-editable elements
   [
     "bold",
     "italic",
     "underline",
     "strikethrough",
     "subscript",
     "superscript",
     ["forecolor", "blue"],
     ["backcolor", "blue"],
     ["hilitecolor", "blue"],
     ["fontname", "monospace"],
     ["fontsize", "1"],
     "justifyright",
     "justifycenter",
-    "justifyfull"
+    "justifyfull",
   ]
   .forEach(item => {
       var cmd = Array.isArray(item) ? item[0] : item;
       var param = Array.isArray(item) ? item[1] : "";
-      tests.push([cmd, () => { document.execCommand(cmd, false, param) },
+      tests.push([cmd, () => { document.execCommand(cmd, false, param); },
                   " A ;  ; BC "]);
    });
-  tests.push(["indent", () => { document.execCommand("indent") },
+  tests.push(["indent", () => { document.execCommand("indent"); },
               "  ;  ;  ABC"]);
   tests.forEach(arr => {
     ["div", "br", "p"].forEach(sep => {
       document.execCommand("defaultParagraphSeparator", false, sep);
 
       var expectedFailText = typeof arr[2] == "function" ? arr[2]() : arr[2];
 
       edit.innerHTML = html;
--- a/editor/libeditor/tests/test_bug432225.html
+++ b/editor/libeditor/tests/test_bug432225.html
@@ -24,47 +24,47 @@ https://bugzilla.mozilla.org/show_bug.cg
 let {onSpellCheck} = SpecialPowers.Cu.import("resource://testing-common/AsyncSpellCheckTestHelper.jsm", {});
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
 
 var gMisspeltWords = [];
 
 function getEdit() {
-  return document.getElementById('edit');
+  return document.getElementById("edit");
 }
 
 function editDoc() {
   return getEdit().contentDocument;
 }
 
 function getEditor() {
   var Ci = SpecialPowers.Ci;
   var win = editDoc().defaultView;
   var editingSession = SpecialPowers.wrap(win).docShell.editingSession;
   return editingSession.getEditorForWindow(win);
 }
 
 function runTest() {
   editDoc().designMode = "on";
   setTimeout(function() { addWords(100); }, 0);
-}  
- 
+}
+
 function addWords(aLimit) {
   if (aLimit == 0) {
     ok(isSpellingCheckOk(getEditor(), gMisspeltWords),
        "All misspellings accounted for.");
     SimpleTest.finish();
     return;
   }
   getEdit().focus();
-  sendString('aa OK ');
+  sendString("aa OK ");
   gMisspeltWords.push("aa");
   onSpellCheck(editDoc(), function() {
-    addWords(aLimit-1);
+    addWords(aLimit - 1);
   });
 }
 </script>
 </pre>
 
 <iframe id="edit" width="200" height="100" src="about:blank"></iframe>
 
 </body>
--- a/editor/libeditor/tests/test_bug449243.html
+++ b/editor/libeditor/tests/test_bug449243.html
@@ -40,24 +40,24 @@ function split(element, caretPos, nbKeyP
   var sel = window.getSelection();
   var len = element.textContent.length;
   var pos = -1;
   switch (caretPos) {
     case CARET_BEGIN:
       pos = 0;
       break;
     case CARET_MIDDLE:
-      pos = Math.floor(len/2);
+      pos = Math.floor(len / 2);
       break;
     case CARET_END:
       pos = len;
       break;
   }
   sel.collapse(element.firstChild, pos);
-  
+
   // simulates a [Return] keypress
   for (var i = 0; i < nbKeyPresses; i++)
     synthesizeKey("KEY_Enter");
 }
 
 function undo(nbKeyPresses) {
   for (var i = 0; i < nbKeyPresses; i++)
     document.execCommand("Undo", false, null);
@@ -80,40 +80,40 @@ function runTests() {
   const header = content.querySelector("h2");
   const ulItem = content.querySelector("ul > li:last-child");
   const olItem = content.querySelector("ol > li:last-child");
   content.focus();
 
   // beginning of selection: split current node
   split(header, CARET_BEGIN, 1);
   ok(SameTypeAsPreviousSibling(header),
-    "Pressing [Return] at the beginning of a header " + 
+    "Pressing [Return] at the beginning of a header " +
     "should create another header.");
   split(ulItem, CARET_BEGIN, 2);
   ok(SameTypeAsPreviousSibling(ulItem),
-    "Pressing [Return] at the beginning of an unordered list item " + 
+    "Pressing [Return] at the beginning of an unordered list item " +
     "should create another list item.");
   split(olItem, CARET_BEGIN, 2);
   ok(SameTypeAsPreviousSibling(olItem),
-    "Pressing [Return] at the beginning of an ordered list item " + 
+    "Pressing [Return] at the beginning of an ordered list item " +
     "should create another list item.");
   undo(3);
 
   // middle of selection: split current node
   split(header, CARET_MIDDLE, 1);
   ok(SameTypeAsPreviousSibling(header),
-    "Pressing [Return] at the middle of a header " + 
+    "Pressing [Return] at the middle of a header " +
     "should create another header.");
   split(ulItem, CARET_MIDDLE, 2);
   ok(SameTypeAsPreviousSibling(ulItem),
-    "Pressing [Return] at the middle of an unordered list item " + 
+    "Pressing [Return] at the middle of an unordered list item " +
     "should create another list item.");
   split(olItem, CARET_MIDDLE, 2);
   ok(SameTypeAsPreviousSibling(olItem),
-    "Pressing [Return] at the middle of an ordered list item " + 
+    "Pressing [Return] at the middle of an ordered list item " +
     "should create another list item.");
   undo(3);
 
   // end of selection: create a new div/paragraph
   function testEndOfSelection(expected) {
     split(header, CARET_END, 1);
     ok(isType(content.querySelector("h2+*"), expected),
       "Pressing [Return] at the end of a header " +
--- a/editor/libeditor/tests/test_bug455992.html
+++ b/editor/libeditor/tests/test_bug455992.html
@@ -12,17 +12,17 @@ function runTest() {
     var e = document.getElementById(id);
     e.focus();
     return e;
   }
 
   function setupIframe(id) {
     var e = document.getElementById(id);
     var doc = e.contentDocument;
-    doc.body.innerHTML = String.fromCharCode(10)+'<span id="' + id + '_span" style="border:1px solid blue" contenteditable="true">X</span>'+String.fromCharCode(10);
+    doc.body.innerHTML = String.fromCharCode(10) + '<span id="' + id + '_span" style="border:1px solid blue" contenteditable="true">X</span>' + String.fromCharCode(10);
     e = doc.getElementById(id + "_span");
     e.focus();
     return e;
   }
 
   function test_begin_bs(e) {
     const msg = "BACKSPACE at beginning of contenteditable inline element";
     var before = e.parentNode.childNodes[0].nodeValue;
@@ -49,29 +49,29 @@ function runTest() {
   }
 
   function test_end_space(e) {
     const msg = "SPACE at end of contenteditable inline element";
     var before = e.parentNode.childNodes[2].nodeValue;
     sendKey("right");
     sendChar(" ");
     is(e.parentNode.childNodes[2].nodeValue, before, msg + " with id=" + e.id);
-    is(e.innerHTML, "X" + (e.tagName=="SPAN" ? "&nbsp;" : " <br>"), msg + " with id=" + e.id);
+    is(e.innerHTML, "X" + (e.tagName == "SPAN" ? "&nbsp;" : " <br>"), msg + " with id=" + e.id);
   }
 
   test_begin_bs(select("t1"));
   test_begin_space(select("t2"));
   test_end_delete(select("t3"));
   test_end_space(select("t4"));
   test_end_space(select("t5"));
 
-  test_begin_bs(setupIframe('i1'));
-  test_begin_space(setupIframe('i2'));
-  test_end_delete(setupIframe('i3'));
-  test_end_space(setupIframe('i4'));
+  test_begin_bs(setupIframe("i1"));
+  test_begin_space(setupIframe("i2"));
+  test_end_delete(setupIframe("i3"));
+  test_end_space(setupIframe("i4"));
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
 </script>
 </head>
--- a/editor/libeditor/tests/test_bug456244.html
+++ b/editor/libeditor/tests/test_bug456244.html
@@ -12,38 +12,38 @@ function runTest() {
     var e = document.getElementById(id);
     e.focus();
     return e;
   }
 
   function setupIframe(id) {
     var e = document.getElementById(id);
     var doc = e.contentDocument;
-    doc.body.innerHTML = String.fromCharCode(10)+'<span id="' + id + '_span" style="border:1px solid blue" contenteditable="true">X</span>'+String.fromCharCode(10);
+    doc.body.innerHTML = String.fromCharCode(10) + '<span id="' + id + '_span" style="border:1px solid blue" contenteditable="true">X</span>' + String.fromCharCode(10);
     e = doc.getElementById(id + "_span");
     e.focus();
     return e;
   }
 
   function test_end_bs(e) {
     const msg = "Deleting all text in contenteditable inline element";
     var before = e.parentNode.childNodes[0].nodeValue;
     sendKey("right");
     sendKey("back_space");
     sendKey("back_space");
     is(e.parentNode.childNodes[0].nodeValue, before, msg + " with id=" + e.id);
     is(e.innerHTML, "", msg + " with id=" + e.id);
   }
 
   test_end_bs(select("t1"));
-  test_end_bs(setupIframe('i1',0));
+  test_end_bs(setupIframe("i1", 0));
 
   {
     const msg = "Deleting all text in contenteditable body element";
-    var e = document.getElementById('i2');
+    var e = document.getElementById("i2");
     var doc = e.contentDocument;
     doc.body.setAttribute("contenteditable", "true");
     doc.body.focus();
     sendKey("right");
     sendKey("back_space");
     is(doc.body.innerHTML, "<br>", msg + " with id=" + e.id);
   }
 
--- a/editor/libeditor/tests/test_bug460740.html
+++ b/editor/libeditor/tests/test_bug460740.html
@@ -69,30 +69,30 @@ function split(element, caretPos) {
   // compute the requested position
   var len = element.textContent.length;
   var pos = -1;
   switch (caretPos) {
     case CARET_BEGIN:
       pos = 0;
       break;
     case CARET_MIDDLE:
-      pos = Math.floor(len/2);
+      pos = Math.floor(len / 2);
       break;
     case CARET_END:
       pos = len;
       break;
   }
 
   // put the caret on the requested position
   var range = document.createRange();
   var sel = window.getSelection();
   range.setStart(element.firstChild, pos);
   range.setEnd(element.firstChild, pos);
   sel.addRange(range);
-  
+
   // simulates a [Return] keypress
   synthesizeKey("VK_RETURN", {shiftKey: true});
 }
 
 // count the number of non-BR elements in #content
 function getBlockCount() {
   return document.querySelectorAll("#content *:not(br)").length;
 }
--- a/editor/libeditor/tests/test_bug471319.html
+++ b/editor/libeditor/tests/test_bug471319.html
@@ -18,17 +18,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 471319 **/
-    
+
       SimpleTest.waitForExplicitFinish();
 
       function doTest() {
         let t1 = SpecialPowers.wrap($("t1"));
         let editor = null;
 
         // Test 1: Undo on an empty editor - the editor should not forget about
         // the bogus node
--- a/editor/libeditor/tests/test_bug471722.html
+++ b/editor/libeditor/tests/test_bug471722.html
@@ -19,34 +19,34 @@ 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 471722 **/
-    
+
       SimpleTest.waitForExplicitFinish();
 
       function doTest() {
         var t1 = $("t1");
         var editor = SpecialPowers.wrap(t1).editor;
 
         ok(editor, "able to get editor for the element");
         t1.focus();
         t1.select();
 
         try {
 
           // Cut the initial text in the textbox
           ok(editor.canCut(), "can cut text");
           editor.cut();
           is(t1.value, "", "initial text was removed");
- 
+
           // So now we will have emptied the textfield
           // and the editor will have created a bogus node
           // Check the transaction is in the undo stack...
           var t1Enabled = {};
           var t1CanUndo = {};
           editor.canUndo(t1Enabled, t1CanUndo);
           ok(t1CanUndo.value, "undo is enabled");
 
@@ -62,17 +62,17 @@ https://bugzilla.mozilla.org/show_bug.cg
           var t1CanRedo = {};
           editor.canRedo(t1Enabled, t1CanRedo);
           ok(t1CanRedo.value, "redo is enabled");
           editor.redo(1);
 
           // Did the editor notice a bogus node reappeared?
           is(t1.value, "", "editor found bogus node");
        } catch (e) {
-         ok(false, "test failed with error "+e);
+         ok(false, "test failed with error " + e);
        }
        SimpleTest.finish();
      }
    </script>
   </pre>
 
   <input type="text" value="minefield" id="t1" />
 </body>
--- a/editor/libeditor/tests/test_bug478725.html
+++ b/editor/libeditor/tests/test_bug478725.html
@@ -4,38 +4,38 @@
 <style src="/tests/SimpleTest/test.css" type="text/css"></style>
 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
 
 <script class="testbody" type="application/javascript">
 
 function runTest() {
   function verifyContent(s) {
-    var e = document.getElementById('i1');
+    var e = document.getElementById("i1");
     var doc = e.contentDocument;
     is(doc.body.innerHTML, s, "");
   }
 
-  function pasteInto(html,target_id) {
-    var e = document.getElementById('i1');
+  function pasteInto(html, target_id) {
+    var e = document.getElementById("i1");
     var doc = e.contentDocument;
     doc.designMode = "on";
     doc.body.innerHTML = html;
     e = doc.getElementById(target_id);
     doc.defaultView.focus();
     var selection = doc.defaultView.getSelection();
     selection.removeAllRanges();
     selection.selectAllChildren(e);
     selection.collapseToEnd();
     SpecialPowers.wrap(doc).execCommand("paste", false, null);
    return e;
   }
 
-  function copyToClipBoard(s,asHTML,target_id) {
-    var e = document.getElementById('i2');
+  function copyToClipBoard(s, asHTML, target_id) {
+    var e = document.getElementById("i2");
     var doc = e.contentDocument;
     if (asHTML) {
       doc.body.innerHTML = s;
     } else {
       var text = doc.createTextNode(s);
       doc.body.appendChild(text);
     }
     doc.designMode = "on";
@@ -49,49 +49,49 @@ function runTest() {
       range.selectNode(doc.getElementById(target_id));
       selection.addRange(range);
     }
     SpecialPowers.wrap(doc).execCommand("copy", false, null);
     return e;
   }
 
   copyToClipBoard("<dl><dd>Hello Kitty</dd></dl>", true);
-  pasteInto('<ol><li id="paste_here">X</li></ol>',"paste_here");
+  pasteInto('<ol><li id="paste_here">X</li></ol>', "paste_here");
   verifyContent('<ol><li id="paste_here">X<dl><dd>Hello Kitty</dd></dl></li></ol>');
 
   copyToClipBoard("<li>Hello Kitty</li>", true);
-  pasteInto('<ol><li id="paste_here">X</li></ol>',"paste_here");
+  pasteInto('<ol><li id="paste_here">X</li></ol>', "paste_here");
   verifyContent('<ol><li id="paste_here">X</li><li>Hello Kitty</li></ol>');
 
   copyToClipBoard("<ol><li>Hello Kitty</li></ol>", true);
-  pasteInto('<ol><li id="paste_here">X</li></ol>',"paste_here");
+  pasteInto('<ol><li id="paste_here">X</li></ol>', "paste_here");
   verifyContent('<ol><li id="paste_here">X</li><li>Hello Kitty</li></ol>');
 
   copyToClipBoard("<ul><li>Hello Kitty</li></ul>", true);
-  pasteInto('<ol><li id="paste_here">X</li></ol>',"paste_here");
+  pasteInto('<ol><li id="paste_here">X</li></ol>', "paste_here");
   verifyContent('<ol><li id="paste_here">X</li><li>Hello Kitty</li></ol>');
 
   copyToClipBoard("<ul><li>Hello</li><ul><li>Kitty</li></ul></ul>", true);
-  pasteInto('<ol><li id="paste_here">X</li></ol>',"paste_here");
+  pasteInto('<ol><li id="paste_here">X</li></ol>', "paste_here");
   verifyContent('<ol><li id="paste_here">X</li><li>Hello</li><ul><li>Kitty</li></ul></ol>');
 
   copyToClipBoard("<dl><dd>Hello</dd><dd>Kitty</dd></dl>", true);
-  pasteInto('<dl><dd id="paste_here">X</dd></dl>',"paste_here");
+  pasteInto('<dl><dd id="paste_here">X</dd></dl>', "paste_here");
   verifyContent('<dl><dd id="paste_here">X</dd><dd>Hello</dd><dd>Kitty</dd></dl>');
 
   copyToClipBoard("<dl><dd>Hello</dd><dd>Kitty</dd></dl>", true);
-  pasteInto('<dl><dt id="paste_here">X</dt></dl>',"paste_here");
+  pasteInto('<dl><dt id="paste_here">X</dt></dl>', "paste_here");
   verifyContent('<dl><dt id="paste_here">X</dt><dd>Hello</dd><dd>Kitty</dd></dl>');
 
   copyToClipBoard("<dl><dt>Hello</dt><dd>Kitty</dd></dl>", true);
-  pasteInto('<dl><dd id="paste_here">X</dd></dl>',"paste_here");
+  pasteInto('<dl><dd id="paste_here">X</dd></dl>', "paste_here");
   verifyContent('<dl><dd id="paste_here">X</dd><dt>Hello</dt><dd>Kitty</dd></dl>');
 
   copyToClipBoard("<pre>Kitty</pre>", true);
-  pasteInto('<pre id="paste_here">Hello </pre>',"paste_here");
+  pasteInto('<pre id="paste_here">Hello </pre>', "paste_here");
   verifyContent('<pre id="paste_here">Hello Kitty</pre>');
 
 // I was expecting these to trigger the special TABLE/TR rules in nsHTMLEditor::InsertHTMLWithContext
 // but they don't for some reason...
 //  copyToClipBoard('<table><tr id="copy_here"><td>Kitty</td></tr></table>', true, "copy_here");
 //  pasteInto('<table><tr id="paste_here"><td>Hello</td></tr></table>',"paste_here");
 //  verifyContent('');
 //
--- a/editor/libeditor/tests/test_bug480972.html
+++ b/editor/libeditor/tests/test_bug480972.html
@@ -4,41 +4,41 @@
 <style src="/tests/SimpleTest/test.css" type="text/css"></style>
 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
 
 <script class="testbody" type="application/javascript">
 
 function runTest() {
   function verifyContent(s) {
-    var e = document.getElementById('i1');
+    var e = document.getElementById("i1");
     var doc = e.contentDocument;
     is(doc.body.innerHTML, s, "");
   }
 
-  function pasteInto(html,target_id) {
-    var e = document.getElementById('i1');
+  function pasteInto(html, target_id) {
+    var e = document.getElementById("i1");
     var doc = e.contentDocument;
     doc.designMode = "on";
     doc.body.innerHTML = html;
     doc.defaultView.focus();
     if (target_id)
       e = doc.getElementById(target_id);
     else
       e = doc.body;
     var selection = doc.defaultView.getSelection();
     selection.removeAllRanges();
     selection.selectAllChildren(e);
     selection.collapseToEnd();
     SpecialPowers.wrap(doc).execCommand("paste", false, null);
    return e;
   }
 
-  function copyToClipBoard(s,asHTML,target_id) {
-    var e = document.getElementById('i2');
+  function copyToClipBoard(s, asHTML, target_id) {
+    var e = document.getElementById("i2");
     var doc = e.contentDocument;
     if (asHTML) {
       doc.body.innerHTML = s;
     } else {
       var text = doc.createTextNode(s);
       doc.body.appendChild(text);
     }
     doc.designMode = "on";
@@ -51,33 +51,33 @@ function runTest() {
       var range = document.createRange();
       range.selectNode(doc.getElementById(target_id));
       selection.addRange(range);
     }
     SpecialPowers.wrap(doc).execCommand("copy", false, null);
     return e;
   }
 
-  copyToClipBoard('<span>Hello</span><span>Kitty</span>', true);
-  pasteInto('');
-  verifyContent('<span>Hello</span><span>Kitty</span>');
+  copyToClipBoard("<span>Hello</span><span>Kitty</span>", true);
+  pasteInto("");
+  verifyContent("<span>Hello</span><span>Kitty</span>");
 
   copyToClipBoard("<dl><dd>Hello Kitty</dd></dl><span>Hello</span><span>Kitty</span>", true);
-  pasteInto('<ol><li id="paste_here">X</li></ol>',"paste_here");
+  pasteInto('<ol><li id="paste_here">X</li></ol>', "paste_here");
   verifyContent('<ol><li id="paste_here">X<dl><dd>Hello Kitty</dd></dl><span>Hello</span><span>Kitty</span></li></ol>');
 
 // The following test doesn't do what I expected, because the special handling
 // of IsList nodes in nsHTMLEditor::InsertHTMLWithContext simply removes
 // non-list/item children.  See bug 481177.
 //  copyToClipBoard("<ol><li>Hello Kitty</li><span>Hello</span></ol>", true);
 //  pasteInto('<ol><li id="paste_here">X</li></ol>',"paste_here");
 //  verifyContent('<ol><li id="paste_here">X</li><li>Hello Kitty</li><span>Hello</span></ol>');
 
   copyToClipBoard("<pre>Kitty</pre><span>Hello</span>", true);
-  pasteInto('<pre id="paste_here">Hello </pre>',"paste_here");
+  pasteInto('<pre id="paste_here">Hello </pre>', "paste_here");
   verifyContent('<pre id="paste_here">Hello Kitty<span>Hello</span></pre>');
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
 </script>
--- a/editor/libeditor/tests/test_bug483651.html
+++ b/editor/libeditor/tests/test_bug483651.html
@@ -35,17 +35,17 @@ https://bugzilla.mozilla.org/show_bug.cg
         t1.focus();
         sendString("A");
         synthesizeKey("KEY_Backspace");
 
         try {
           // Was the trailing br removed?
           is(editor.documentIsEmpty, true, "trailing <br> correctly removed");
         } catch (e) {
-          ok(false, "test failed with error "+e);
+          ok(false, "test failed with error " + e);
         }
         SimpleTest.finish();
       }
    </script>
   </pre>
 
   <textarea id="t1" rows="2" columns="80"></textarea>
 </body>
--- a/editor/libeditor/tests/test_bug484181.html
+++ b/editor/libeditor/tests/test_bug484181.html
@@ -44,22 +44,22 @@ function append(str) {
 
 function runTest() {
   gMisspeltWords = ["haz", "cheezburger"];
   var edit = document.getElementById("edit");
   edit.focus();
 
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm", window);
-  onSpellCheck(edit, function () {
+  onSpellCheck(edit, function() {
     ok(isSpellingCheckOk(getEditor(), gMisspeltWords),
        "All misspellings before editing are accounted for.");
 
     append(" becaz I'm a lulcat!");
-    onSpellCheck(edit, function () {
+    onSpellCheck(edit, function() {
       gMisspeltWords.push("becaz");
       gMisspeltWords.push("lulcat");
       ok(isSpellingCheckOk(getEditor(), gMisspeltWords),
          "All misspellings after typing are accounted for.");
 
       SimpleTest.finish();
     });
   });
--- a/editor/libeditor/tests/test_bug487524.html
+++ b/editor/libeditor/tests/test_bug487524.html
@@ -3,52 +3,52 @@
 <title>Test for bug 487524</title>
 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
 
 <script class="testbody" type="application/javascript">
 function runTest() {
 
-  function setupIframe(e,html,focus_id) {
+  function setupIframe(e, html, focus_id) {
     var doc = e.contentDocument;
     doc.body.innerHTML = html;
     doc.designMode = "on";
     e = doc.getElementById(focus_id);
     doc.defaultView.focus();
     if (e) e.focus();
     return e;
   }
 
-  var i1 = document.getElementById('i1')
-  var li1 = setupIframe(i1,'<ul><li id="li1">one</li><li>two</li><ul><li>a</li></ul></ul>','li1')
+  var i1 = document.getElementById("i1");
+  var li1 = setupIframe(i1, '<ul><li id="li1">one</li><li>two</li><ul><li>a</li></ul></ul>', "li1");
   var doc = li1.ownerDocument;
 
   var selection = doc.defaultView.getSelection();
   selection.removeAllRanges();
 
   var range = doc.createRange();
-  range.setStart(li1,0);
-  range.setEnd(li1.nextSibling,0);
+  range.setStart(li1, 0);
+  range.setEnd(li1.nextSibling, 0);
   selection.addRange(range);
 
-  sendKey('delete');
-  is(doc.body.innerHTML,'<ul><li>two</li><ul><li>a</li></ul></ul>','delete 1st LI');
+  sendKey("delete");
+  is(doc.body.innerHTML, "<ul><li>two</li><ul><li>a</li></ul></ul>", "delete 1st LI");
 
-  var li2 = setupIframe(i1,'<ul><li id="li2">two</li><ul><li>a</li></ul></ul>','li2')
+  var li2 = setupIframe(i1, '<ul><li id="li2">two</li><ul><li>a</li></ul></ul>', "li2");
   selection = doc.defaultView.getSelection();
   selection.removeAllRanges();
 
   range = doc.createRange();
-  range.setStart(li2,0);
-  range.setEnd(li2.nextSibling.firstChild,0);
+  range.setStart(li2, 0);
+  range.setEnd(li2.nextSibling.firstChild, 0);
   selection.addRange(range);
 
-  sendKey('delete');
-  is(doc.body.innerHTML,'<ul><ul><li>a</li></ul></ul>','delete 2nd LI');
+  sendKey("delete");
+  is(doc.body.innerHTML, "<ul><ul><li>a</li></ul></ul>", "delete 2nd LI");
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
 </script>
 </head>
--- a/editor/libeditor/tests/test_bug490879.html
+++ b/editor/libeditor/tests/test_bug490879.html
@@ -5,24 +5,24 @@
 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=490879"
    target="_blank">Mozilla Bug 490879</a>
 <iframe id="i1" width="200" height="100" src="about:blank"></iframe>
 <img id="i" src="green.png">
 <script>
 function runTest() {
   function verifyContent() {
     const kExpectedImgSpec = "data:image/png;base64,";
-    var e = document.getElementById('i1');
+    var e = document.getElementById("i1");
     var doc = e.contentDocument;
     is(doc.getElementsByTagName("img")[0].src.substring(0, kExpectedImgSpec.length),
        kExpectedImgSpec, "The pasted image is a base64-encoded data: URI");
   }
 
   function pasteInto() {
-    var e = document.getElementById('i1');
+    var e = document.getElementById("i1");
     var doc = e.contentDocument;
     doc.designMode = "on";
     doc.defaultView.focus();
     var selection = doc.defaultView.getSelection();
     selection.removeAllRanges();
     selection.selectAllChildren(doc.body);
     selection.collapseToEnd();
     SpecialPowers.doCommand(window, "cmd_paste");
--- a/editor/libeditor/tests/test_bug502673.html
+++ b/editor/libeditor/tests/test_bug502673.html
@@ -19,36 +19,36 @@ 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 502673 **/
-    
+
       SimpleTest.waitForExplicitFinish();
 
       function listener() {
       }
 
       listener.prototype =
       {
-        NotifyDocumentWillBeDestroyed: function () {
-          var editor = SpecialPowers.wrap(this.input).editor;
-          editor.removeDocumentStateListener(this);
-        },
+        NotifyDocumentWillBeDestroyed() {
+    var editor = SpecialPowers.wrap(this.input).editor;
+    editor.removeDocumentStateListener(this);
+  },
 
-        NotifyDocumentCreated: function () {
-        },
+        NotifyDocumentCreated() {
+  },
 
-        NotifyDocumentStateChanged: function (aNowDirty) {
-          var editor = SpecialPowers.wrap(this.input).editor;
-          editor.removeDocumentStateListener(this);
-        },
+        NotifyDocumentStateChanged(aNowDirty) {
+    var editor = SpecialPowers.wrap(this.input).editor;
+    editor.removeDocumentStateListener(this);
+  },
 
         QueryInterface: SpecialPowers.wrapCallback(function(iid) {
           if (iid.equals(SpecialPowers.Ci.nsIDocumentStateListener) ||
               iid.equals(SpecialPowers.Ci.nsISupports))
             return this;
           throw SpecialPowers.Cr.NS_ERROR_NO_INTERFACE;
         }),
       };
@@ -76,17 +76,17 @@ https://bugzilla.mozilla.org/show_bug.cg
         // Report success if we get here - clearly we didn't crash
         ok(true, "Multiple listeners removed themselves after " +
                  "NotifyDocumentStateChanged notifications - didn't crash");
 
         // Add the listeners again for the next test
         editor.addDocumentStateListener(listener1);
         editor.addDocumentStateListener(listener2);
         editor.addDocumentStateListener(listener3);
-        
+      
         // Test 2. Fire NotifyDocumentWillBeDestroyed notifications where the
         // listeners remove themselves (though in the real world, listeners
         // shouldn't do this as nsEditor::PreDestroy removes them as
         // listeners anyway)
         document.body.removeChild(input);
         ok(true, "Multiple listeners removed themselves after " +
                  "NotifyDocumentWillBeDestroyed notifications - didn't crash");
 
--- a/editor/libeditor/tests/test_bug520189.html
+++ b/editor/libeditor/tests/test_bug520189.html
@@ -79,17 +79,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 520182 **/
 
 const dataPayload = "foo<iframe src=\"data:text/html,bar\"></iframe>baz";
 const jsPayload = "foo<iframe src=\"javascript:void('bar');\"></iframe>baz";
 const httpPayload = "foo<iframe src=\"http://mochi.test:8888/\"></iframe>baz";
-const scriptPayload ="foo<script>document.write(\"<iframe></iframe>\");</sc" + "ript>baz";
+const scriptPayload = "foo<script>document.write(\"<iframe></iframe>\");</sc" + "ript>baz";
 const scriptExternalPayload = "foo<script src=\"data:text/javascript,document.write('<iframe></iframe>');\"></sc" + "ript>baz";
 const validStyle1Payload = "foo<style>#bar{color:red;}</style>baz";
 const validStyle2Payload = "foo<span style=\"color:red\">bar</span>baz";
 const validStyle3Payload = "foo<style>@font-face{font-family:xxx;src:'xxx.ttf';}</style>baz";
 const validStyle4Payload = "foo<style>@namespace xxx url(http://example.com/);</style>baz";
 const invalidStyle1Payload = "foo<style>#bar{-moz-binding:url('data:text/xml,<?xml version=\"1.0\"><binding xmlns=\"http://www.mozilla.org/xbl\"/>');}</style>baz";
 const invalidStyle2Payload = "foo<span style=\"-moz-binding:url('data:text/xml,<?xml version=&quot;1.0&quot;><binding xmlns=&quot;http://www.mozilla.org/xbl&quot;/>');\">bar</span>baz";
 const invalidStyle3Payload = "foo<style>@import 'xxx.css';</style>baz";
@@ -135,24 +135,24 @@ var tests = [
     iframeCount: 0,
     rootElement() { return document.getElementById("c").contentDocument.documentElement; },
   },
   {
     id: "g",
     isIFrame: true,
     payload: scriptPayload,
     rootElement() { return document.getElementById("g").contentDocument.documentElement; },
-    iframeCount: 0
+    iframeCount: 0,
   },
   {
     id: "h",
     isIFrame: true,
     payload: scriptExternalPayload,
     rootElement() { return document.getElementById("h").contentDocument.documentElement; },
-    iframeCount: 0
+    iframeCount: 0,
   },
   {
     id: "d",
     payload: dataPayload,
     iframeCount: 0,
     rootElement() { return document.getElementById("d"); },
   },
   {
@@ -166,23 +166,23 @@ var tests = [
     payload: httpPayload,
     iframeCount: 0,
     rootElement() { return document.getElementById("f"); },
   },
   {
     id: "i",
     payload: scriptPayload,
     rootElement() { return document.getElementById("i"); },
-    iframeCount: 0
+    iframeCount: 0,
   },
   {
     id: "j",
     payload: scriptExternalPayload,
     rootElement() { return document.getElementById("j"); },
-    iframeCount: 0
+    iframeCount: 0,
   },
   {
     id: "k",
     isIFrame: true,
     payload: validStyle1Payload,
     rootElement() { return document.getElementById("k").contentDocument.documentElement; },
     checkResult(html) { isnot(html.indexOf("style"), -1, "Should have retained style"); },
   },
@@ -283,31 +283,31 @@ var tests = [
     rootElement() { return document.getElementById("z"); },
     checkResult(html) { isnot(html.indexOf("xxx"), -1, "Should not have retained the font-face style"); },
   },
   {
     id: "aa",
     isIFrame: true,
     payload: nestedStylePayload,
     rootElement() { return document.getElementById("aa").contentDocument.documentElement; },
-    checkResult: function(html, text) {
+    checkResult(html, text) {
       is(html.indexOf("binding-1"), -1, "Should not have retained the binding-1 style");
       isnot(text.indexOf("#bar2"), -1, "Should have retained binding-2 as text content");
       is(text.indexOf("binding-2"), -1, "Should not have retained binding-2 as a tag");
-    }
+    },
   },
   {
     id: "bb",
     payload: nestedStylePayload,
     rootElement() { return document.getElementById("bb"); },
-    checkResult: function(html, text) {
+    checkResult(html, text) {
       is(html.indexOf("binding-1"), -1, "Should not have retained the binding-1 style");
       isnot(text.indexOf("#bar2"), -1, "Should have retained binding-2 as text content");
       is(text.indexOf("binding-2"), -1, "Should not have retained binding-2 as a tag");
-    }
+    },
   },
   {
     id: "cc",
     isIFrame: true,
     payload: validStyle4Payload,
     rootElement() { return document.getElementById("cc").contentDocument.documentElement; },
     checkResult(html) { isnot(html.indexOf("xxx"), -1, "Should have retained the namespace style"); },
   },
@@ -370,30 +370,30 @@ var tests = [
     checkResult(html) { isnot(html.indexOf("bar"), -1, "Should have retained the src attribute for the image"); },
   },
   {
     id: "mm",
     isIFrame: true,
     indirectPaste: true,
     payload: invalidStyle7Payload,
     rootElement() { return document.getElementById("mm").contentDocument.documentElement; },
-    checkResult: function(html) {
+    checkResult(html) {
       is(html.indexOf("xxx"), -1, "Should not have retained the title text");
       isnot(html.indexOf("foo"), -1, "Should have retained the body text");
-    }
+    },
   },
   {
     id: "nn",
     indirectPaste: true,
     payload: invalidStyle7Payload,
     rootElement() { return document.getElementById("nn"); },
-    checkResult: function(html) {
+    checkResult(html) {
       is(html.indexOf("xxx"), -1, "Should not have retained the title text");
       isnot(html.indexOf("foo"), -1, "Should have retained the body text");
-    }
+    },
   },
   {
     id: "oo",
     isIFrame: true,
     payload: validDataFooPayload,
     rootElement() { return document.getElementById("oo").contentDocument.documentElement; },
     checkResult(html) { isnot(html.indexOf("bar"), -1, "Should have retained the data-bar attribute"); },
   },
@@ -519,25 +519,25 @@ var tests = [
     payload: videoPayload,
     rootElement() { return document.getElementById("xxxx").contentDocument.documentElement; },
     checkResult(html) { isnot(html.indexOf("controls="), -1, "Should have added the controls attribute"); },
   },
   {
     id: "yyy",
     payload: microdataPayload,
     rootElement() { return document.getElementById("yyy"); },
-    checkResult: function(html) { is(html.indexOf("name"), -1, "Should have dropped name."); is(html.indexOf("rel"), -1, "Should have dropped rel."); isnot(html.indexOf("itemprop"), -1, "Should not have dropped itemprop."); }
+    checkResult(html) { is(html.indexOf("name"), -1, "Should have dropped name."); is(html.indexOf("rel"), -1, "Should have dropped rel."); isnot(html.indexOf("itemprop"), -1, "Should not have dropped itemprop."); },
   },
   {
     id: "yyyy",
     isIFrame: true,
     payload: microdataPayload,
     rootElement() { return document.getElementById("yyyy").contentDocument.documentElement; },
-    checkResult: function(html) { is(html.indexOf("name"), -1, "Should have dropped name."); is(html.indexOf("rel"), -1, "Should have dropped rel."); isnot(html.indexOf("itemprop"), -1, "Should not have dropped itemprop."); }
-  }
+    checkResult(html) { is(html.indexOf("name"), -1, "Should have dropped name."); is(html.indexOf("rel"), -1, "Should have dropped rel."); isnot(html.indexOf("itemprop"), -1, "Should not have dropped itemprop."); },
+  },
 ];
 
 function doNextTest() {
   if (typeof testCounter == "undefined")
     testCounter = 0;
   else if (++testCounter == tests.length) {
     SimpleTest.finish();
     return;
@@ -606,14 +606,14 @@ function runTest(test) {
   }
 }
 
 SimpleTest.waitForExplicitFinish();
 
 addLoadEvent(function() {
   SpecialPowers.pushPrefEnv(
     { "set": [["layout.css.moz-document.content.enabled", true]]},
-    doNextTest)
+    doNextTest);
 });
 </script>
 </pre>
 </body>
 </html>
--- a/editor/libeditor/tests/test_bug525389.html
+++ b/editor/libeditor/tests/test_bug525389.html
@@ -13,32 +13,32 @@
   var Ci = SpecialPowers.Ci;
 
 function getLoadContext() {
   return SpecialPowers.wrap(window).docShell.QueryInterface(Ci.nsILoadContext);
 }
 
 async function runTest() {
   var pasteCount = 0;
-  var pasteFunc = function (event) { pasteCount++; };
+  var pasteFunc = function(event) { pasteCount++; };
 
   function verifyContent(s) {
-    var e = document.getElementById('i1');
+    var e = document.getElementById("i1");
     var doc = e.contentDocument;
     if (navigator.platform.includes("Win")) {
       // On Windows ignore \n which got left over from the removal of the fragment tags
       // <html><body>\n<!--StartFragment--> and <!--EndFragment-->\n</body>\n</html>.
       is(doc.body.innerHTML.replace(/\n/g, ""), s, "");
     } else {
       is(doc.body.innerHTML, s, "");
     }
   }
 
   function pasteInto(trans, html, target_id) {
-    var e = document.getElementById('i1');
+    var e = document.getElementById("i1");
     var doc = e.contentDocument;
     doc.designMode = "on";
     doc.body.innerHTML = html;
     doc.defaultView.focus();
     if (target_id)
       e = doc.getElementById(target_id);
     else
       e = doc.body;
@@ -57,24 +57,24 @@ async function runTest() {
 
   function getTransferableFromClipboard(asHTML) {
     var trans = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
     trans.init(getLoadContext());
     if (asHTML) {
       trans.addDataFlavor("text/html");
     } else {
       trans.addDataFlavor("text/unicode");
-    }    
+    }
     var clip = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
     clip.getData(trans, Ci.nsIClipboard.kGlobalClipboard);
     return trans;
   }
 
-  function makeTransferable(s,asHTML,target_id) {
-    var e = document.getElementById('i2');
+  function makeTransferable(s, asHTML, target_id) {
+    var e = document.getElementById("i2");
     var doc = e.contentDocument;
     if (asHTML) {
       doc.body.innerHTML = s;
     } else {
       var text = doc.createTextNode(s);
       doc.body.appendChild(text);
     }
     doc.designMode = "on";
@@ -89,35 +89,35 @@ async function runTest() {
       selection.addRange(range);
     }
 
     // We cannot use plain strings, we have to use nsSupportsString.
     var supportsStringClass = SpecialPowers.Components.classes["@mozilla.org/supports-string;1"];
     var ssData = supportsStringClass.createInstance(Ci.nsISupportsString);
 
     // Create the transferable.
-    var trans = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);  
+    var trans = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
     trans.init(getLoadContext());
 
     // Add the data to the transferable.
     if (asHTML) {
       trans.addDataFlavor("text/html");
       ssData.data = doc.body.innerHTML;
       trans.setTransferData("text/html", ssData, ssData.length * 2);
     } else {
       trans.addDataFlavor("text/unicode");
       ssData.data = doc.body.innerHTML;
       trans.setTransferData("text/unicode", ssData, ssData.length * 2);
     }
 
     return trans;
   }
 
-  async function copyToClipBoard(s,asHTML,target_id) {
-    var e = document.getElementById('i2');
+  async function copyToClipBoard(s, asHTML, target_id) {
+    var e = document.getElementById("i2");
     var doc = e.contentDocument;
     if (asHTML) {
       doc.body.innerHTML = s;
     } else {
       var text = doc.createTextNode(s);
       doc.body.appendChild(text);
     }
     doc.designMode = "on";
@@ -133,58 +133,58 @@ async function runTest() {
     }
 
     await SimpleTest.promiseClipboardChange(() => true,
       () => { SpecialPowers.wrap(doc).execCommand("copy", false, null); });
 
     return e;
   }
 
-  await copyToClipBoard('<span>Hello</span><span>Kitty</span>', true);
+  await copyToClipBoard("<span>Hello</span><span>Kitty</span>", true);
   var trans = getTransferableFromClipboard(true);
-  pasteInto(trans, '');
-  verifyContent('<span>Hello</span><span>Kitty</span>');
+  pasteInto(trans, "");
+  verifyContent("<span>Hello</span><span>Kitty</span>");
   is(pasteCount, 1, "paste event was not triggered");
 
   // this test is not working out exactly like the clipboard test
   // has to do with generating the nsITransferable above
-  //trans = makeTransferable('<span>Hello</span><span>Kitty</span>', true);
-  //pasteInto(trans, '');
-  //verifyContent('<span>Hello</span><span>Kitty</span>');
+  // trans = makeTransferable('<span>Hello</span><span>Kitty</span>', true);
+  // pasteInto(trans, '');
+  // verifyContent('<span>Hello</span><span>Kitty</span>');
 
   await copyToClipBoard("<dl><dd>Hello Kitty</dd></dl><span>Hello</span><span>Kitty</span>", true);
   trans = getTransferableFromClipboard(true);
-  pasteInto(trans, '<ol><li id="paste_here">X</li></ol>',"paste_here");
+  pasteInto(trans, '<ol><li id="paste_here">X</li></ol>', "paste_here");
   verifyContent('<ol><li id="paste_here">X<dl><dd>Hello Kitty</dd></dl><span>Hello</span><span>Kitty</span></li></ol>');
   is(pasteCount, 1, "paste event was not triggered");
 
 // The following test doesn't do what I expected, because the special handling
 // of IsList nodes in nsHTMLEditor::InsertHTMLWithContext simply removes
 // non-list/item children.  See bug 481177.
 //  await copyToClipBoard("<ol><li>Hello Kitty</li><span>Hello</span></ol>", true);
 //  pasteInto('<ol><li id="paste_here">X</li></ol>',"paste_here");
 //  verifyContent('<ol><li id="paste_here">X</li><li>Hello Kitty</li><span>Hello</span></ol>');
 
   await copyToClipBoard("<pre>Kitty</pre><span>Hello</span>", true);
   trans = getTransferableFromClipboard(true);
-  pasteInto(trans, '<pre id="paste_here">Hello </pre>',"paste_here");
+  pasteInto(trans, '<pre id="paste_here">Hello </pre>', "paste_here");
   verifyContent('<pre id="paste_here">Hello Kitty<span>Hello</span></pre>');
   is(pasteCount, 1, "paste event was not triggered");
 
   await copyToClipBoard('1<span style="display: contents">2</span>3', true);
   trans = getTransferableFromClipboard(true);
-  pasteInto(trans, '<div id="paste_here"></div>',"paste_here");
+  pasteInto(trans, '<div id="paste_here"></div>', "paste_here");
   verifyContent('<div id="paste_here">1<span style="display: contents">2</span>3</div>');
   is(pasteCount, 1, "paste event was not triggered");
 
   // test that we can preventDefault pastes
-  pasteFunc = function (event) { event.preventDefault(); return false; };
+  pasteFunc = function(event) { event.preventDefault(); return false; };
   await copyToClipBoard("<pre>Kitty</pre><span>Hello</span>", true);
   trans = getTransferableFromClipboard(true);
-  pasteInto(trans, '<pre id="paste_here">Hello </pre>',"paste_here");
+  pasteInto(trans, '<pre id="paste_here">Hello </pre>', "paste_here");
   verifyContent('<pre id="paste_here">Hello </pre>');
   is(pasteCount, 0, "paste event was triggered");
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(() => {
   add_task(async function test_copy() {
     await runTest();
--- a/editor/libeditor/tests/test_bug549262.html
+++ b/editor/libeditor/tests/test_bug549262.html
@@ -16,26 +16,26 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 549262 **/
 
 var smoothScrollPref = "general.smoothScroll";
 SimpleTest.waitForExplicitFinish();
-var win = window.open("file_bug549262.html", "_blank", 
+var win = window.open("file_bug549262.html", "_blank",
                       "width=600,height=600,scrollbars=yes");
 
 // grab the timer right at the start
 var cwu = SpecialPowers.getDOMWindowUtils(win);
 function step() {
   cwu.advanceTimeAndRefresh(100);
 }
 SimpleTest.waitForFocus(function() {
-  SpecialPowers.pushPrefEnv({"set":[[smoothScrollPref, false]]}, startTest);
+  SpecialPowers.pushPrefEnv({"set": [[smoothScrollPref, false]]}, startTest);
 }, win);
 function startTest() {
   // Make sure that pressing Space when a contenteditable element is not focused
   // will scroll the page.
   var ed = win.document.getElementById("editor");
   var sc = win.document.querySelector("a");
   sc.focus();
   is(win.scrollY, 0, "Sanity check");
--- a/editor/libeditor/tests/test_bug551704.html
+++ b/editor/libeditor/tests/test_bug551704.html
@@ -21,18 +21,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <div id="test5" contenteditable></div>
   <div id="test6" contenteditable>a</div>
   <div id="test7" contenteditable style="white-space: pre"></div>
   <div id="test8" contenteditable style="white-space: pre">a</div>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
-function testLineBreak(div, type, expectedText, expectedHTML, callback)
-{
+function testLineBreak(div, type, expectedText, expectedHTML, callback) {
   div.focus();
   getSelection().collapse(div, 0);
   type();
   is(div.innerHTML, expectedHTML, "The expected HTML after editing should be correct");
   requestAnimationFrame(function() {
     SimpleTest.waitForClipboard(expectedText,
       function() {
         getSelection().selectAllChildren(div);
@@ -93,17 +92,17 @@ SimpleTest.waitForFocus(function() {
   });
   iframe.srcdoc = "foo";
   document.getElementById("content").appendChild(iframe);
 });
 
 function continueTest() {
   var divs = [];
   for (var i = 0; i < 8; ++i) {
-    divs[i] = document.getElementById("test" + (i+1));
+    divs[i] = document.getElementById("test" + (i + 1));
   }
   var current = 0;
   function doNextTest() {
     if (current == divs.length) {
       SimpleTest.finish();
       return;
     }
     var div = divs[current++];
--- a/editor/libeditor/tests/test_bug552782.html
+++ b/editor/libeditor/tests/test_bug552782.html
@@ -15,29 +15,29 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="editor" contenteditable></div>
 
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 552782 **/
 SimpleTest.waitForExplicitFinish();
 
-var original = '<ol><li>Item 1</li><ol><li>Item 2</li><li>Item 3</li><li>Item 4</li></ol></ol>';
+var original = "<ol><li>Item 1</li><ol><li>Item 2</li><li>Item 3</li><li>Item 4</li></ol></ol>";
 var editor = document.getElementById("editor");
 editor.innerHTML = original;
 editor.focus();
 
 addLoadEvent(function() {
 
   var sel = window.getSelection();
   sel.removeAllRanges();
   var lis = document.getElementsByTagName("li");
   sel.selectAllChildren(lis[2]);
   document.execCommand("outdent", false, false);
-  var expected = '<ol><li>Item 1</li><ol><li>Item 2</li></ol><li>Item 3</li><ol><li>Item 4</li></ol></ol>';
+  var expected = "<ol><li>Item 1</li><ol><li>Item 2</li></ol><li>Item 3</li><ol><li>Item 4</li></ol></ol>";
   is(editor.innerHTML, expected, "outdenting third item in a partially indented numbered list");
   document.execCommand("indent", false, false);
   todo_is(editor.innerHTML, original, "re-indenting third item in a partially indented numbered list");
 
   // done
   SimpleTest.finish();
 });
 
--- a/editor/libeditor/tests/test_bug569988.html
+++ b/editor/libeditor/tests/test_bug569988.html
@@ -19,18 +19,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script type="application/javascript">
 
 /** Test for Bug 569988 **/
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTest);
 
 
-function runTest()
-{
+function runTest() {
   var script = SpecialPowers.loadChromeScript(function() {
     var gPromptInput = null;
     var os = Cc["@mozilla.org/observer-service;1"]
                .getService(Ci.nsIObserverService);
 
     os.addObserver(onPromptLoad, "common-dialog-loaded");
     os.addObserver(onPromptLoad, "tabmodal-dialog-loaded");
 
@@ -53,27 +52,27 @@ function runTest()
 
       var listener = {
         handleEvent: function _hv(aEvent) {
           var isPrevented = aEvent.defaultPrevented;
           sendAsyncMessage("ok", [!isPrevented,
                            "ESC key event is prevented by editor"]);
           listenerService.removeSystemEventListener(gPromptInput, "keypress",
                                                     listener, false);
-        }
+        },
       };
       listenerService.addSystemEventListener(gPromptInput, "keypress",
                                              listener, false);
 
       sendAsyncMessage("info", "sending key");
       var EventUtils = {};
       EventUtils.window = {};
       EventUtils._EU_Ci = Ci;
       EventUtils._EU_Cc = Cc;
-      Cc['@mozilla.org/moz/jssubscript-loader;1']
+      Cc["@mozilla.org/moz/jssubscript-loader;1"]
         .getService(Ci.mozIJSSubScriptLoader)
         .loadSubScript("chrome://mochikit/content/tests/SimpleTest/EventUtils.js",
                        EventUtils);
       EventUtils.synthesizeKey("VK_ESCAPE", {},
                                gPromptInput.ownerDocument.defaultView);
     }
 
     addMessageListener("destroy", function() {
--- a/editor/libeditor/tests/test_bug570144.html
+++ b/editor/libeditor/tests/test_bug570144.html
@@ -73,23 +73,23 @@ function try2split(list) {
     selection.selectAllChildren(editor.querySelector("p"));
   selection.collapseToEnd();
   // simulate a [Enter] keypress
   synthesizeKey("KEY_Enter");
 }
 
 function testSection(element, context, shouldCreateLI, shouldCreateP) {
   var nbLI = shouldCreateLI ? 2 : 1; // number of expected list items
-  var nbP  = shouldCreateP  ? 2 : 1; // number of expected paragraphs
+  var nbP  = shouldCreateP ? 2 : 1; // number of expected paragraphs
 
   function message(nodeName, dup) {
     return context + ":[Return] should " + (dup ? "" : "not ")
-                   + "create another <" + nodeName + ">."
+                   + "create another <" + nodeName + ">.";
   }
-  var msgP  = message("p",  shouldCreateP);
+  var msgP  = message("p", shouldCreateP);
   var msgLI = message("li", shouldCreateLI);
   var msgDT = message("dt", shouldCreateLI);
   var msgDD = message("dd", false);
 
   const ol = element.querySelector("ol");
   try2split(ol);
   is(ol.querySelectorAll("li").length, nbLI, msgLI);
   is(ol.querySelectorAll("p").length, nbP, msgP);
@@ -104,17 +104,17 @@ function testSection(element, context, s
   is(dl.querySelectorAll("dt").length, nbLI, msgDT);
   is(dl.querySelectorAll("dd").length, 1, msgDD);
   is(dl.querySelectorAll("p").length, nbP, msgP);
 }
 
 function runTests() {
   testSection(document.getElementById("test1"), "editable paragraph in list item", false, false);
   testSection(document.getElementById("test2"), "paragraph in editable list item", false, true);
-  testSection(document.getElementById("test3"), "paragraph in editable list",      true,  false);
+  testSection(document.getElementById("test3"), "paragraph in editable list", true, false);
   /* Note: concerning #test3, it would be preferrable that [Return] creates
    * another paragraph in another list item (i.e. last argument = 'true').
    * Currently it just creates an empty list item, which is acceptable.
    */
   SimpleTest.finish();
 }
 
 </script>
--- a/editor/libeditor/tests/test_bug578771.html
+++ b/editor/libeditor/tests/test_bug578771.html
@@ -25,28 +25,28 @@ https://bugzilla.mozilla.org/show_bug.cg
 
       /** Test for Bug 578771 **/
       SimpleTest.waitForExplicitFinish();
 
       function testElem(elem, elemTag) {
         var ce = document.getElementById("ce");
         ce.focus();
 
-        synthesizeMouse(elem, 5, 5, {clickCount: 2 });   
+        synthesizeMouse(elem, 5, 5, {clickCount: 2 });
         ok(elem.selectionStart == 0 && elem.selectionEnd == 7,
            " Double-clicking on another " + elemTag + " works correctly");
 
         ce.focus();
-        synthesizeMouse(elem, 5, 5, {clickCount: 3 });   
+        synthesizeMouse(elem, 5, 5, {clickCount: 3 });
         ok(elem.selectionStart == 0 && elem.selectionEnd == 14,
            "Triple-clicking on another " + elemTag + " works correctly");
       }
       // Avoid platform selection differences
       SimpleTest.waitForFocus(function() {
-         SpecialPowers.pushPrefEnv({"set":[["layout.word_select.eat_space_to_next_word", false]]}, startTest);
+         SpecialPowers.pushPrefEnv({"set": [["layout.word_select.eat_space_to_next_word", false]]}, startTest);
       });
 
       function startTest() {
          var input = document.getElementById("ip");
          testElem(input, "input");
 
          var textarea = document.getElementById("ta");
          testElem(textarea, "textarea");
--- a/editor/libeditor/tests/test_bug596333.html
+++ b/editor/libeditor/tests/test_bug596333.html
@@ -57,57 +57,56 @@ function paste(str) {
 
 function runOnFocus() {
   var edit = document.getElementById("edit");
 
   gMisspeltWords = ["haz", "cheezburger"];
   ok(isSpellingCheckOk(getEditor(), gMisspeltWords),
      "All misspellings before editing are accounted for.");
   append(" becaz I'm a lulcat!");
-  onSpellCheck(edit, function () {
+  onSpellCheck(edit, function() {
     gMisspeltWords.push("becaz");
     gMisspeltWords.push("lulcat");
     ok(isSpellingCheckOk(getEditor(), gMisspeltWords),
        "All misspellings after typing are accounted for.");
 
     // Now, type an invalid word, and instead of hitting "space" at the end, just blur
     // the textarea and see if the spell check after the blur event catches it.
     append(" workd");
     edit.blur();
-    onSpellCheck(edit, function () {
+    onSpellCheck(edit, function() {
       gMisspeltWords.push("workd");
       ok(isSpellingCheckOk(getEditor(), gMisspeltWords),
          "All misspellings after blur are accounted for.");
 
       // Also, test the case when we're entering the first word in a textarea
       gMisspeltWords = ["workd"];
       edit.value = "";
       append("workd ");
-      onSpellCheck(edit, function () {
+      onSpellCheck(edit, function() {
         ok(isSpellingCheckOk(getEditor(), gMisspeltWords),
            "Misspelling in the first entered word is accounted for.");
 
         // Make sure that pasting would also trigger spell checking for the previous word
         gMisspeltWords = ["workd"];
         edit.value = "";
         append("workd");
         paste("           x");
-        onSpellCheck(edit, function () {
+        onSpellCheck(edit, function() {
           ok(isSpellingCheckOk(getEditor(), gMisspeltWords),
              "Misspelling is accounted for after pasting.");
 
           SimpleTest.finish();
         });
       });
     });
   });
 }
 
-function runTest()
-{
+function runTest() {
   var edit = document.getElementById("edit");
   edit.focus();
 
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm", window);
   onSpellCheck(edit, runOnFocus);
 }
 </script>
--- a/editor/libeditor/tests/test_bug597331.html
+++ b/editor/libeditor/tests/test_bug597331.html
@@ -33,19 +33,19 @@ addLoadEvent(function() {
     t.selectionEnd = 4;
     SimpleTest.executeSoon(function() {
       t.getBoundingClientRect(); // flush layout
       var before = snapshotWindow(window, true);
       t.selectionStart = 5;
       t.selectionEnd = 5;
       t.addEventListener("keydown", function() {
         SimpleTest.executeSoon(function() {
-          t.style.display = 'block';
+          t.style.display = "block";
           document.body.offsetWidth;
-          t.style.display = '';
+          t.style.display = "";
           document.body.offsetWidth;
 
           is(t.selectionStart, 4, "Cursor should be moved correctly");
           is(t.selectionEnd, 4, "Cursor should be moved correctly");
 
           var after = snapshotWindow(window, true);
 
           var result = compareSnapshots(before, after, true);
--- a/editor/libeditor/tests/test_bug611182.html
+++ b/editor/libeditor/tests/test_bug611182.html
@@ -70,35 +70,35 @@ SimpleTest.waitForFocus(function() {
 
       var snapshot = snapshotWindow(win, false);
       ok(compareSnapshots(snapshot, ref, true)[0], "No bogus node should exist in the document");
 
       callback();
     }, {once: true});
     iframe.src = src;
   }
-  
+
   var totalTests = 0;
   var currentTest = 0;
   function runAllTests() {
     if (currentTest == totalTests) {
       SimpleTest.finish();
       return;
     }
-    testBackspace("file_bug611182.sjs?" + currentTest, runAllTests)
+    testBackspace("file_bug611182.sjs?" + currentTest, runAllTests);
     currentTest++;
   }
 
   // query total number of tests to be run from the server and
   // start running all tests.
   var myXHR = new XMLHttpRequest();
   myXHR.open("GET", "file_bug611182.sjs?queryTotalTests");
   myXHR.onload = function(e) {
     totalTests = myXHR.responseText;
     runAllTests();
-  }
+  };
   myXHR.send();
 });
 
 </script>
 </pre>
 </body>
 </html>
--- a/editor/libeditor/tests/test_bug620906.html
+++ b/editor/libeditor/tests/test_bug620906.html
@@ -29,21 +29,21 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 /** Test for Bug 620906 **/
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function() {
   var iframe = document.querySelector("iframe");
   is(iframe.contentWindow.scrollY, 0, "Sanity check");
   var rect = iframe.getBoundingClientRect();
   setTimeout(function() {
-    var onscroll = function () {
+    var onscroll = function() {
       iframe.contentWindow.removeEventListener("scroll", onscroll);
       isnot(iframe.contentWindow.scrollY, 0, "The scrollbar should work");
       SimpleTest.finish();
-    }
+    };
     iframe.contentWindow.addEventListener("scroll", onscroll);
     synthesizeMouse(iframe, rect.width - 5, rect.height / 2, {});
   }, 0);
 });
 
 </script>
 </pre>
 </body>
--- a/editor/libeditor/tests/test_bug629845.html
+++ b/editor/libeditor/tests/test_bug629845.html
@@ -9,41 +9,39 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=629845">Mozilla Bug 629845</a>
 <p id="display"></p>
 
 <script>
-function initFrame(frame)
-{
-  frame.contentWindow.document.designMode="on";
+function initFrame(frame) {
+  frame.contentWindow.document.designMode = "on";
   frame.contentWindow.document.writeln("<body></body>");
 
-  document.getElementsByTagName('button')[0].click();
+  document.getElementsByTagName("button")[0].click();
 }
 
-function command(aName)
-{
-  var frame = document.getElementsByTagName('iframe')[0];
+function command(aName) {
+  var frame = document.getElementsByTagName("iframe")[0];
 
   is(frame.contentDocument.designMode, "on", "design mode should be on!");
   var caught = false;
   try {
     frame.contentDocument.execCommand(aName, false, null);
   } catch (e) {
     ok(false, "exception " + e + " was thrown");
     caught = true;
   }
 
   ok(!caught, "No exception should have been thrown.");
 
   // Stop the document load before finishing, just to be clean.
-  document.getElementsByTagName('iframe')[0].contentWindow.document.close();
+  document.getElementsByTagName("iframe")[0].contentWindow.document.close();
   SimpleTest.finish();
 }
 </script>
 
 <div id="content">
   <button type="button" onclick="command('bold');">Bold</button>
   <iframe onload="initFrame(this);"></iframe>
 </div>
--- a/editor/libeditor/tests/test_bug635636.html
+++ b/editor/libeditor/tests/test_bug635636.html
@@ -15,45 +15,43 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content">
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 635636 **/
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(async function() {
-  function openNewWindow(aURL)
-  {
+  function openNewWindow(aURL) {
     return new Promise(resolve => {
       let contentWindow = window.open(aURL);
       contentWindow.addEventListener("load", () => {
         ok(true, aURL + " is loaded");
         resolve(contentWindow);
       }, { once: true });
     });
   }
 
-  function unloadWindow(aWindow)
-  {
+  function unloadWindow(aWindow) {
     return new Promise(resolve => {
       aWindow.addEventListener("unload", () => {
         ok(true, "The window has been unloaded");
         SimpleTest.executeSoon(() => { resolve(0); });
       }, { once: true });
       aWindow.location = "file_bug635636_2.html";
     });
   }
 
   let contentWindow = await openNewWindow("file_bug635636.xhtml");
 
   contentWindow.addEventListener("load", () => { ok(true, "load"); });
   contentWindow.addEventListener("pageshow", () => { ok(true, "pageshow"); });
 
   let div = contentWindow.document.getElementsByTagName("div")[0];
-  contentWindow.document.designMode = 'on';
+  contentWindow.document.designMode = "on";
 
   await unloadWindow(contentWindow);
 
   div.remove();
   ok(true, "Should not crash");
   // Not needed for the crash
   contentWindow.close();
   SimpleTest.finish();
--- a/editor/libeditor/tests/test_bug636465.html
+++ b/editor/libeditor/tests/test_bug636465.html
@@ -10,24 +10,24 @@
 <script>
 SimpleTest.waitForExplicitFinish();
 
 function runTest() {
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm", window);
   var x = document.getElementById("x");
   x.focus();
-  onSpellCheck(x, function () {
+  onSpellCheck(x, function() {
     x.blur();
     var spellCheckTrue = snapshotWindow(window);
     x.setAttribute("spellcheck", "false");
     var spellCheckFalse = snapshotWindow(window);
     x.setAttribute("spellcheck", "true");
     x.focus();
-    onSpellCheck(x, function () {
+    onSpellCheck(x, function() {
       x.blur();
       var spellCheckTrueAgain = snapshotWindow(window);
       x.removeAttribute("spellcheck");
       var spellCheckNone = snapshotWindow(window);
       var after = snapshotWindow(window);
       var ret = compareSnapshots(spellCheckTrue, spellCheckFalse, false)[0];
       ok(ret,
          "Setting the spellcheck attribute to false should work");
--- a/editor/libeditor/tests/test_bug645914.html
+++ b/editor/libeditor/tests/test_bug645914.html
@@ -17,17 +17,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 bar</textarea>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 645914 **/
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
-  SpecialPowers.pushPrefEnv({"set":[["layout.word_select.eat_space_to_next_word", true],
+  SpecialPowers.pushPrefEnv({"set": [["layout.word_select.eat_space_to_next_word", true],
                                     ["browser.triple_click_selects_paragraph", false]]}, startTest);
 });
 function startTest() {
   var textarea = document.querySelector("textarea");
   textarea.selectionStart = textarea.selectionEnd = 0;
 
   // Simulate a double click on foo
   synthesizeMouse(textarea, 5, 5, {clickCount: 2});
--- a/editor/libeditor/tests/test_bug668599.html
+++ b/editor/libeditor/tests/test_bug668599.html
@@ -28,22 +28,22 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 /** Test for Bug 668599 **/
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTests);
 
 function select(element) {
   // select the element text content
   var userSelection = window.getSelection();
-  window.getSelection().removeAllRanges(); 
+  window.getSelection().removeAllRanges();
   var range = document.createRange();
   range.setStart(element.firstChild, 0);
   range.setEnd(element.firstChild, element.textContent.length);
   userSelection.addRange(range);
-};
+}
 
 function runTests() {
   var span = document.querySelector("#test1 span");
 
   // editable <span> => the <span> *content* should be deleted
   select(span);
   span.focus();
   sendString("x");
--- a/editor/libeditor/tests/test_bug674770-1.html
+++ b/editor/libeditor/tests/test_bug674770-1.html
@@ -18,26 +18,26 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a href="file_bug674770-1.html" id="link2">test</a>
 </div>
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
-  SpecialPowers.pushPrefEnv({"set":[["middlemouse.paste", true]]}, startTests);
+  SpecialPowers.pushPrefEnv({"set": [["middlemouse.paste", true]]}, startTests);
 });
 
 function startTests() {
   var tests = [
     { description: "Testing link in <div>: ",
-      target: function () { return document.querySelector("#link1"); },
+      target() { return document.querySelector("#link1"); },
       linkShouldWork: true },
     { description: "Testing link in <div contenteditable>: ",
-      target: function () { return document.querySelector("#link2"); },
+      target() { return document.querySelector("#link2"); },
       linkShouldWork: false },
   ];
   var currentTest;
   function runNextTest() {
     localStorage.removeItem("clicked");
     currentTest = tests.shift();
     if (!currentTest) {
       SimpleTest.finish();
@@ -50,17 +50,17 @@ function startTests() {
 
   addEventListener("storage", function(e) {
     is(e.key, "clicked", currentTest.description + "Key should always be 'clicked'");
     is(e.newValue, "true", currentTest.description + "Value should always be 'true'");
     ok(currentTest.linkShouldWork, currentTest.description + "The click operation on the link " + (currentTest.linkShouldWork ? "should work" : "shouldn't work"));
     SimpleTest.executeSoon(runNextTest);
   }, false);
 
-  SpecialPowers.addSystemEventListener(window, "click", function (aEvent) {
+  SpecialPowers.addSystemEventListener(window, "click", function(aEvent) {
     // When the click event should cause default action, e.g., opening the link,
     // the event shouldn't have been consumed except the link handler.
     // However, in e10s mode, it's not consumed during propagating the event but
     // in non-e10s mode, it's consumed during the propagation.  Therefore,
     // we cannot check defaultPrevented value when the link should work as is
     // if there is no way to detect if it's running in e10s mode or not.
     // So, let's skip checking Event.defaultPrevented value when the link should
     // work.  In such case, we should receive "storage" event later.
--- a/editor/libeditor/tests/test_bug674770-2.html
+++ b/editor/libeditor/tests/test_bug674770-2.html
@@ -25,34 +25,33 @@ SimpleTest.waitForExplicitFinish();
 var iframe = document.getElementById("iframe");
 var frameWindow, frameDocument;
 
 var gClicked = false;
 var gClicking = null;
 var gDoPreventDefault1 = null;
 var gDoPreventDefault2 = null;
 
-function clickEventHandler(aEvent)
-{
+function clickEventHandler(aEvent) {
   if (aEvent.button == 1 && aEvent.target == gClicking) {
     gClicked = true;
   }
   if (gDoPreventDefault1 == aEvent.target) {
     aEvent.preventDefault();
   }
   if (gDoPreventDefault2 == aEvent.target) {
     aEvent.preventDefault();
   }
 }
 
 // NOTE: tests need to check the result *after* the content is actually
 //       modified.  Sometimes, the modification is delayed. Therefore, there
 //       are a lot of functions and SimpleTest.executeSoon()s.
 SimpleTest.waitForFocus(function() {
-  SpecialPowers.pushPrefEnv({"set":[["middlemouse.contentLoadURL", false],
+  SpecialPowers.pushPrefEnv({"set": [["middlemouse.contentLoadURL", false],
                                     ["middlemouse.paste", true]]}, startTest);
 });
 function startTest() {
   frameWindow = iframe.contentWindow;
   frameDocument = iframe.contentDocument;
 
   frameDocument.getElementById("input").addEventListener("click", clickEventHandler);
   frameDocument.getElementById("editor1").addEventListener("click", clickEventHandler);
@@ -66,27 +65,26 @@ function startTest() {
   } else {
     synthesizeKey("a", { accelKey: true }, frameWindow);
   }
   // Windows and Mac don't have primary selection, we should copy the text to
   // the global clipboard.
   if (!SpecialPowers.supportsSelectionClipboard()) {
     SimpleTest.waitForClipboard("pasted",
       function() { synthesizeKey("c", { accelKey: true }, frameWindow); },
-      function() { SimpleTest.executeSoon(runInputTests1) },
+      function() { SimpleTest.executeSoon(runInputTests1); },
       cleanup);
   } else {
     // Otherwise, don't call waitForClipboard since it breaks primary
     // selection.
     runInputTests1();
   }
 }
 
-function runInputTests1()
-{
+function runInputTests1() {
   var input = frameDocument.getElementById("input");
 
   // first, copy text.
 
   // when middle clicked in focused input element, text should be pasted.
   input.value = "";
   input.focus();
 
@@ -102,18 +100,17 @@ function runInputTests1()
       todo(gClicked, "click event hasn't been fired for runInputTests1");
       is(input.value, "pasted", "failed to paste in input element");
 
       SimpleTest.executeSoon(runInputTests2);
     });
   });
 }
 
-function runInputTests2()
-{
+function runInputTests2() {
   var input = frameDocument.getElementById("input");
 
   // even if the input element hasn't had focus, middle click should set focus
   // to it and paste the text.
   input.value = "";
   input.blur();
 
   SimpleTest.executeSoon(function() {
@@ -129,18 +126,17 @@ function runInputTests2()
       is(input.value, "pasted",
          "failed to paste in input element when it hasn't had focus yet");
 
       SimpleTest.executeSoon(runInputTests3);
     });
   });
 }
 
-function runInputTests3()
-{
+function runInputTests3() {
   var input = frameDocument.getElementById("input");
   var editor1 = frameDocument.getElementById("editor1");
 
   // preventDefault() of HTML editor's click event handler shouldn't prevent
   // middle click pasting in input element.
   input.value = "";
   input.focus();
 
@@ -157,18 +153,17 @@ function runInputTests3()
       is(input.value, "pasted",
          "failed to paste in input element when editor1 does preventDefault()");
 
       SimpleTest.executeSoon(runInputTests4);
     });
   });
 }
 
-function runInputTests4()
-{
+function runInputTests4() {
   var input = frameDocument.getElementById("input");
   var editor1 = frameDocument.getElementById("editor1");
 
   // preventDefault() of input element's click event handler should prevent
   // middle click pasting in it.
   input.value = "";
   input.focus();
 
@@ -185,18 +180,17 @@ function runInputTests4()
       todo_is(input.value, "",
          "pasted in input element when it does preventDefault()");
 
       SimpleTest.executeSoon(runContentEditableTests1);
     });
   });
 }
 
-function runContentEditableTests1()
-{
+function runContentEditableTests1() {
   var editor1 = frameDocument.getElementById("editor1");
 
   // when middle clicked in focused contentediable editor, text should be
   // pasted.
   editor1.innerHTML = "editor1:";
   editor1.focus();
 
   SimpleTest.executeSoon(function() {
@@ -211,18 +205,17 @@ function runContentEditableTests1()
       todo(gClicked, "click event hasn't been fired for runContentEditableTests1");
       is(editor1.innerHTML, "editor1:pasted",
          "failed to paste text in contenteditable editor");
       SimpleTest.executeSoon(runContentEditableTests2);
     });
   });
 }
 
-function runContentEditableTests2()
-{
+function runContentEditableTests2() {
   var editor1 = frameDocument.getElementById("editor1");
 
   // even if the contenteditable editor hasn't had focus, middle click should
   // set focus to it and paste the text.
   editor1.innerHTML = "editor1:";
   editor1.blur();
 
   SimpleTest.executeSoon(function() {
@@ -237,18 +230,17 @@ function runContentEditableTests2()
       todo(gClicked, "click event hasn't been fired for runContentEditableTests2");
       is(editor1.innerHTML, "editor1:pasted",
          "failed to paste in contenteditable editor #1 when it hasn't had focus yet");
       SimpleTest.executeSoon(runContentEditableTests3);
     });
   });
 }
 
-function runContentEditableTests3()
-{
+function runContentEditableTests3() {
   var editor1 = frameDocument.getElementById("editor1");
   var editor2 = frameDocument.getElementById("editor2");
 
   // When editor1 has focus but editor2 is middle clicked, should be pasted
   // in the editor2.
   editor1.innerHTML = "editor1:";
   editor2.innerHTML = "editor2:";
   editor1.focus();
@@ -267,18 +259,17 @@ function runContentEditableTests3()
          "pasted in contenteditable editor #1 when editor2 is clicked");
       is(editor2.innerHTML, "editor2:pasted",
          "failed to paste in contenteditable editor #2 when editor2 is clicked");
       SimpleTest.executeSoon(runContentEditableTests4);
     });
   });
 }
 
-function runContentEditableTests4()
-{
+function runContentEditableTests4() {
   var editor1 = frameDocument.getElementById("editor1");
 
   // preventDefault() of editor1's click event handler should prevent
   // middle click pasting in it.
   editor1.innerHTML = "editor1:";
   editor1.focus();
 
   SimpleTest.executeSoon(function() {
@@ -293,18 +284,17 @@ function runContentEditableTests4()
       todo(gClicked, "click event hasn't been fired for runContentEditableTests4");
       todo_is(editor1.innerHTML, "editor1:",
          "pasted in contenteditable editor #1 when it does preventDefault()");
       SimpleTest.executeSoon(runContentEditableTests5);
     });
   });
 }
 
-function runContentEditableTests5()
-{
+function runContentEditableTests5() {
   var editor1 = frameDocument.getElementById("editor1");
   var editor2 = frameDocument.getElementById("editor2");
 
   // preventDefault() of editor1's click event handler shouldn't prevent
   // middle click pasting in editor2.
   editor1.innerHTML = "editor1:";
   editor2.innerHTML = "editor2:";
   editor2.focus();
@@ -324,29 +314,27 @@ function runContentEditableTests5()
       is(editor2.innerHTML, "editor2:pasted",
          "failed to paste in contenteditable editor #2");
 
       SimpleTest.executeSoon(initForBodyEditableDocumentTests);
     });
   });
 }
 
-function initForBodyEditableDocumentTests()
-{
+function initForBodyEditableDocumentTests() {
   frameDocument.getElementById("input").removeEventListener("click", clickEventHandler);
   frameDocument.getElementById("editor1").removeEventListener("click", clickEventHandler);
   frameDocument.getElementById("editor2").removeEventListener("click", clickEventHandler);
 
   iframe.onload =
-    function (aEvent) { SimpleTest.executeSoon(runBodyEditableDocumentTests1); };
+    function(aEvent) { SimpleTest.executeSoon(runBodyEditableDocumentTests1); };
   iframe.srcdoc = "<body contenteditable>body:</body>";
 }
 
-function runBodyEditableDocumentTests1()
-{
+function runBodyEditableDocumentTests1() {
   frameWindow = iframe.contentWindow;
   frameDocument = iframe.contentDocument;
 
   var body = frameDocument.body;
 
   is(body.innerHTML, "body:",
      "failed to initialize at runBodyEditableDocumentTests1");
 
@@ -357,18 +345,17 @@ function runBodyEditableDocumentTests1()
     is(body.innerHTML,
        "body:pasted",
        "failed to paste in editable body element when clicked on html element");
 
     SimpleTest.executeSoon(runBodyEditableDocumentTests2);
   });
 }
 
-function runBodyEditableDocumentTests2()
-{
+function runBodyEditableDocumentTests2() {
   frameDocument.body.innerHTML = "body:<span id='span' contenteditable='false'>non-editable</span>";
 
   var body = frameDocument.body;
 
   is(body.innerHTML, "body:<span id=\"span\" contenteditable=\"false\">non-editable</span>",
      "failed to initialize at runBodyEditableDocumentTests2");
 
   synthesizeMouseAtCenter(frameDocument.getElementById("span"), {button: 1}, frameWindow);
@@ -377,17 +364,16 @@ function runBodyEditableDocumentTests2()
     is(body.innerHTML,
        "body:<span id=\"span\" contenteditable=\"false\">non-editable</span>",
        "pasted when middle clicked in non-editable element");
 
     SimpleTest.executeSoon(cleanup);
   });
 }
 
-function cleanup()
-{
+function cleanup() {
   SimpleTest.finish();
 }
 
 </script>
 </pre>
 </body>
 </html>
--- a/editor/libeditor/tests/test_bug674861.html
+++ b/editor/libeditor/tests/test_bug674861.html
@@ -81,34 +81,34 @@ function try2split(element, caretPos) {
   // compute the requested position
   var len = element.textContent.length;
   var pos = -1;
   switch (caretPos) {
     case CARET_BEGIN:
       pos = 0;
       break;
     case CARET_MIDDLE:
-      pos = Math.floor(len/2);
+      pos = Math.floor(len / 2);
       break;
     case CARET_END:
       pos = len;
       break;
   }
 
   // put the caret on the requested position
   var sel = window.getSelection();
   for (var i = 0; i < sel.rangeCount; i++) {
     var range = sel.getRangeAt(i);
     sel.removeRange(range);
   }
   range = document.createRange();
   range.setStart(element.firstChild, pos);
   range.setEnd(element.firstChild, pos);
   sel.addRange(range);
-  
+
   // simulates two [Return] keypresses
   synthesizeKey("KEY_Enter");
   synthesizeKey("KEY_Enter");
 }
 
 function runTests() {
   const test1 = document.getElementById("test1");
   const test2 = document.getElementById("test2");
--- a/editor/libeditor/tests/test_bug676401.html
+++ b/editor/libeditor/tests/test_bug676401.html
@@ -37,18 +37,17 @@ var alwaysEnabledCommands = [
   "cut",
   "enableInlineTableEditing",
   "enableObjectResizing",
   "insertBrOnReturn",
   "selectAll",
   "styleWithCSS",
 ];
 
-function ensureNobodyHasFocus()
-{
+function ensureNobodyHasFocus() {
   document.activeElement.blur();
 }
 
 function IsCommandEnabled(command) {
   var enabled;
 
   ensureNobodyHasFocus();
 
@@ -76,17 +75,17 @@ function runTests() {
     "fontName", "fontSize",
     "justifyLeft", "justifyCenter", "justifyRight", "justifyFull",
     "indent", "outdent",
     "insertOrderedList", "insertUnorderedList", "insertParagraph",
     "heading", "formatBlock",
     "contentReadOnly", "createLink",
     "decreaseFontSize", "increaseFontSize",
     "insertHTML", "insertHorizontalRule", "insertImage",
-    "removeFormat", "selectAll", "styleWithCSS"
+    "removeFormat", "selectAll", "styleWithCSS",
   ];
   document.execCommand("styleWithCSS", false, false);
   for (i = 0; i < commands.length; i++)
     IsCommandEnabled(commands[i]);
   document.execCommand("styleWithCSS", false, true);
   for (i = 0; i < commands.length; i++)
     IsCommandEnabled(commands[i]);
 
--- a/editor/libeditor/tests/test_bug677752.html
+++ b/editor/libeditor/tests/test_bug677752.html
@@ -29,56 +29,56 @@ function selectEditor(aEditor) {
   aEditor.focus();
   var selection = window.getSelection();
   selection.selectAllChildren(aEditor);
   selection.collapseToStart();
 }
 
 function runTests() {
   var editor, node, initialHTML;
-  document.execCommand('styleWithCSS', false, true);
+  document.execCommand("styleWithCSS", false, true);
 
   // editable <section>
   editor = document.querySelector("section[contenteditable]");
   initialHTML = editor.innerHTML;
   selectEditor(editor);
   // editable <section>: justify
   document.execCommand("justifyright", false, null);
   node = editor.querySelector("*");
   is(node.nodeName.toLowerCase(), "div", "'justifyright' should create a <div> in the editable <section>.");
-  is(node.style.textAlign,      "right", "'justifyright' should create a 'text-align: right' CSS rule.");
+  is(node.style.textAlign, "right", "'justifyright' should create a 'text-align: right' CSS rule.");
   document.execCommand("undo", false, null);
   // editable <section>: indent
   document.execCommand("indent", false, null);
   node = editor.querySelector("*");
   is(node.nodeName.toLowerCase(), "div", "'indent' should create a <div> in the editable <section>.");
-  is(node.style.marginLeft,      "40px", "'indent' should create a 'margin-left: 40px' CSS rule.");
+  is(node.style.marginLeft, "40px", "'indent' should create a 'margin-left: 40px' CSS rule.");
   // editable <section>: undo with outdent
   // this should remove the whole <div> but only removing the CSS rule would be acceptable, too
   document.execCommand("outdent", false, null);
   is(editor.innerHTML, initialHTML, "'outdent' should undo the 'indent' action.");
   // editable <section>: outdent again
   document.execCommand("outdent", false, null);
   is(editor.innerHTML, initialHTML, "another 'outdent' should not modify the <section> element.");
 
   // editable <div>
   editor = document.querySelector("div[contenteditable]");
   initialHTML = editor.innerHTML;
   selectEditor(editor);
   // editable <div>: justify
   document.execCommand("justifyright", false, null);
   node = editor.querySelector("*");
   is(node.nodeName.toLowerCase(), "div", "'justifyright' should create a <div> in the editable <div>.");
-  is(node.style.textAlign,      "right", "'justifyright' should create a 'text-align: right' CSS rule.");
+  is(node.style.textAlign, "right", "'justifyright' should create a 'text-align: right' CSS rule.");
   document.execCommand("undo", false, null);
   // editable <div>: indent
   document.execCommand("indent", false, null);
   node = editor.querySelector("*");
   is(node.nodeName.toLowerCase(), "div", "'indent' should create a <div> in the editable <div>.");
-  is(node.style.marginLeft,      "40px", "'indent' should create a 'margin-left: 40px' CSS rule.");
+  is(node.style.marginLeft, "40px", "'indent' should create a 'margin-left: 40px' CSS rule.");
   // editable <div>: undo with outdent
   // this should remove the whole <div> but only removing the CSS rule would be acceptable, too
   document.execCommand("outdent", false, null);
   is(editor.innerHTML, initialHTML, "'outdent' should undo the 'indent' action.");
   // editable <div>: outdent again
   document.execCommand("outdent", false, null);
   is(editor.innerHTML, initialHTML, "another 'outdent' should not modify the <div> element.");
 
--- a/editor/libeditor/tests/test_bug686203.html
+++ b/editor/libeditor/tests/test_bug686203.html
@@ -25,24 +25,24 @@ https://bugzilla.mozilla.org/show_bug.cg
 
       /** Test for Bug 686203 **/
       SimpleTest.waitForExplicitFinish();
       SimpleTest.waitForFocus(function() {
         var ce = document.getElementById("ce");
         var input = document.getElementById("input");
         ce.focus();
       
-        var eventDetails = { button : 2 };
+        var eventDetails = { button: 2 };
         synthesizeMouseAtCenter(input, eventDetails);
 
         sendString("Z");
 
         /* check values */
         is(input.value, "Z", "input correctly focused after right-click");
-        is(ce.textContent, "abc", "contenteditable correctly blurred after right-click on input"); 
+        is(ce.textContent, "abc", "contenteditable correctly blurred after right-click on input");
 
         SimpleTest.finish();
       });
    </script>
   </pre>
 
   <input type="text" value="" id="input" />
   <div id="ce" contenteditable="true">abc</div>
--- a/editor/libeditor/tests/test_bug697842.html
+++ b/editor/libeditor/tests/test_bug697842.html
@@ -21,18 +21,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </pre>
 
 <script class="testbody" type="application/javascript">
 
 /** Test for Bug 697842 **/
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTests);
 
-function runTests()
-{
+function runTests() {
   var editor = document.getElementById("editor");
   editor.focus();
 
   SimpleTest.executeSoon(function() {
     var composingString = "";
 
     function handler(aEvent) {
       switch (aEvent.type) {
@@ -58,46 +57,46 @@ function runTests()
 
     // input first character
     composingString = "\u306B";
     synthesizeCompositionChange(
       { "composition":
         { "string": composingString,
           "clauses":
           [
-            { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
-          ]
+            { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE },
+          ],
         },
-        "caret": { "start": 1, "length": 0 }
+        "caret": { "start": 1, "length": 0 },
       });
 
     // input second character
     composingString = "\u306B\u3085";
     synthesizeCompositionChange(
       { "composition":
         { "string": composingString,
           "clauses":
           [
-            { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
-          ]
+            { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE },
+          ],
         },
-        "caret": { "start": 2, "length": 0 }
+        "caret": { "start": 2, "length": 0 },
       });
 
     // convert them
     synthesizeCompositionChange(
       { "composition":
         { "string": composingString,
           "clauses":
           [
             { "length": 2,
-              "attr": COMPOSITION_ATTR_SELECTED_CLAUSE }
-          ]
+              "attr": COMPOSITION_ATTR_SELECTED_CLAUSE },
+          ],
         },
-        "caret": { "start": 2, "length": 0 }
+        "caret": { "start": 2, "length": 0 },
       });
 
     synthesizeComposition({ type: "compositioncommitasis" });
 
     is(editor.innerHTML, composingString,
        "editor has unexpected result");
 
     editor.removeEventListener("compositionstart", handler, true);
--- a/editor/libeditor/tests/test_bug772796.html
+++ b/editor/libeditor/tests/test_bug772796.html
@@ -18,132 +18,132 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 
 <div id="editable" contenteditable></div>
 
 <pre id="test">
 
   <script type="application/javascript">
     var tests = [
-/*00*/[ "<div>test</div><pre>foobar\nbaz</pre>",                  "<div>testfoobar\n</div><pre>baz</pre>" ],
-/*01*/[ "<div>test</div><pre><b>foobar\nbaz</b></pre>",           "<div>test<b>foobar\n</b></div><pre><b>baz</b></pre>" ],
-/*02*/[ "<div>test</div><pre><b>foo</b>bar\nbaz</pre>",           "<div>test<b>foo</b>bar\n</div><pre>baz</pre>" ],
-/*03*/[ "<div>test</div><pre><b>foo</b>\nbar</pre>",              "<div>test<b>foo</b>\n</div><pre>bar</pre>" ],
-/*04*/[ "<div>test</div><pre><b>foo\n</b>bar\nbaz</pre>",         "<div>test<b>foo\n</b></div><pre>bar\nbaz</pre>" ],
+/* 00*/[ "<div>test</div><pre>foobar\nbaz</pre>",                  "<div>testfoobar\n</div><pre>baz</pre>" ],
+/* 01*/[ "<div>test</div><pre><b>foobar\nbaz</b></pre>",           "<div>test<b>foobar\n</b></div><pre><b>baz</b></pre>" ],
+/* 02*/[ "<div>test</div><pre><b>foo</b>bar\nbaz</pre>",           "<div>test<b>foo</b>bar\n</div><pre>baz</pre>" ],
+/* 03*/[ "<div>test</div><pre><b>foo</b>\nbar</pre>",              "<div>test<b>foo</b>\n</div><pre>bar</pre>" ],
+/* 04*/[ "<div>test</div><pre><b>foo\n</b>bar\nbaz</pre>",         "<div>test<b>foo\n</b></div><pre>bar\nbaz</pre>" ],
       /* The <br> after the foobar is unfortunate but is behaviour that hasn't changed in bug 772796. */
-/*05*/[ "<div>test</div><pre>foobar<br>baz</pre>",                "<div>testfoobar<br></div><pre>baz</pre>" ],
-/*06*/[ "<div>test</div><pre><b>foobar<br>baz</b></pre>",         "<div>test<b>foobar</b><br></div><pre><b>baz</b></pre>" ],
+/* 05*/[ "<div>test</div><pre>foobar<br>baz</pre>",                "<div>testfoobar<br></div><pre>baz</pre>" ],
+/* 06*/[ "<div>test</div><pre><b>foobar<br>baz</b></pre>",         "<div>test<b>foobar</b><br></div><pre><b>baz</b></pre>" ],
 
       /*
        * Some tests with block elements.
        * Tests 07, 09 and 11 don't use "MoveBlock", they use "JoinNodesSmart".
        * Test 11 is a pain: <div>foo\bar</div> is be joined to "test", losing the visible line break.
        */
-/*07*/[ "<div>test</div><pre><div>foobar</div>baz</pre>",         "<div>testfoobar</div><pre>baz</pre>" ],
-/*08*/[ "<div>test</div><pre>foobar<div>baz</div></pre>",         "<div>testfoobar</div><pre><div>baz</div></pre>" ],
-/*09*/[ "<div>test</div><pre><div>foobar</div>baz\nfred</pre>",   "<div>testfoobar</div><pre>baz\nfred</pre>" ],
-/*10*/[ "<div>test</div><pre>foobar<div>baz</div>\nfred</pre>",   "<div>testfoobar</div><pre><div>baz</div>\nfred</pre>" ],
-/*11*/[ "<div>test</div><pre><div>foo\nbar</div>baz\nfred</pre>", "<div>testfoo\nbar</div><pre>baz\nfred</pre>" ], // BAD
-/*12*/[ "<div>test</div><pre>foo<div>bar</div>baz\nfred</pre>",   "<div>testfoo</div><pre><div>bar</div>baz\nfred</pre>" ],
+/* 07*/[ "<div>test</div><pre><div>foobar</div>baz</pre>",         "<div>testfoobar</div><pre>baz</pre>" ],
+/* 08*/[ "<div>test</div><pre>foobar<div>baz</div></pre>",         "<div>testfoobar</div><pre><div>baz</div></pre>" ],
+/* 09*/[ "<div>test</div><pre><div>foobar</div>baz\nfred</pre>",   "<div>testfoobar</div><pre>baz\nfred</pre>" ],
+/* 10*/[ "<div>test</div><pre>foobar<div>baz</div>\nfred</pre>",   "<div>testfoobar</div><pre><div>baz</div>\nfred</pre>" ],
+/* 11*/[ "<div>test</div><pre><div>foo\nbar</div>baz\nfred</pre>", "<div>testfoo\nbar</div><pre>baz\nfred</pre>" ], // BAD
+/* 12*/[ "<div>test</div><pre>foo<div>bar</div>baz\nfred</pre>",   "<div>testfoo</div><pre><div>bar</div>baz\nfred</pre>" ],
 
       /*
        * Repeating all tests above with the <pre> on a new line.
        * We know that backspace doesn't work (bug 1190161). Third argument shows the current outcome.
        */
-/*13-00*/[ "<div>test</div>\n<pre>foobar\nbaz</pre>",                  "<div>testfoobar\n</div><pre>baz</pre>",
+/* 13-00*/[ "<div>test</div>\n<pre>foobar\nbaz</pre>",                  "<div>testfoobar\n</div><pre>baz</pre>",
                                                                        "<div>test</div>foobar\n<pre>baz</pre>" ],
-/*14-01*/[ "<div>test</div>\n<pre><b>foobar\nbaz</b></pre>",           "<div>test<b>foobar\n</b></div><pre><b>baz</b></pre>",
+/* 14-01*/[ "<div>test</div>\n<pre><b>foobar\nbaz</b></pre>",           "<div>test<b>foobar\n</b></div><pre><b>baz</b></pre>",
                                                                        "<div>test</div><b>foobar\n</b><pre><b>baz</b></pre>" ],
-/*15-02*/[ "<div>test</div>\n<pre><b>foo</b>bar\nbaz</pre>",           "<div>test<b>foo</b>bar\n</div><pre>baz</pre>",
+/* 15-02*/[ "<div>test</div>\n<pre><b>foo</b>bar\nbaz</pre>",           "<div>test<b>foo</b>bar\n</div><pre>baz</pre>",
                                                                        "<div>test</div><b>foo</b>bar\n<pre>baz</pre>" ],
-/*16-03*/[ "<div>test</div>\n<pre><b>foo</b>\nbar</pre>",              "<div>test<b>foo</b>\n</div><pre>bar</pre>",
+/* 16-03*/[ "<div>test</div>\n<pre><b>foo</b>\nbar</pre>",              "<div>test<b>foo</b>\n</div><pre>bar</pre>",
                                                                        "<div>test</div><b>foo</b>\n<pre>bar</pre>" ],
-/*17-04*/[ "<div>test</div>\n<pre><b>foo\n</b>bar\nbaz</pre>",         "<div>test<b>foo\n</b></div><pre>bar\nbaz</pre>",
+/* 17-04*/[ "<div>test</div>\n<pre><b>foo\n</b>bar\nbaz</pre>",         "<div>test<b>foo\n</b></div><pre>bar\nbaz</pre>",
                                                                        "<div>test</div><b>foo\n</b><pre>bar\nbaz</pre>" ],
-/*18-05*/[ "<div>test</div>\n<pre>foobar<br>baz</pre>",                "<div>testfoobar<br></div><pre>baz</pre>",
+/* 18-05*/[ "<div>test</div>\n<pre>foobar<br>baz</pre>",                "<div>testfoobar<br></div><pre>baz</pre>",
                                                                        "<div>test</div>foobar<br><pre>baz</pre>" ],
-/*19-06*/[ "<div>test</div>\n<pre><b>foobar<br>baz</b></pre>",         "<div>test<b>foobar</b><br></div><pre><b>baz</b></pre>",
+/* 19-06*/[ "<div>test</div>\n<pre><b>foobar<br>baz</b></pre>",         "<div>test<b>foobar</b><br></div><pre><b>baz</b></pre>",
                                                                        "<div>test</div><b>foobar</b><br><pre><b>baz</b></pre>" ],
-/*20-07*/[ "<div>test</div>\n<pre><div>foobar</div>baz</pre>",         "<div>testfoobar</div><pre>baz</pre>",
+/* 20-07*/[ "<div>test</div>\n<pre><div>foobar</div>baz</pre>",         "<div>testfoobar</div><pre>baz</pre>",
                                                                        "<div>test</div>foobar<pre>baz</pre>" ],
-/*21-08*/[ "<div>test</div>\n<pre>foobar<div>baz</div></pre>",         "<div>testfoobar</div><pre><div>baz</div></pre>",
+/* 21-08*/[ "<div>test</div>\n<pre>foobar<div>baz</div></pre>",         "<div>testfoobar</div><pre><div>baz</div></pre>",
                                                                        "<div>test</div>foobar<pre><div>baz</div></pre>" ],
-/*22-09*/[ "<div>test</div>\n<pre><div>foobar</div>baz\nfred</pre>",   "<div>testfoobar</div><pre>baz\nfred</pre>",
+/* 22-09*/[ "<div>test</div>\n<pre><div>foobar</div>baz\nfred</pre>",   "<div>testfoobar</div><pre>baz\nfred</pre>",
                                                                        "<div>test</div>foobar<pre>baz\nfred</pre>" ],
-/*23-10*/[ "<div>test</div>\n<pre>foobar<div>baz</div>\nfred</pre>",   "<div>testfoobar</div><pre><div>baz</div>\nfred</pre>",
+/* 23-10*/[ "<div>test</div>\n<pre>foobar<div>baz</div>\nfred</pre>",   "<div>testfoobar</div><pre><div>baz</div>\nfred</pre>",
                                                                        "<div>test</div>foobar<pre><div>baz</div>\nfred</pre>" ],
-/*24-11*/[ "<div>test</div>\n<pre><div>foo\nbar</div>baz\nfred</pre>", "<div>testfoo\nbar</div><pre>baz\nfred</pre>", // BAD
+/* 24-11*/[ "<div>test</div>\n<pre><div>foo\nbar</div>baz\nfred</pre>", "<div>testfoo\nbar</div><pre>baz\nfred</pre>", // BAD
                                                                        "<div>test</div>foo\n<pre><div>bar</div>baz\nfred</pre>" ],
-/*25-12*/[ "<div>test</div>\n<pre>foo<div>bar</div>baz\nfred</pre>",   "<div>testfoo</div><pre><div>bar</div>baz\nfred</pre>",
+/* 25-12*/[ "<div>test</div>\n<pre>foo<div>bar</div>baz\nfred</pre>",   "<div>testfoo</div><pre><div>bar</div>baz\nfred</pre>",
                                                                        "<div>test</div>foo<pre><div>bar</div>baz\nfred</pre>" ],
 
       /* Some tests without <div>. These exercise the MoveBlock "right in left" */
-/*26-00*/[ "test<pre>foobar\nbaz</pre>",                  "testfoobar\n<pre>baz</pre>" ],
-/*27-01*/[ "test<pre><b>foobar\nbaz</b></pre>",           "test<b>foobar\n</b><pre><b>baz</b></pre>" ],
-/*28-02*/[ "test<pre><b>foo</b>bar\nbaz</pre>",           "test<b>foo</b>bar\n<pre>baz</pre>" ],
-/*29-03*/[ "test<pre><b>foo</b>\nbar</pre>",              "test<b>foo</b>\n<pre>bar</pre>" ],
-/*30-04*/[ "test<pre><b>foo\n</b>bar\nbaz</pre>",         "test<b>foo\n</b><pre>bar\nbaz</pre>" ],
-/*31-05*/[ "test<pre>foobar<br>baz</pre>",                "testfoobar<br><pre>baz</pre>" ],
-/*32-06*/[ "test<pre><b>foobar<br>baz</b></pre>",         "test<b>foobar</b><br><pre><b>baz</b></pre>" ],
-/*33-07*/[ "test<pre><div>foobar</div>baz</pre>",         "testfoobar<pre>baz</pre>" ],
-/*34-08*/[ "test<pre>foobar<div>baz</div></pre>",         "testfoobar<pre><div>baz</div></pre>" ],
-/*35-09*/[ "test<pre><div>foobar</div>baz\nfred</pre>",   "testfoobar<pre>baz\nfred</pre>" ],
-/*36-10*/[ "test<pre>foobar<div>baz</div>\nfred</pre>",   "testfoobar<pre><div>baz</div>\nfred</pre>" ],
-/*37-11*/[ "test<pre><div>foo\nbar</div>baz\nfred</pre>", "testfoo\n<pre><div>bar</div>baz\nfred</pre>" ],
-/*38-12*/[ "test<pre>foo<div>bar</div>baz\nfred</pre>",   "testfoo<pre><div>bar</div>baz\nfred</pre>" ],
+/* 26-00*/[ "test<pre>foobar\nbaz</pre>",                  "testfoobar\n<pre>baz</pre>" ],
+/* 27-01*/[ "test<pre><b>foobar\nbaz</b></pre>",           "test<b>foobar\n</b><pre><b>baz</b></pre>" ],
+/* 28-02*/[ "test<pre><b>foo</b>bar\nbaz</pre>",           "test<b>foo</b>bar\n<pre>baz</pre>" ],
+/* 29-03*/[ "test<pre><b>foo</b>\nbar</pre>",              "test<b>foo</b>\n<pre>bar</pre>" ],
+/* 30-04*/[ "test<pre><b>foo\n</b>bar\nbaz</pre>",         "test<b>foo\n</b><pre>bar\nbaz</pre>" ],
+/* 31-05*/[ "test<pre>foobar<br>baz</pre>",                "testfoobar<br><pre>baz</pre>" ],
+/* 32-06*/[ "test<pre><b>foobar<br>baz</b></pre>",         "test<b>foobar</b><br><pre><b>baz</b></pre>" ],
+/* 33-07*/[ "test<pre><div>foobar</div>baz</pre>",         "testfoobar<pre>baz</pre>" ],
+/* 34-08*/[ "test<pre>foobar<div>baz</div></pre>",         "testfoobar<pre><div>baz</div></pre>" ],
+/* 35-09*/[ "test<pre><div>foobar</div>baz\nfred</pre>",   "testfoobar<pre>baz\nfred</pre>" ],
+/* 36-10*/[ "test<pre>foobar<div>baz</div>\nfred</pre>",   "testfoobar<pre><div>baz</div>\nfred</pre>" ],
+/* 37-11*/[ "test<pre><div>foo\nbar</div>baz\nfred</pre>", "testfoo\n<pre><div>bar</div>baz\nfred</pre>" ],
+/* 38-12*/[ "test<pre>foo<div>bar</div>baz\nfred</pre>",   "testfoo<pre><div>bar</div>baz\nfred</pre>" ],
 
       /*
        * Some tests with <span class="pre">. Again 07, 09 and 11 use "JoinNodesSmart".
        * All these exercise MoveBlock "left in right". The "right" is the surrounding "contenteditable" div.
        */
-/*39-00*/[ "<div>test</div><span class=\"pre\">foobar\nbaz</span>",                  "<div>test<span class=\"pre\">foobar\n</span></div><span class=\"pre\">baz</span>" ],
-/*40-01*/[ "<div>test</div><span class=\"pre\"><b>foobar\nbaz</b></span>",           "<div>test<span class=\"pre\"><b>foobar\n</b></span></div><span class=\"pre\"><b>baz</b></span>" ],
-/*41-02*/[ "<div>test</div><span class=\"pre\"><b>foo</b>bar\nbaz</span>",           "<div>test<span class=\"pre\"><b>foo</b>bar\n</span></div><span class=\"pre\">baz</span>" ],
-/*42-03*/[ "<div>test</div><span class=\"pre\"><b>foo</b>\nbar</span>",              "<div>test<span class=\"pre\"><b>foo</b>\n</span></div><span class=\"pre\">bar</span>" ],
-/*43-04*/[ "<div>test</div><span class=\"pre\"><b>foo\n</b>bar\nbaz</span>",         "<div>test<span class=\"pre\"><b>foo\n</b></span></div><span class=\"pre\">bar\nbaz</span>" ],
-/*44-05*/[ "<div>test</div><span class=\"pre\">foobar<br>baz</span>",                "<div>test<span class=\"pre\">foobar</span><br><span class=\"pre\"></span></div><span class=\"pre\">baz</span>" ],
-/*45-06*/[ "<div>test</div><span class=\"pre\"><b>foobar<br>baz</b></span>",         "<div>test<span class=\"pre\"><b>foobar</b></span><br><span class=\"pre\"></span></div><span class=\"pre\"><b>baz</b></span>" ],
-/*46-07*/[ "<div>test</div><span class=\"pre\"><div>foobar</div>baz</span>",         "<div>testfoobar</div><span class=\"pre\">baz</span>" ],
-/*47-08*/[ "<div>test</div><span class=\"pre\">foobar<div>baz</div></span>",         "<div>test<span class=\"pre\">foobar</span></div><span class=\"pre\"><div>baz</div></span>" ],
-/*48-09*/[ "<div>test</div><span class=\"pre\"><div>foobar</div>baz\nfred</span>",   "<div>testfoobar</div><span class=\"pre\">baz\nfred</span>" ],
-/*49-10*/[ "<div>test</div><span class=\"pre\">foobar<div>baz</div>\nfred</span>",   "<div>test<span class=\"pre\">foobar</span></div><span class=\"pre\"><div>baz</div>\nfred</span>" ],
-/*50-11*/[ "<div>test</div><span class=\"pre\"><div>foo\nbar</div>baz\nfred</span>", "<div>testfoo\nbar</div><span class=\"pre\">baz\nfred</span>" ], // BAD
-/*51-12*/[ "<div>test</div><span class=\"pre\">foo<div>bar</div>baz\nfred</span>",   "<div>test<span class=\"pre\">foo</span></div><span class=\"pre\"><div>bar</div>baz\nfred</span>" ],
+/* 39-00*/[ "<div>test</div><span class=\"pre\">foobar\nbaz</span>",                  "<div>test<span class=\"pre\">foobar\n</span></div><span class=\"pre\">baz</span>" ],
+/* 40-01*/[ "<div>test</div><span class=\"pre\"><b>foobar\nbaz</b></span>",           "<div>test<span class=\"pre\"><b>foobar\n</b></span></div><span class=\"pre\"><b>baz</b></span>" ],
+/* 41-02*/[ "<div>test</div><span class=\"pre\"><b>foo</b>bar\nbaz</span>",           "<div>test<span class=\"pre\"><b>foo</b>bar\n</span></div><span class=\"pre\">baz</span>" ],
+/* 42-03*/[ "<div>test</div><span class=\"pre\"><b>foo</b>\nbar</span>",              "<div>test<span class=\"pre\"><b>foo</b>\n</span></div><span class=\"pre\">bar</span>" ],
+/* 43-04*/[ "<div>test</div><span class=\"pre\"><b>foo\n</b>bar\nbaz</span>",         "<div>test<span class=\"pre\"><b>foo\n</b></span></div><span class=\"pre\">bar\nbaz</span>" ],
+/* 44-05*/[ "<div>test</div><span class=\"pre\">foobar<br>baz</span>",                "<div>test<span class=\"pre\">foobar</span><br><span class=\"pre\"></span></div><span class=\"pre\">baz</span>" ],
+/* 45-06*/[ "<div>test</div><span class=\"pre\"><b>foobar<br>baz</b></span>",         "<div>test<span class=\"pre\"><b>foobar</b></span><br><span class=\"pre\"></span></div><span class=\"pre\"><b>baz</b></span>" ],
+/* 46-07*/[ "<div>test</div><span class=\"pre\"><div>foobar</div>baz</span>",         "<div>testfoobar</div><span class=\"pre\">baz</span>" ],
+/* 47-08*/[ "<div>test</div><span class=\"pre\">foobar<div>baz</div></span>",         "<div>test<span class=\"pre\">foobar</span></div><span class=\"pre\"><div>baz</div></span>" ],
+/* 48-09*/[ "<div>test</div><span class=\"pre\"><div>foobar</div>baz\nfred</span>",   "<div>testfoobar</div><span class=\"pre\">baz\nfred</span>" ],
+/* 49-10*/[ "<div>test</div><span class=\"pre\">foobar<div>baz</div>\nfred</span>",   "<div>test<span class=\"pre\">foobar</span></div><span class=\"pre\"><div>baz</div>\nfred</span>" ],
+/* 50-11*/[ "<div>test</div><span class=\"pre\"><div>foo\nbar</div>baz\nfred</span>", "<div>testfoo\nbar</div><span class=\"pre\">baz\nfred</span>" ], // BAD
+/* 51-12*/[ "<div>test</div><span class=\"pre\">foo<div>bar</div>baz\nfred</span>",   "<div>test<span class=\"pre\">foo</span></div><span class=\"pre\"><div>bar</div>baz\nfred</span>" ],
 
       /* Some tests with <div class="pre">. */
       /*
        * The results are pretty ugly, since joining two <divs> sadly carrys the properties of the right to the left,
        * but not in all cases: 07, 09, 11 are actually right. All cases use "JoinNodesSmart".
        * Here we merely document the ugly behaviour. See bug 1191875 for more information.
        */
-/*52-00*/[ "<div>test</div><div class=\"pre\">foobar\nbaz</div>",                  "<div class=\"pre\">testfoobar\nbaz</div>" ],
-/*53-01*/[ "<div>test</div><div class=\"pre\"><b>foobar\nbaz</b></div>",           "<div class=\"pre\">test<b>foobar\nbaz</b></div>" ],
-/*54-02*/[ "<div>test</div><div class=\"pre\"><b>foo</b>bar\nbaz</div>",           "<div class=\"pre\">test<b>foo</b>bar\nbaz</div>" ],
-/*55-03*/[ "<div>test</div><div class=\"pre\"><b>foo</b>\nbar</div>",              "<div class=\"pre\">test<b>foo</b>\nbar</div>" ],
-/*56-04*/[ "<div>test</div><div class=\"pre\"><b>foo\n</b>bar\nbaz</div>",         "<div class=\"pre\">test<b>foo\n</b>bar\nbaz</div>" ],
-/*57-05*/[ "<div>test</div><div class=\"pre\">foobar<br>baz</div>",                "<div class=\"pre\">testfoobar<br>baz</div>" ],
-/*58-06*/[ "<div>test</div><div class=\"pre\"><b>foobar<br>baz</b></div>",         "<div class=\"pre\">test<b>foobar<br>baz</b></div>" ],
-/*59-07*/[ "<div>test</div><div class=\"pre\"><div>foobar</div>baz</div>",         "<div>testfoobar</div><div class=\"pre\">baz</div>" ],
-/*60-08*/[ "<div>test</div><div class=\"pre\">foobar<div>baz</div></div>",         "<div class=\"pre\">testfoobar<div>baz</div></div>" ],
-/*61-09*/[ "<div>test</div><div class=\"pre\"><div>foobar</div>baz\nfred</div>",   "<div>testfoobar</div><div class=\"pre\">baz\nfred</div>" ],
-/*62-10*/[ "<div>test</div><div class=\"pre\">foobar<div>baz</div>\nfred</div>",   "<div class=\"pre\">testfoobar<div>baz</div>\nfred</div>" ],
-/*63-11*/[ "<div>test</div><div class=\"pre\"><div>foo\nbar</div>baz\nfred</div>", "<div>testfoo\nbar</div><div class=\"pre\">baz\nfred</div>" ], // BAD
-/*64-12*/[ "<div>test</div><div class=\"pre\">foo<div>bar</div>baz\nfred</div>",   "<div class=\"pre\">testfoo<div>bar</div>baz\nfred</div>" ],
+/* 52-00*/[ "<div>test</div><div class=\"pre\">foobar\nbaz</div>",                  "<div class=\"pre\">testfoobar\nbaz</div>" ],
+/* 53-01*/[ "<div>test</div><div class=\"pre\"><b>foobar\nbaz</b></div>",           "<div class=\"pre\">test<b>foobar\nbaz</b></div>" ],
+/* 54-02*/[ "<div>test</div><div class=\"pre\"><b>foo</b>bar\nbaz</div>",           "<div class=\"pre\">test<b>foo</b>bar\nbaz</div>" ],
+/* 55-03*/[ "<div>test</div><div class=\"pre\"><b>foo</b>\nbar</div>",              "<div class=\"pre\">test<b>foo</b>\nbar</div>" ],
+/* 56-04*/[ "<div>test</div><div class=\"pre\"><b>foo\n</b>bar\nbaz</div>",         "<div class=\"pre\">test<b>foo\n</b>bar\nbaz</div>" ],
+/* 57-05*/[ "<div>test</div><div class=\"pre\">foobar<br>baz</div>",                "<div class=\"pre\">testfoobar<br>baz</div>" ],
+/* 58-06*/[ "<div>test</div><div class=\"pre\"><b>foobar<br>baz</b></div>",         "<div class=\"pre\">test<b>foobar<br>baz</b></div>" ],
+/* 59-07*/[ "<div>test</div><div class=\"pre\"><div>foobar</div>baz</div>",         "<div>testfoobar</div><div class=\"pre\">baz</div>" ],
+/* 60-08*/[ "<div>test</div><div class=\"pre\">foobar<div>baz</div></div>",         "<div class=\"pre\">testfoobar<div>baz</div></div>" ],
+/* 61-09*/[ "<div>test</div><div class=\"pre\"><div>foobar</div>baz\nfred</div>",   "<div>testfoobar</div><div class=\"pre\">baz\nfred</div>" ],
+/* 62-10*/[ "<div>test</div><div class=\"pre\">foobar<div>baz</div>\nfred</div>",   "<div class=\"pre\">testfoobar<div>baz</div>\nfred</div>" ],
+/* 63-11*/[ "<div>test</div><div class=\"pre\"><div>foo\nbar</div>baz\nfred</div>", "<div>testfoo\nbar</div><div class=\"pre\">baz\nfred</div>" ], // BAD
+/* 64-12*/[ "<div>test</div><div class=\"pre\">foo<div>bar</div>baz\nfred</div>",   "<div class=\"pre\">testfoo<div>bar</div>baz\nfred</div>" ],
 
       /* Some tests with lists. These exercise the MoveBlock "left in right". */
-/*65*/[ "<ul><pre><li>test</li>foobar\nbaz</pre></ul>",          "<ul><pre><li>testfoobar\n</li>baz</pre></ul>" ],
-/*66*/[ "<ul><pre><li>test</li><b>foobar\nbaz</b></pre></ul>",   "<ul><pre><li>test<b>foobar\n</b></li><b>baz</b></pre></ul>" ],
-/*67*/[ "<ul><pre><li>test</li><b>foo</b>bar\nbaz</pre></ul>",   "<ul><pre><li>test<b>foo</b>bar\n</li>baz</pre></ul>" ],
-/*68*/[ "<ul><pre><li>test</li><b>foo</b>\nbar</pre></ul>",      "<ul><pre><li>test<b>foo</b>\n</li>bar</pre></ul>" ],
-/*69*/[ "<ul><pre><li>test</li><b>foo\n</b>bar\nbaz</pre></ul>", "<ul><pre><li>test<b>foo\n</b></li>bar\nbaz</pre></ul>" ],
+/* 65*/[ "<ul><pre><li>test</li>foobar\nbaz</pre></ul>",          "<ul><pre><li>testfoobar\n</li>baz</pre></ul>" ],
+/* 66*/[ "<ul><pre><li>test</li><b>foobar\nbaz</b></pre></ul>",   "<ul><pre><li>test<b>foobar\n</b></li><b>baz</b></pre></ul>" ],
+/* 67*/[ "<ul><pre><li>test</li><b>foo</b>bar\nbaz</pre></ul>",   "<ul><pre><li>test<b>foo</b>bar\n</li>baz</pre></ul>" ],
+/* 68*/[ "<ul><pre><li>test</li><b>foo</b>\nbar</pre></ul>",      "<ul><pre><li>test<b>foo</b>\n</li>bar</pre></ul>" ],
+/* 69*/[ "<ul><pre><li>test</li><b>foo\n</b>bar\nbaz</pre></ul>", "<ul><pre><li>test<b>foo\n</b></li>bar\nbaz</pre></ul>" ],
 
       /* Last not least, some simple edge case tests. */
-/*70*/[ "<div>test</div><pre>foobar\n</pre>baz", "<div>testfoobar\n</div>baz" ],
-/*71*/[ "<div>test</div><pre>\nfoo\nbar</pre>", "<div>testfoo\n</div><pre>bar</pre>" ],
-/*72*/[ "<div>test</div><pre>\n\nfoo\nbar</pre>", "<div>test</div><pre>foo\nbar</pre>", "<div>test\n</div><pre>foo\nbar</pre>" ],
+/* 70*/[ "<div>test</div><pre>foobar\n</pre>baz", "<div>testfoobar\n</div>baz" ],
+/* 71*/[ "<div>test</div><pre>\nfoo\nbar</pre>", "<div>testfoo\n</div><pre>bar</pre>" ],
+/* 72*/[ "<div>test</div><pre>\n\nfoo\nbar</pre>", "<div>test</div><pre>foo\nbar</pre>", "<div>test\n</div><pre>foo\nbar</pre>" ],
     ];
 
     /** Test for Bug 772796 **/
 
     SimpleTest.waitForExplicitFinish();
 
     SimpleTest.waitForFocus(function() {
 
@@ -192,19 +192,19 @@ https://bugzilla.mozilla.org/show_bug.cg
 
         /** Third round: Delete with non-collapsed selection. **/
         if (i == 72) {
           // This test doesn't work, since we can't select only one newline using the right arrow key.
           continue;
         }
         synthesizeKey("KEY_ArrowLeft");
         /* Strangely enough we need to hit "right arrow" three times to select two characters. */
-        synthesizeKey("KEY_ArrowRight", {shiftKey:true});
-        synthesizeKey("KEY_ArrowRight", {shiftKey:true});
-        synthesizeKey("KEY_ArrowRight", {shiftKey:true});
+        synthesizeKey("KEY_ArrowRight", {shiftKey: true});
+        synthesizeKey("KEY_ArrowRight", {shiftKey: true});
+        synthesizeKey("KEY_ArrowRight", {shiftKey: true});
         synthesizeKey("KEY_Delete");
 
         /* We always expect to the delete the "tf" in "testfoo". */
         var expected = tests[i][1].replace("testfoo", "tesoo")
                                   .replace("test<b>foo", "tes<b>oo")
                                   .replace("test<span class=\"pre\">foo", "tes<span class=\"pre\">oo")
                                   .replace("test<span class=\"pre\"><b>foo", "tes<span class=\"pre\"><b>oo");
         is(theDiv.innerHTML, expected, "delete(non-collapsed): inner HTML for " + testName);
--- a/editor/libeditor/tests/test_bug790475.html
+++ b/editor/libeditor/tests/test_bug790475.html
@@ -70,17 +70,17 @@ function isSpellingCheckOk() {
 
   is(numWords, gMisspeltWords.length, "Correct number of misspellings and words.");
 
   if (numWords != gMisspeltWords.length)
     return false;
 
   for (var i = 0; i < numWords; i++) {
     var word = sel.getRangeAt(i);
-    is (word, gMisspeltWords[i], "Misspelling is what we think it is.");
+    is(word, gMisspeltWords[i], "Misspelling is what we think it is.");
     if (word != gMisspeltWords[i])
       return false;
   }
   return true;
 }
 
 </script>
 </pre>
--- a/editor/libeditor/tests/test_bug795418-2.html
+++ b/editor/libeditor/tests/test_bug795418-2.html
@@ -52,17 +52,17 @@ SimpleTest.waitForFocus(function() {
     var iframe = document.querySelector("iframe");
     var iframeWindow = iframe.contentWindow;
     var theEdit = iframe.contentDocument.firstChild;
     theEdit.offsetHeight;
     iframeWindow.focus();
     SimpleTest.waitForFocus(function() {
       var iframeSel = iframeWindow.getSelection();
       iframeSel.removeAllRanges();
-      let span = iframe.contentDocument.querySelector('span');
+      let span = iframe.contentDocument.querySelector("span");
       iframeSel.collapse(span, 1);
 
       SpecialPowers.doCommand(iframeWindow, "cmd_pasteQuote");
       setTimeout(checkResult, 0);
     }, iframeWindow);
   }
 
   SimpleTest.waitForClipboard(
--- a/editor/libeditor/tests/test_bug795418-3.html
+++ b/editor/libeditor/tests/test_bug795418-3.html
@@ -46,17 +46,17 @@ SimpleTest.waitForFocus(function() {
        "unexpected HTML for test");
     SimpleTest.finish();
   }
 
   function pasteQuote() {
     var iframe = document.querySelector("iframe");
     var iframeWindow = iframe.contentWindow;
     var theEdit = iframe.contentDocument.body;
-    iframe.contentDocument.designMode='on';
+    iframe.contentDocument.designMode = "on";
     iframe.contentDocument.body.offsetHeight;
     iframeWindow.focus();
     SimpleTest.waitForFocus(function() {
       var iframeSel = iframeWindow.getSelection();
       iframeSel.removeAllRanges();
       iframeSel.collapse(theEdit.firstChild, 1);
 
       SpecialPowers.doCommand(iframeWindow, "cmd_pasteQuote");
--- a/editor/libeditor/tests/test_bug795785.html
+++ b/editor/libeditor/tests/test_bug795785.html
@@ -25,124 +25,120 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.requestFlakyTimeout("This test uses setTimeouts in order to fix an intermittent failure.");
 
 // Turn off spatial navigation because it hijacks arrow key events and VK_RETURN
 // events.
 SimpleTest.waitForFocus(function() {
-  SpecialPowers.pushPrefEnv({"set":[["snav.enabled", false]]}, runTests);
+  SpecialPowers.pushPrefEnv({"set": [["snav.enabled", false]]}, runTests);
 });
 var textarea = document.getElementById("textarea");
 var div = document.getElementById("div");
 
-function hitEventLoop(aFunc, aTimes)
-{
+function hitEventLoop(aFunc, aTimes) {
   if (--aTimes) {
     setTimeout(hitEventLoop, 0, aFunc, aTimes);
   } else {
     setTimeout(aFunc, 100);
   }
 }
 
-function doKeyEventTest(aElement, aElementDescription, aCallback)
-{
+function doKeyEventTest(aElement, aElementDescription, aCallback) {
   aElement.focus();
   aElement.scrollTop = 0;
-  hitEventLoop(function () {
+  hitEventLoop(function() {
     is(aElement.scrollTop, 0,
        aElementDescription + "'s scrollTop isn't 0");
     synthesizeKey("KEY_Enter", {shiftKey: true, repeat: 6});
-    hitEventLoop(function () {
+    hitEventLoop(function() {
       isnot(aElement.scrollTop, 0,
             aElementDescription + " was not scrolled by inserting line breaks");
       var scrollTop = aElement.scrollTop;
       synthesizeKey("KEY_ArrowUp", {repeat: 5});
-      hitEventLoop(function () {
+      hitEventLoop(function() {
         isnot(aElement.scrollTop, scrollTop,
               aElementDescription + " was not scrolled by up key events");
         synthesizeKey("KEY_ArrowDown", {repeat: 5});
-        hitEventLoop(function () {
+        hitEventLoop(function() {
           is(aElement.scrollTop, scrollTop,
              aElementDescription + " was not scrolled by down key events");
           var longWord = "aaaaaaaaaaaaaaaaaaaa";
           sendString(longWord);
-          hitEventLoop(function () {
+          hitEventLoop(function() {
             isnot(aElement.scrollLeft, 0,
                   aElementDescription + " was not scrolled by typing long word");
             var scrollLeft = aElement.scrollLeft;
             var i;
-            synthesizeKey("KEY_ArrowLeft", {repeat: longWord.length});
-            hitEventLoop(function () {
+            synthesizeKey("KEY_ArrowLeft", {repeat: longWord.length});
+            hitEventLoop(function() {
               isnot(aElement.scrollLeft, scrollLeft,
                     aElementDescription + " was not scrolled by left key events");
-              synthesizeKey("KEY_ArrowRight", {repeat: longWord.length});
-              hitEventLoop(function () {
+              synthesizeKey("KEY_ArrowRight", {repeat: longWord.length});
+              hitEventLoop(function() {
                 is(aElement.scrollLeft, scrollLeft,
                    aElementDescription + " was not scrolled by right key events");
                 aCallback();
               }, 20);
             }, 20);
           }, 20);
         }, 20);
       }, 20);
     }, 20);
   }, 20);
 }
 
-function doCompositionTest(aElement, aElementDescription, aCallback)
-{
+function doCompositionTest(aElement, aElementDescription, aCallback) {
   aElement.focus();
   aElement.scrollTop = 0;
-  hitEventLoop(function () {
+  hitEventLoop(function() {
     is(aElement.scrollTop, 0,
        aElementDescription + "'s scrollTop isn't 0");
     var str = "Web \u958b\u767a\u8005\u306e\u7686\u3055\u3093\u306f\u3001" +
               "Firefox \u306b\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b HTML5" +
               " \u3084 CSS \u306e\u65b0\u6a5f\u80fd\u3092\u6d3b\u7528\u3059" +
               "\u308b\u3053\u3068\u3067\u3001\u9b45\u529b\u3042\u308b Web " +
               "\u30b5\u30a4\u30c8\u3084\u9769\u65b0\u7684\u306a Web \u30a2" +
               "\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3088\u308a" +
               "\u77ed\u6642\u9593\u3067\u7c21\u5358\u306b\u4f5c\u6210\u3067" +
               "\u304d\u307e\u3059\u3002";
     synthesizeCompositionChange({
         composition: {
           string: str,
           clauses: [
-            { length: str.length, attr: COMPOSITION_ATTR_RAW_CLAUSE }
-          ]
+            { length: str.length, attr: COMPOSITION_ATTR_RAW_CLAUSE },
+          ],
         },
-        caret: { start: str.length, length: 0 }
+        caret: { start: str.length, length: 0 },
       });
-    hitEventLoop(function () {
+    hitEventLoop(function() {
       isnot(aElement.scrollTop, 0,
             aElementDescription + " was not scrolled by composition");
       synthesizeComposition({ type: "compositioncommit", data: "" });
-      hitEventLoop(function () {
+      hitEventLoop(function() {
         is(aElement.scrollTop, 0,
            aElementDescription + " was not scrolled back to the top by canceling composition");
         aCallback();
       }, 20);
     }, 20);
   }, 20);
 }
 
-function runTests()
-{
+function runTests() {
   doKeyEventTest(textarea, "textarea",
-    function () {
+    function() {
       textarea.value = "";
       doKeyEventTest(div, "div (contenteditable)",
-        function () {
+        function() {
           div.innerHTML = "";
           doCompositionTest(textarea, "textarea",
-            function () {
+            function() {
               doCompositionTest(div, "div (contenteditable)",
-                function () {
+                function() {
                   SimpleTest.finish();
                 });
             });
         });
     });
 }
 
 </script>
--- a/editor/libeditor/tests/test_bug796839.html
+++ b/editor/libeditor/tests/test_bug796839.html
@@ -8,10 +8,10 @@ https://bugzilla.mozilla.org/show_bug.cg
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=796839">Mozilla Bug 796839</a>
 <div id="test" contenteditable><br></div>
 <script>
 var div = document.getElementById("test");
 var text = document.createTextNode("");
 div.insertBefore(text, div.firstChild);
 getSelection().collapse(text, 0);
 document.execCommand("inserthtml", false, "x");
-is(div.textContent, 'x', "Empty textnodes should be editable");
+is(div.textContent, "x", "Empty textnodes should be editable");
 </script>
--- a/editor/libeditor/tests/test_bug830600.html
+++ b/editor/libeditor/tests/test_bug830600.html
@@ -28,17 +28,17 @@ https://bugzilla.mozilla.org/show_bug.cg
         const Ci = SpecialPowers.Ci;
         function test(str, expected, callback) {
           var t = document.getElementById("t1");
           t.focus();
           t.value = "";
           var editor = SpecialPowers.wrap(t).editor;
           editor.QueryInterface(Ci.nsIPlaintextEditor);
           var origNewlineHandling = editor.newlineHandling;
-          editor.newlineHandling = Ci.nsIPlaintextEditor.eNewlinesStripSurroundingWhitespace
+          editor.newlineHandling = Ci.nsIPlaintextEditor.eNewlinesStripSurroundingWhitespace;
           SimpleTest.waitForClipboard(str,
             function() {
               SpecialPowers.Cc["@mozilla.org/widget/clipboardhelper;1"]
                         .getService(Ci.nsIClipboardHelper)
                         .copyString(str);
             },
             function() {
               synthesizeKey("V", {accelKey: true});
--- a/editor/libeditor/tests/test_bug832025.html
+++ b/editor/libeditor/tests/test_bug832025.html
@@ -30,14 +30,14 @@ sel.collapse(test, test.childNodes.lengt
 
 // make it a H1
 document.execCommand("heading", false, "H1");
 // simulate a CR key
 sendKey("return");
 // insert some text
 document.execCommand("insertText", false, "abc");
 
-is(test.innerHTML, '<h1>header1</h1><div>abc<br></div>',
+is(test.innerHTML, "<h1>header1</h1><div>abc<br></div>",
    "A paragraph automatically created after a CR at the end of an H1 should not be bold");
 
 </script>
 </body>
 </html>
--- a/editor/libeditor/tests/test_bug850043.html
+++ b/editor/libeditor/tests/test_bug850043.html
@@ -33,28 +33,28 @@ SimpleTest.waitForFocus(() => {
   element.focus();
   is(SpecialPowers.unwrap(fm.focusedElement), element, "failed to move focus");
 
   synthesizeKey("KEY_End");
   sendString("a");
   is(element.value, "b\u{9080}\u{e010f}\u{8fba}\u{e0101}a", "a isn't last character");
 
   synthesizeKey("KEY_Backspace", {repeat: 3});
-  is(element.value, 'b', "cannot remove all IVS characters");
+  is(element.value, "b", "cannot remove all IVS characters");
 
   element = document.getElementById("edit");
   element.focus();
   is(SpecialPowers.unwrap(fm.focusedElement), element, "failed to move focus");
 
   let sel = window.getSelection();
   sel.collapse(element.childNodes[0], element.textContent.length);
 
   sendString("a");
   is(element.textContent, "b\u{9080}\u{e010f}\u{8fba}\u{e0101}a", "a isn't last character");
 
   synthesizeKey("KEY_Backspace", {repeat: 3});
-  is(element.textContent, 'b', "cannot remove all IVS characters");
+  is(element.textContent, "b", "cannot remove all IVS characters");
 
   SimpleTest.finish();
 });
 </script>
 </body>
 </html>
--- a/editor/libeditor/tests/test_bug915962.html
+++ b/editor/libeditor/tests/test_bug915962.html
@@ -25,17 +25,17 @@ var win = window.open("file_bug915962.ht
                       "width=600,height=600,scrollbars=yes");
 
 // grab the timer right at the start
 var cwu = SpecialPowers.getDOMWindowUtils(win);
 function step() {
   cwu.advanceTimeAndRefresh(100);
 }
 SimpleTest.waitForFocus(function() {
-  SpecialPowers.pushPrefEnv({"set":[[smoothScrollPref, false]]}, startTest);
+  SpecialPowers.pushPrefEnv({"set": [[smoothScrollPref, false]]}, startTest);
 }, win);
 function startTest() {
   // Make sure that pressing Space when a tabindex=-1 element is focused
   // will scroll the page.
   var button = win.document.querySelector("button");
   var sc = win.document.querySelector("div");
   sc.focus();
   is(win.scrollY, 0, "Sanity check");
@@ -65,17 +65,17 @@ function startTest() {
   ok(clicked, "The button should be clicked");
   synthesizeKey("VK_TAB", {}, win);
 
   step();
 
   oldY = win.scrollY;
   synthesizeKey(" ", {}, win);
 
-  step()
+  step();
 
   ok(win.scrollY >= oldY, "Page is scrolled down");
 
   win.close();
   cwu.restoreNormalRefresh();
 
   win = window.open("file_bug915962.html", "_blank",
                     "width=600,height=600,scrollbars=yes");
--- a/editor/libeditor/tests/test_bug998188.html
+++ b/editor/libeditor/tests/test_bug998188.html
@@ -18,18 +18,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="editor" contenteditable>abc</div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 998188 **/
 
 SimpleTest.waitForExplicitFinish();
 
-function runTests()
-{
+function runTests() {
   var editor = document.getElementById("editor");
   editor.focus();
 
   var textNode1 = document.createTextNode("def");
   var textNode2 = document.createTextNode("ghi");
 
   editor.appendChild(textNode1);
   editor.appendChild(textNode2);
--- a/editor/libeditor/tests/test_composition_event_created_in_chrome.html
+++ b/editor/libeditor/tests/test_composition_event_created_in_chrome.html
@@ -15,27 +15,25 @@
 <script type="application/javascript">
 
 // In nsEditorEventListener, when listening event is not created with proper
 // event interface, it asserts the fact.
 SimpleTest.waitForExplicitFinish();
 
 var gInputElement = document.getElementById("input");
 
-function getEditor(aInputElement)
-{
+function getEditor(aInputElement) {
   var editableElement = SpecialPowers.wrap(aInputElement);
   ok(editableElement.editor, "There is no editor for the input element");
   return editableElement.editor;
 }
 
 var gEditor;
 
-function testNotGenerateCompositionByCreatedEvents(aEventInterface)
-{
+function testNotGenerateCompositionByCreatedEvents(aEventInterface) {
   var compositionEvent = document.createEvent(aEventInterface);
   if (compositionEvent.initCompositionEvent) {
     compositionEvent.initCompositionEvent("compositionstart", true, true, window, "", "");
   } else if (compositionEvent.initMouseEvent) {
     compositionEvent.initMouseEvent("compositionstart", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
   }
   gInputElement.dispatchEvent(compositionEvent);
   ok(!gEditor.composing, "Composition shouldn't be started with a created compositionstart event (" + aEventInterface + ")");
@@ -56,18 +54,17 @@ function testNotGenerateCompositionByCre
   } else if (compositionEvent.initMouseEvent) {
     compositionEvent.initMouseEvent("compositionend", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
   }
   gInputElement.dispatchEvent(compositionEvent);
   ok(!gEditor.composing, "Composition shouldn't be committed with a created compositionend event (" + aEventInterface + ")");
   is(gInputElement.value, "", "Input element shouldn't be committed with a created compositionend event (" + aEventInterface + ")");
 }
 
-function doTests()
-{
+function doTests() {
   gInputElement.focus();
   gEditor = getEditor(gInputElement);
 
   testNotGenerateCompositionByCreatedEvents("CompositionEvent");
   testNotGenerateCompositionByCreatedEvents("MouseEvent");
 
   SimpleTest.finish();
 }
--- a/editor/libeditor/tests/test_contenteditable_focus.html
+++ b/editor/libeditor/tests/test_contenteditable_focus.html
@@ -38,24 +38,22 @@
 <pre id="test">
 </pre>
 
 <script class="testbody" type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTests, window);
 
-function runTests()
-{
+function runTests() {
   runTestsInternal();
   SimpleTest.finish();
 }
 
-function runTestsInternal()
-{
+function runTestsInternal() {
   var fm = SpecialPowers.Cc["@mozilla.org/focus-manager;1"].
              getService(SpecialPowers.Ci.nsIFocusManager);
   // XXX using selCon for checking the visibility of the caret, however,
   // selCon is shared in document, cannot get the element of owner of the
   // caret from javascript?
   var selCon = SpecialPowers.wrap(window).docShell.
         QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor).
         getInterface(SpecialPowers.Ci.nsISelectionDisplay).
@@ -152,18 +150,17 @@ function runTestsInternal()
      "the caret is moved when the editor was focused (offset)");
   var startNode = range.startContainer;
   is(startNode.nodeType, 3, "the caret isn't in text node");
   is(startNode.parentNode, spanInEditor,
      "the caret is moved when the editor was focused (node)");
   ok(selCon.caretVisible, "caret isn't visible in the editor (spanInEditor)");
 
   // Move focus to each focusable element in the editor.
-  function testFocusMove(aSetFocusElementID, aFocusable, aCaretVisible)
-  {
+  function testFocusMove(aSetFocusElementID, aFocusable, aCaretVisible) {
     editor.focus();
     is(SpecialPowers.unwrap(fm.focusedElement), editor,
        "testFocusMove: the editor didn't get focus at initializing (" +
        aSetFocusElementID + ")");
     var setFocusElement = document.getElementById(aSetFocusElementID);
     setFocusElement.focus();
     if (aFocusable) {
       is(SpecialPowers.unwrap(fm.focusedElement), setFocusElement,
--- a/editor/libeditor/tests/test_contenteditable_text_input_handling.html
+++ b/editor/libeditor/tests/test_contenteditable_text_input_handling.html
@@ -21,26 +21,24 @@
 
 <script class="testbody" type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTests);
 
 const kLF = !navigator.platform.indexOf("Win") ? "\r\n" : "\n";
 
-function runTests()
-{
+function runTests() {
   var fm = Cc["@mozilla.org/focus-manager;1"].
              getService(Ci.nsIFocusManager);
 
   var listener = {
-    handleEvent: function _hv(aEvent)
-    {
+    handleEvent: function _hv(aEvent) {
       aEvent.preventDefault(); // prevent the browser default behavior
-    }
+    },
   };
   var els = Cc["@mozilla.org/eventlistenerservice;1"].
     getService(Ci.nsIEventListenerService);
   els.addSystemEventListener(window, "keypress", listener, false);
 
   var staticContent = document.getElementById("static");
   staticContent._defaultValue = getTextValue(staticContent);
   staticContent._isFocusable = false;
@@ -73,18 +71,17 @@ function runTests()
   inputInEditor._description = "input element in contenteditable editor";
   var textareaInEditor = document.getElementById("textareaInEditor");
   textareaInEditor._defaultValue = getTextValue(textareaInEditor);
   textareaInEditor._isFocusable = true;
   textareaInEditor._isEditable = true;
   textareaInEditor._isContentEditable = false;
   textareaInEditor._description = "textarea element in contenteditable editor";
 
-  function getTextValue(aElement)
-  {
+  function getTextValue(aElement) {
     if (aElement == editor) {
       var value = "";
       for (var node = aElement.firstChild; node; node = node.nextSibling) {
         if (node.nodeType == Node.TEXT_NODE) {
           value += node.data;
         } else if (node.nodeType == Node.ELEMENT_NODE) {
           var tagName = node.tagName.toLowerCase();
           switch (tagName) {
@@ -98,24 +95,22 @@ function runTests()
           }
         }
       }
       return value;
     }
     return aElement.value;
   }
 
-  function testTextInput(aFocus)
-  {
+  function testTextInput(aFocus) {
     var when = " when " +
       ((aFocus && aFocus._isFocusable) ? aFocus._description + " has focus" :
                                          "nobody has focus");
 
-    function checkValue(aElement, aInsertedText)
-    {
+    function checkValue(aElement, aInsertedText) {
       if (aElement == aFocus && aElement._isEditable) {
         is(getTextValue(aElement), aInsertedText + aElement._defaultValue,
            aElement._description +
              " wasn't edited by synthesized key events" + when);
         return;
       }
       is(getTextValue(aElement), aElement._defaultValue,
          aElement._description +
@@ -151,30 +146,27 @@ function runTests()
         checkValue(textareaInStatic, "");
         checkValue(editor, "");
         checkValue(inputInEditor, "");
         checkValue(textareaInEditor, "");
       }
     }
 
     // When key events are fired on unfocused editor.
-    function testDispatchedKeyEvent(aTarget)
-    {
+    function testDispatchedKeyEvent(aTarget) {
       var targetDescription = " (dispatched to " + aTarget._description + ")";
-      function dispatchKeyEvent(aKeyCode, aChar, aTarget)
-      {
+      function dispatchKeyEvent(aKeyCode, aChar, aTarget) {
         var keyEvent = document.createEvent("KeyboardEvent");
         keyEvent.initKeyEvent("keypress", true, true, null, false, false,
                                false, false, aKeyCode,
                                aChar ? aChar.charCodeAt(0) : 0);
         aTarget.dispatchEvent(keyEvent);
       }
 
-      function checkValueForDispatchedKeyEvent(aElement, aInsertedText)
-      {
+      function checkValueForDispatchedKeyEvent(aElement, aInsertedText) {
         if (aElement == aTarget && aElement._isEditable &&
             (!aElement._isContentEditable || aElement == aFocus)) {
           is(getTextValue(aElement), aInsertedText + aElement._defaultValue,
              aElement._description +
                " wasn't edited by dispatched key events" +
                when + targetDescription);
           return;
         }
@@ -227,20 +219,20 @@ function runTests()
 
     // IME
     // input first character
     synthesizeCompositionChange(
       { "composition":
         { "string": "\u3089",
           "clauses":
           [
-            { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
-          ]
+            { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE },
+          ],
         },
-        "caret": { "start": 1, "length": 0 }
+        "caret": { "start": 1, "length": 0 },
       });
     var queryText = synthesizeQueryTextContent(0, 100);
     ok(queryText, "query text event result is null" + when);
     if (!queryText) {
       return;
     }
     ok(queryText.succeeded, "query text event failed" + when);
     if (!queryText.succeeded) {
--- a/editor/libeditor/tests/test_css_chrome_load_access.html
+++ b/editor/libeditor/tests/test_css_chrome_load_access.html
@@ -19,41 +19,37 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 const Ci = SpecialPowers.Ci;
 var styleSheets = null;
 
 function runTest() {
 
   var editframe = window.frames[0];
   var editdoc = editframe.document;
-  editdoc.designMode = 'on';
+  editdoc.designMode = "on";
   var editor = SpecialPowers.wrap(editframe).docShell.editingSession
                             .getEditorForWindow(editframe);
 
   styleSheets = editor.QueryInterface(Ci.nsIEditorStyleSheets);
 
   // test 1: try to access chrome:// url that is accessible to content
-  try
-  {
+  try {
     styleSheets.addOverrideStyleSheet("chrome://browser/content/pageinfo/pageInfo.css");
     ok(true, "should be allowed to access chrome://*.css if contentaccessible");
-  }
-  catch (ex) {
+  } catch (ex) {
     ok(false, "should be allowed to access chrome://*.css if contentaccessible");
   }
 
   // test 2: try to access chrome:// url that is *not* accessible to content
   // please note that addOverrideStyleSheet() is triggered by the system,
   // so the load should also *always* succeed.
-  try
-  {
+  try {
     styleSheets.addOverrideStyleSheet("chrome://mozapps/skin/aboutNetworking.css");
     ok(true, "should be allowed to access chrome://*.css even if *not* contentaccessible");
-  }
-  catch (ex) {
+  } catch (ex) {
     ok(false, "should be allowed to access chrome://*.css even if *not* contentaccessible");
   }
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
 
--- a/editor/libeditor/tests/test_documentCharacterSet.html
+++ b/editor/libeditor/tests/test_documentCharacterSet.html
@@ -20,17 +20,17 @@ function getEditor() {
   let editframe = window.frames[0];
   return SpecialPowers.wrap(editframe).docShell.editingSession
                       .getEditorForWindow(editframe);
 }
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
   let editdoc = window.frames[0].document;
-  editdoc.designMode = 'on';
+  editdoc.designMode = "on";
   let editor = getEditor();
 
   editor.documentCharacterSet = "us-ascii";
   let meta = editdoc.getElementsByTagName("meta")[0];
   is(meta.getAttribute("http-equiv"), "Content-Type",
      "meta element should have http-equiv");
   is(meta.getAttribute("content"), "text/html;charset=us-ascii",
      "charset should be set as us-ascii");
--- a/editor/libeditor/tests/test_dom_input_event_on_htmleditor.html
+++ b/editor/libeditor/tests/test_dom_input_event_on_htmleditor.html
@@ -24,20 +24,18 @@
 
 <script class="testbody" type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTests, window);
 
 const kIsMac = navigator.platform.indexOf("Mac") == 0;
 
-function runTests()
-{
-  function doTests(aDocument, aWindow, aDescription)
-  {
+function runTests() {
+  function doTests(aDocument, aWindow, aDescription) {
     aDescription += ": ";
     aWindow.focus();
 
     var body = aDocument.body;
 
     var eventTarget = aDocument.getElementById("eventTarget");
     // The event target must be focusable because it's the editing host.
     eventTarget.focus();
@@ -57,17 +55,17 @@ function runTests()
 
     // If the editTarget isn't its editing host, move caret to the start of it.
     if (eventTarget != editTarget) {
       aDocument.getSelection().collapse(editTarget, 0);
     }
 
     var inputEvent = null;
 
-    var handler = function (aEvent) {
+    var handler = function(aEvent) {
       is(aEvent.target, eventTarget,
          "input event is fired on unexpected element: " + aEvent.target.tagName);
       ok(!aEvent.cancelable, "input event must not be cancelable");
       ok(aEvent.bubbles, "input event must be bubbles");
       if (SpecialPowers.getBoolPref("dom.event.highrestimestamp.enabled")) {
         var duration = Math.abs(window.performance.now() - aEvent.timeStamp);
         ok(duration < 30 * 1000,
            "perhaps, timestamp wasn't set correctly :" + aEvent.timeStamp +
--- a/editor/libeditor/tests/test_dom_input_event_on_texteditor.html
+++ b/editor/libeditor/tests/test_dom_input_event_on_texteditor.html
@@ -21,27 +21,25 @@
 
 <script class="testbody" type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTests, window);
 
 const kIsMac = navigator.platform.indexOf("Mac") == 0;
 
-function runTests()
-{
-  function doTests(aElement, aDescription, aIsTextarea)
-  {
+function runTests() {
+  function doTests(aElement, aDescription, aIsTextarea) {
     aDescription += ": ";
     aElement.focus();
     aElement.value = "";
 
     var inputEvent = null;
 
-    var handler = function (aEvent) {
+    var handler = function(aEvent) {
       is(aEvent.target, aElement,
          "input event is fired on unexpected element: " + aEvent.target.tagName);
       ok(!aEvent.cancelable, "input event must not be cancelable");
       ok(aEvent.bubbles, "input event must be bubbles");
       if (SpecialPowers.getBoolPref("dom.event.highrestimestamp.enabled")) {
         var duration = Math.abs(window.performance.now() - aEvent.timeStamp);
         ok(duration < 30 * 1000,
            "perhaps, timestamp wasn't set correctly :" + aEvent.timeStamp +
--- a/editor/libeditor/tests/test_dragdrop.html
+++ b/editor/libeditor/tests/test_dragdrop.html
@@ -17,26 +17,25 @@
   <p id="nestedce" contenteditable="true"><span id="first"> </span>First letter <span id="noneditable" contenteditable="false">Middle</span> Last part</p>
 
 <script type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
 // This listener allows us to clear the default data for the selection added for the drag.
 var shouldClear = false;
-window.addEventListener("dragstart", function (event) { if (shouldClear) event.dataTransfer.clearData() }, true);
+window.addEventListener("dragstart", function(event) { if (shouldClear) event.dataTransfer.clearData(); }, true);
 
-function doTest()
-{
-  const htmlContextData = { type: 'text/_moz_htmlcontext',
-                            data: '<html><body></body></html>' };
-  const htmlInfoData = { type: 'text/_moz_htmlinfo', data: '0,0' };
-  const htmlData = { type: 'text/html', data: '<span id="text" style="font-size: 40px;">Some Text</span>' };
+function doTest() {
+  const htmlContextData = { type: "text/_moz_htmlcontext",
+                            data: "<html><body></body></html>" };
+  const htmlInfoData = { type: "text/_moz_htmlinfo", data: "0,0" };
+  const htmlData = { type: "text/html", data: '<span id="text" style="font-size: 40px;">Some Text</span>' };
 
-  const htmlContextDataEditable = { type: 'text/_moz_htmlcontext',
+  const htmlContextDataEditable = { type: "text/_moz_htmlcontext",
                                     data: '<html><body><p id="contenteditable" contenteditable="true"></p></body></html>' };
 
   var text = document.getElementById("text");
   var input = document.getElementById("input");
   var contenteditable = document.getElementById("contenteditable");
 
   var selection = window.getSelection();
 
@@ -56,17 +55,17 @@ function doTest()
   result = synthesizeDragStart(textarea, [[{type: "text/plain", data: "ome Te"}]], window, 25, 6);
   is(result, null, "Test dragging textarea");
   textarea.blur();
 
   // -------- Test dragging text from a contenteditable
   selection.selectAllChildren(contenteditable.childNodes[1]);
   result = synthesizeDragStart(contenteditable.childNodes[1],
                                [[htmlContextDataEditable, htmlInfoData,
-                                {type: 'text/html', data: '<b id="bold">editable</b>' },
+                                {type: "text/html", data: '<b id="bold">editable</b>' },
                                 {type: "text/plain", data: "editable"}]], window, 5, 6);
   is(result, null, "Test dragging contenteditable");
   contenteditable.blur();
 
   // -------- Test dragging regular text of text/html to <input>
 
   selection.selectAllChildren(text);
   input.value = "";
--- a/editor/libeditor/tests/test_htmleditor_keyevent_handling.html
+++ b/editor/libeditor/tests/test_htmleditor_keyevent_handling.html
@@ -24,52 +24,48 @@ SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTests, window);
 
 var htmlEditor = document.getElementById("htmlEditor");
 
 const kIsMac = navigator.platform.indexOf("Mac") == 0;
 const kIsWin = navigator.platform.indexOf("Win") == 0;
 const kIsLinux = navigator.platform.indexOf("Linux") == 0 || navigator.platform.indexOf("SunOS") == 0 ;
 
-function runTests()
-{
+function runTests() {
   document.execCommand("stylewithcss", false, "true");
   document.execCommand("defaultParagraphSeparator", false, "div");
 
   var fm = SpecialPowers.Cc["@mozilla.org/focus-manager;1"].
     getService(SpecialPowers.Ci.nsIFocusManager);
 
   var capturingPhase = { fired: false, prevented: false };
   var bubblingPhase = { fired: false, prevented: false };
 
   var listener = {
-    handleEvent: function _hv(aEvent)
-    {
+    handleEvent: function _hv(aEvent) {
       is(aEvent.type, "keypress", "unexpected event is handled");
       switch (aEvent.eventPhase) {
       case aEvent.CAPTURING_PHASE:
         capturingPhase.fired = true;
         capturingPhase.prevented = aEvent.defaultPrevented;
         break;
       case aEvent.BUBBLING_PHASE:
         bubblingPhase.fired = true;
         bubblingPhase.prevented = aEvent.defaultPrevented;
         aEvent.preventDefault(); // prevent the browser default behavior
         break;
       default:
         ok(false, "event is handled in unexpected phase");
       }
-    }
+    },
   };
 
   function check(aDescription,
-                 aFiredOnCapture, aFiredOnBubbling, aPreventedOnBubbling)
-  {
-    function getDesciption(aExpected)
-    {
+                 aFiredOnCapture, aFiredOnBubbling, aPreventedOnBubbling) {
+    function getDesciption(aExpected) {
       return aDescription + (aExpected ? " wasn't " : " was ");
     }
     is(capturingPhase.fired, aFiredOnCapture,
        getDesciption(aFiredOnCapture) + "fired on capture phase");
     is(bubblingPhase.fired, aFiredOnBubbling,
        getDesciption(aFiredOnBubbling) + "fired on bubbling phase");
 
     // If the event is fired on bubbling phase and it was already prevented
@@ -83,34 +79,31 @@ function runTests()
     is(bubblingPhase.prevented, aPreventedOnBubbling,
        getDesciption(aPreventedOnBubbling) + "prevented on bubbling phase");
   }
 
   SpecialPowers.addSystemEventListener(window, "keypress", listener, true);
   SpecialPowers.addSystemEventListener(window, "keypress", listener, false);
 
   function doTest(aElement, aDescription,
-                  aIsReadonly, aIsTabbable, aIsPlaintext)
-  {
-    function reset(aText)
-    {
+                  aIsReadonly, aIsTabbable, aIsPlaintext) {
+    function reset(aText) {
       capturingPhase.fired = false;
       capturingPhase.prevented = false;
       bubblingPhase.fired = false;
       bubblingPhase.prevented = false;
       aElement.innerHTML = aText;
       var sel = window.getSelection();
       var range = document.createRange();
       range.setStart(aElement, aElement.childNodes.length);
       sel.removeAllRanges();
       sel.addRange(range);
     }
 
-    function resetForIndent(aText)
-    {
+    function resetForIndent(aText) {
       capturingPhase.fired = false;
       capturingPhase.prevented = false;
       bubblingPhase.fired = false;
       bubblingPhase.prevented = false;
       aElement.innerHTML = aText;
       var sel = window.getSelection();
       var range = document.createRange();
       var target = document.getElementById("target").firstChild;
@@ -118,17 +111,17 @@ function runTests()
       sel.removeAllRanges();
       sel.addRange(range);
     }
 
     if (document.activeElement) {
       document.activeElement.blur();
     }
 
-    aDescription += ": "
+    aDescription += ": ";
 
     aElement.focus();
     is(SpecialPowers.unwrap(fm.focusedElement), aElement, aDescription + "failed to move focus");
 
     // Backspace key:
     //   If editor is readonly, it doesn't consume.
     //   If editor is editable, it consumes backspace and shift+backspace.
     //   Otherwise, editor doesn't consume the event.
--- a/editor/libeditor/tests/test_keypress_untrusted_event.html
+++ b/editor/libeditor/tests/test_keypress_untrusted_event.html
@@ -44,18 +44,17 @@ addLoadEvent(function() {
       }, {once: true});
     var keypress = document.createEvent("KeyboardEvent");
     keypress.initKeyEvent("keypress", true, true, document.defaultView,
                           false, false, false, false, 0, "a".charCodeAt(0));
     input.dispatchEvent(keypress);
   });
 });
 
-function runTextareaTest()
-{
+function runTextareaTest() {
   textarea.addEventListener("keypress",
     function(aEvent) {
       is(aEvent.target, textarea,
          "The keypress event target isn't the textarea element");
 
       SimpleTest.executeSoon(function() {
         is(textarea.value, "",
            "Did keypress event cause modifying the textarea element?");
@@ -64,18 +63,17 @@ function runTextareaTest()
       });
     }, {once: true});
   var keypress = document.createEvent("KeyboardEvent");
   keypress.initKeyEvent("keypress", true, true, document.defaultView,
                         false, false, false, false, 0, "b".charCodeAt(0));
   textarea.dispatchEvent(keypress);
 }
 
-function runContentediableTest()
-{
+function runContentediableTest() {
   div.addEventListener("keypress",
     function(aEvent) {
       is(aEvent.target, div,
          "The keypress event target isn't the div element");
 
       SimpleTest.executeSoon(function() {
         is(div.innerHTML, "",
            "Did keypress event cause modifying the div element?");
--- a/editor/libeditor/tests/test_nsITableEditor_getCellAt.html
+++ b/editor/libeditor/tests/test_nsITableEditor_getCellAt.html
@@ -49,17 +49,17 @@ SimpleTest.waitForFocus(function() {
       '<tr><td id="c3-2">cell3-2</td><td id="c3-3">cell3-3</td><td id="c3-4" colspan="2">cell3-4</td></tr>' +
       '<tr><td id="c4-1" rowspan="4">cell4-1</td><td id="c4-2">' +
         '<table id="inner-table"><tr><td id="c2-1-1">cell2-1-1</td><td id="c2-1-2">cell2-1-2</td></tr>' +
           '<tr><td id="c2-2-1">cell2-2-1</td><td id="c2-2-2">cell2-2-2</td></table>' +
         '</td><td id="c4-3">cell4-3</td><td id="c4-4">cell4-4</td><td id="c4-5">cell4-5</td></tr>' +
       '<tr><td id="c5-2">cell5-2</td><td id="c5-3" colspan="2">cell5-3</td><td id="c5-5">cell5-5</td></tr>' +
       '<tr><td id="c6-2">cell6-2</td><td id="c6-3">cell6-3</td><td id="c6-4"><p>cell6-4</p></td><td id="c6-5">cell6-5</td></tr>' +
       '<tr><td id="c7-2" colspan="4">cell7-2</td></tr>' +
-    '</table>';
+    "</table>";
   editor.scrollTop; // compute layout now.
 
   const kTestsInParent = [
     { row: 0, column: 0, expected: "c1-1" },
     { row: 0, column: 3, expected: "c1-4" },
     { row: 0, column: 4, expected: "c1-4" },
     { row: 1, column: 3, expected: "c1-4" },
     { row: 1, column: 4, expected: "c1-4" },
--- a/editor/libeditor/tests/test_nsITableEditor_getCellIndexes.html
+++ b/editor/libeditor/tests/test_nsITableEditor_getCellIndexes.html
@@ -57,17 +57,17 @@ SimpleTest.waitForFocus(function() {
     '<table><tr><td>cell1-1</td><td rowspan="2">cell1-2</td><td>cell1-3</tr><tr><td>cell2-1</td><td>cell2-3</td></tr><tr><td>cell3-1</td><td id="test" data-row="2" data-col="1">cell3-2</td><td>cell3-3</td></tr></table>',
     '<table><tr><td>cell1-1</td><td id="test" data-row="0" data-col="1">cell1-2</td><td>cell1-3</tr><tr><td>cell2-1</td><td rowspan="2">cell2-2</td><td>cell2-3</td></tr><tr><td>cell3-1</td><td>cell3-3</td></tr></table>',
     '<table><tr><td>cell1-1</td><td>cell1-2</td><td>cell1-3</tr><tr><td>cell2-1</td><td id="test" data-row="1" data-col="1" rowspan="2">cell2-2</td><td>cell2-3</td></tr><tr><td>cell3-1</td><td>cell3-3</td></tr></table>',
     '<table><tr><td>cell1-1</td><td>cell1-2</td><td>cell1-3</tr><tr><td id="test" data-row="1" data-col="0" colspan="2">cell2-1</td><td>cell2-3</td></tr><tr><td>cell3-1</td><td>cell3-2</td><td>cell3-3</td></tr></table>',
     '<table><tr><td>cell1-1</td><td>cell1-2</td><td>cell1-3</tr><tr><td colspan="2">cell2-1</td><td id="test" data-row="1" data-col="2">cell2-3</td></tr><tr><td>cell3-1</td><td>cell3-2</td><td>cell3-3</td></tr></table>',
     '<table><tr><td>cell1-1</td><td>cell1-2</td><td>cell1-3</tr><tr><td id="test" data-row="1" data-col="0">cell2-1</td><td colspan="2">cell2-2</td></tr><tr><td>cell3-1</td><td>cell3-2</td><td>cell3-3</td></tr></table>',
     '<table><tr><td>cell1-1</td><td>cell1-2</td><td>cell1-3</tr><tr><td>cell2-1</td><td id="test" data-row="1" data-col="1" colspan="2">cell2-2</td></tr><tr><td>cell3-1</td><td>cell3-2</td><td>cell3-3</td></tr></table>',
     '<table><tr><th id="test" data-row="0" data-col="0">cell1-1</th><th>cell1-2</th><th>cell1-3</tr><tr><th>cell2-1</th><th>cell2-2</th><th>cell2-3</th></tr><tr><th>cell3-1</th><th>cell3-2</th><th>cell3-3</th></tr></table>',
-  ]
+  ];
 
   for (const kTest of kTests) {
     editor.innerHTML = kTest;
     editor.scrollTop; // compute layout now.
     let cell = document.getElementById("test");
     getTableEditor().getCellIndexes(cell, rowIndex, columnIndex);
     is(rowIndex.value.toString(10), cell.getAttribute("data-row"), `Specified cell element directly, row Index value of ${kTest}`);
     is(columnIndex.value.toString(10), cell.getAttribute("data-col"), `Specified cell element directly, column Index value of ${kTest}`);
--- a/editor/libeditor/tests/test_nsITableEditor_getFirstRow.html
+++ b/editor/libeditor/tests/test_nsITableEditor_getFirstRow.html
@@ -69,17 +69,17 @@ SimpleTest.waitForFocus(function() {
     '<table><caption>table-caption</caption><tr id="expected"><td id="test">cell</td></tr></table>',
     '<table class="hasAnonymousRow"><td id="test">cell</td></table>',
     '<table class="hasAnonymousRow"><td>cell-1</td><td id="test">cell-2</td></table>',
     '<table><tr><td><table id="test"></table></td></tr></table>',
     '<table><tr><td><table><caption id="test">table-caption</caption></table></td></tr></table>',
     '<table><tr><td><table class="hasAnonymousRow"><td id="test">cell</td></table></td></tr></table>',
     '<table><tr><td><table class="hasAnonymousRow"><td>cell-1</td><td id="test">cell-2</td></table></td></tr></table>',
     '<table><tr id="expected"><td><p id="test">paragraph</p></td></tr></table>',
-  ]
+  ];
 
   for (const kTest of kTests) {
     editor.innerHTML = kTest;
     let firstRow = SpecialPowers.unwrap(getTableEditor().getFirstRow(document.getElementById("test")));
     if (document.getElementById("expected")) {
       is(firstRow.tagName, "TR", `Result should be a <tr>: ${kTest}`);
       is(firstRow.getAttribute("id"), "expected", `Result should be the first <tr> element in the <table>: ${kTest}`);
     } else if (document.querySelector(".hasAnonymousRow")) {
--- a/editor/libeditor/tests/test_nsITableEditor_getFirstSelectedCell.html
+++ b/editor/libeditor/tests/test_nsITableEditor_getFirstSelectedCell.html
@@ -31,17 +31,17 @@ SimpleTest.waitForFocus(function() {
     '<table id="table">' +
       '<tr id="r1"><td id="c1-1">cell1-1</td><td id="c1-2">cell1-2</td><td id="c1-3">cell1-3</td><td id="c1-4" colspan="2" rowspan="2">cell1-4</td></tr>' +
       '<tr id="r2"><th id="c2-1" rowspan="2">cell2-1</th><td id="c2-2">cell2-2<td id="c2-3">cell2-3</td></tr>' +
       '<tr id="r3"><td id="c3-2">cell3-2</td><td id="c3-3">cell3-3</td><td id="c3-4" colspan="2">cell3-4</td></tr>' +
       '<tr id="r4"><td id="c4-1" rowspan="4">cell4-1</td><td id="c4-2">cell4-2</td><td id="c4-3">cell4-3</td><th id="c4-4">cell4-4</th><td id="c4-5">cell4-5</td></tr>' +
       '<tr id="r5"><th id="c5-2">cell5-2</th><th id="c5-3" colspan="2">cell5-3</th><td id="c5-5">cell5-5</td></tr>' +
       '<tr id="r6"><td id="c6-2">cell6-2</td><td id="c6-3">cell6-3</td><td id="c6-4"><p>cell6-4</p></td><td id="c6-5">cell6-5</td></tr>' +
       '<tr id="r7"><td id="c7-2" colspan="4">cell7-2</td></tr>' +
-    '</table>';
+    "</table>";
 
   let tr = document.getElementById("r1");
   selection.setBaseAndExtent(tr, 0, tr, 1);
   cell = SpecialPowers.unwrap(getTableEditor().getFirstSelectedCell(rangeWrapper));
   is(cell, document.getElementById("c1-1"),
      "#1-1 nsITableEditor.getFirstSelectedCell() should return the first cell element in the first row");
   is(rangeWrapper.value.startContainer, tr,
      "#1-1 nsITableEditor.getFirstSelectedCell() should return the first <tr> element as start container of the range");
--- a/editor/libeditor/tests/test_nsITableEditor_getNextSelectedCell.html
+++ b/editor/libeditor/tests/test_nsITableEditor_getNextSelectedCell.html
@@ -26,17 +26,17 @@ SimpleTest.waitForFocus(function() {
       '<tr id="r2"><th id="c2-1" rowspan="2">cell2-1</th><td id="c2-2">cell2-2<td id="c2-3">cell2-3</td></tr>' +
       '<tr id="r3"><td id="c3-2">cell3-2</td><td id="c3-3">cell3-3</td><td id="c3-4" colspan="2">cell3-4</td></tr>' +
       '<tr id="r4"><td id="c4-1" rowspan="4">cell4-1</td><td id="c4-2">cell4-2</td><td id="c4-3">cell4-3</td><th id="c4-4">cell4-4</th><td id="c4-5">cell4-5</td></tr>' +
       '<tr id="r5"><th id="c5-2">cell5-2</th><th id="c5-3" colspan="2">' +
         '<table><tr id="r2-1"><td id="c2-1-1">cell2-1-1</td></tr></table>' +
         '</th><td id="c5-5">cell5-5</td></tr>' +
       '<tr id="r6"><td id="c6-2">cell6-2</td><td id="c6-3">cell6-3</td><td id="c6-4"><p>cell6-4</p></td><td id="c6-5">cell6-5</td></tr>' +
       '<tr id="r7"><td id="c7-2" colspan="4">cell7-2</td></tr>' +
-    '</table>';
+    "</table>";
 
   let tr = document.getElementById("r1");
   selection.setBaseAndExtent(tr, 0, tr, 1);
   cell = SpecialPowers.unwrap(getTableEditor().getFirstSelectedCell(rangeWrapper));
   is(cell.getAttribute("id"), "c1-1",
      "#1-1 nsITableEditor.getFirstSelectedCell() should return the first cell element in the first row");
 
   cell = SpecialPowers.unwrap(getTableEditor().getNextSelectedCell(rangeWrapper));
--- a/editor/libeditor/tests/test_nsITableEditor_getTableSize.html
+++ b/editor/libeditor/tests/test_nsITableEditor_getTableSize.html
@@ -54,17 +54,17 @@ SimpleTest.waitForFocus(function() {
     '<table id="test" data-rows="1" data-cols="1"><td>cell1-1</td></table>',
     // rowspan does not affect, but colspan affects...
     '<table id="test" data-rows="1" data-cols="12"><tr><td rowspan="8" colspan="12">cell1-1</td></tr></table>',
     '<table id="test" data-rows="1" data-cols="1"><tr><td><table><tr><td>cell1-1</td><td>cell1-2</td></tr><tr><td>cell2-1</td><td>cell2-2</td></tr><tr><td>cell3-1</td><td>cell3-2</td></tr></table></td></tr></table>',
     '<table><tr><td id="test" data-rows="1" data-cols="1"><table><tr><td>cell1-1</td><td>cell1-2</td></tr><tr><td>cell2-1</td><td>cell2-2</td></tr><tr><td>cell3-1</td><td>cell3-2</td></tr></table></td></tr></table>',
     '<table><tr><td><table id="test" data-rows="3" data-cols="2"><tr><td>cell1-1</td><td>cell1-2</td></tr><tr><td>cell2-1</td><td>cell2-2</td></tr><tr><td>cell3-1</td><td>cell3-2</td></tr></table></td></tr></table>',
     '<table><tr><td><table><tr><td id="test" data-rows="3" data-cols="2">cell1-1</td><td>cell1-2</td></tr><tr><td>cell2-1</td><td>cell2-2</td></tr><tr><td>cell3-1</td><td>cell3-2</td></tr></table></td></tr></table>',
     '<table><tr><td><table><tr><td>cell1-1</td><td>cell1-2</td></tr><tr><td>cell2-1</td><td><p id="test" data-rows="3" data-cols="2">cell2-2</p></td></tr><tr><td>cell3-1</td><td>cell3-2</td></tr></table></td></tr></table>',
-  ]
+  ];
 
   for (const kTest of kTests) {
     editor.innerHTML = kTest;
     editor.scrollTop; // compute layout now.
     let element = document.getElementById("test");
     getTableEditor().getTableSize(element, rowCount, columnCount);
     is(rowCount.value.toString(10), element.getAttribute("data-rows"),
        `Specified an element in a <table> directly, its parent table row count should be retrieved: ${kTest}`);
--- a/editor/libeditor/tests/test_resizers_appearance.html
+++ b/editor/libeditor/tests/test_resizers_appearance.html
@@ -39,17 +39,17 @@ SimpleTest.waitForFocus(async function()
       resizable: true,
     },
     { description: "<table>",
       innerHTML: "<table id=\"target\" border><tr><td>1-1</td><td>1-2</td></tr><tr><td>2-1</td><td>2-2</td></tr></table>",
       resizable: true,
     },
     { description: "absolute positioned <div>",
       innerHTML: "<div id=\"target\" style=\"position: absolute; top: 50px; left: 50px;\">positioned</div>",
-      resizable: function () { return document.queryCommandState("enableAbsolutePositionEditing"); },
+      resizable() { return document.queryCommandState("enableAbsolutePositionEditing"); },
     },
     { description: "fixed positioned <div>",
       innerHTML: "<div id=\"target\" style=\"position: fixed; top: 50px; left: 50px;\">positioned</div>",
       resizable: false,
     },
     { description: "relative positioned <div>",
       innerHTML: "<div id=\"target\" style=\"position: relative; top: 50px; left: 50px;\">positioned</div>",
       resizable: false,
--- a/editor/libeditor/tests/test_resizers_resizing_elements.html
+++ b/editor/libeditor/tests/test_resizers_resizing_elements.html
@@ -116,91 +116,91 @@ SimpleTest.waitForFocus(async function()
     // direction to the mouse movement in order to maintain the aspect ratio.
     const ignoredGrowth = aPreserveRatio ? 0 : 1;
     const needlessGrowth = aPreserveRatio ? 1 : 0;
     const reversedGrowth = aPreserveRatio ? -1 : 1;
 
     /* eslint-disable no-multi-spaces */
 
     // top resizer
-    await testResizer(W/2,   0, -10, -10,   0,  10);
-    await testResizer(W/2,   0, -10,   0,   0,   0);
-    await testResizer(W/2,   0, -10,  10,   0, -10);
-    await testResizer(W/2,   0,   0, -10,   0,  10);
-    await testResizer(W/2,   0,   0,   0,   0,   0);
-    await testResizer(W/2,   0,   0,  10,   0, -10);
-    await testResizer(W/2,   0,  10, -10,   0,  10);
-    await testResizer(W/2,   0,  10,   0,   0,   0);
-    await testResizer(W/2,   0,  10,  10,   0, -10);
+    await testResizer(W / 2,   0, -10, -10,   0,  10);
+    await testResizer(W / 2,   0, -10,   0,   0,   0);
+    await testResizer(W / 2,   0, -10,  10,   0, -10);
+    await testResizer(W / 2,   0,   0, -10,   0,  10);
+    await testResizer(W / 2,   0,   0,   0,   0,   0);
+    await testResizer(W / 2,   0,   0,  10,   0, -10);
+    await testResizer(W / 2,   0,  10, -10,   0,  10);
+    await testResizer(W / 2,   0,  10,   0,   0,   0);
+    await testResizer(W / 2,   0,  10,  10,   0, -10);
 
     // top right resizer
     await testResizer(  W,   0, -10, -10, -10 * reversedGrowth, 10);
     await testResizer(  W,   0, -10,   0, -10 * ignoredGrowth,   0);
     await testResizer(  W,   0, -10,  10, -10, -10);
     await testResizer(  W,   0,   0, -10,  10 * needlessGrowth,  10);
     await testResizer(  W,   0,   0,   0,   0,   0);
     await testResizer(  W,   0,   0,  10,   0, -10 * ignoredGrowth);
     await testResizer(  W,   0,  10, -10,  10,  10);
     await testResizer(  W,   0,  10,   0,  10,  10 * needlessGrowth);
     await testResizer(  W,   0,  10,  10,  10, -10 * reversedGrowth);
 
     // right resizer
-    await testResizer(  W, H/2, -10, -10, -10,   0);
-    await testResizer(  W, H/2, -10,   0, -10,   0);
-    await testResizer(  W, H/2, -10,  10, -10,   0);
-    await testResizer(  W, H/2,   0, -10,   0,   0);
-    await testResizer(  W, H/2,   0,   0,   0,   0);
-    await testResizer(  W, H/2,   0,  10,   0,   0);
-    await testResizer(  W, H/2,  10, -10,  10,   0);
-    await testResizer(  W, H/2,  10,   0,  10,   0);
-    await testResizer(  W, H/2,  10,  10,  10,   0);
+    await testResizer(  W, H / 2, -10, -10, -10,   0);
+    await testResizer(  W, H / 2, -10,   0, -10,   0);
+    await testResizer(  W, H / 2, -10,  10, -10,   0);
+    await testResizer(  W, H / 2,   0, -10,   0,   0);
+    await testResizer(  W, H / 2,   0,   0,   0,   0);
+    await testResizer(  W, H / 2,   0,  10,   0,   0);
+    await testResizer(  W, H / 2,  10, -10,  10,   0);
+    await testResizer(  W, H / 2,  10,   0,  10,   0);
+    await testResizer(  W, H / 2,  10,  10,  10,   0);
 
     // bottom right resizer
     await testResizer(  W,   H, -10, -10, -10, -10);
     await testResizer(  W,   H, -10,   0, -10 * ignoredGrowth,   0);
     await testResizer(  W,   H, -10,  10, -10 * reversedGrowth,  10);
     await testResizer(  W,   H,   0, -10,   0, -10 * ignoredGrowth);
     await testResizer(  W,   H,   0,   0,   0,   0);
     await testResizer(  W,   H,   0,  10,  10 * needlessGrowth,  10);
     await testResizer(  W,   H,  10, -10,  10, -10 * reversedGrowth);
     await testResizer(  W,   H,  10,   0,  10,  10 * needlessGrowth);
     await testResizer(  W,   H,  10,  10,  10,  10);
 
     // bottom resizer
-    await testResizer(W/2,   H, -10, -10,   0, -10);
-    await testResizer(W/2,   H, -10,   0,   0,   0);
-    await testResizer(W/2,   H, -10,  10,   0,  10);
-    await testResizer(W/2,   H,   0, -10,   0, -10);
-    await testResizer(W/2,   H,   0,   0,   0,   0);
-    await testResizer(W/2,   H,   0,  10,   0,  10);
-    await testResizer(W/2,   H,  10, -10,   0, -10);
-    await testResizer(W/2,   H,  10,   0,   0,   0);
-    await testResizer(W/2,   H,  10,  10,   0,  10);
+    await testResizer(W / 2,   H, -10, -10,   0, -10);
+    await testResizer(W / 2,   H, -10,   0,   0,   0);
+    await testResizer(W / 2,   H, -10,  10,   0,  10);
+    await testResizer(W / 2,   H,   0, -10,   0, -10);
+    await testResizer(W / 2,   H,   0,   0,   0,   0);
+    await testResizer(W / 2,   H,   0,  10,   0,  10);
+    await testResizer(W / 2,   H,  10, -10,   0, -10);
+    await testResizer(W / 2,   H,  10,   0,   0,   0);
+    await testResizer(W / 2,   H,  10,  10,   0,  10);
 
     // bottom left resizer
     await testResizer(  0,   H, -10, -10,  10, -10 * reversedGrowth);
     await testResizer(  0,   H, -10,   0,  10,  10 * needlessGrowth);
     await testResizer(  0,   H, -10,  10,  10,  10);
     await testResizer(  0,   H,   0, -10,   0, -10 * ignoredGrowth);
     await testResizer(  0,   H,   0,   0,   0,   0);
     await testResizer(  0,   H,   0,  10,  10 * needlessGrowth,  10);
     await testResizer(  0,   H,  10, -10, -10, -10);
     await testResizer(  0,   H,  10,   0, -10 * ignoredGrowth,   0);
     await testResizer(  0,   H,  10,  10, -10 * reversedGrowth,  10);
 
     // left resizer
-    await testResizer(  0, H/2, -10, -10,  10,   0);
-    await testResizer(  0, H/2, -10,   0,  10,   0);
-    await testResizer(  0, H/2, -10,  10,  10,   0);
-    await testResizer(  0, H/2,   0, -10,   0,   0);
-    await testResizer(  0, H/2,   0,   0,   0,   0);
-    await testResizer(  0, H/2,   0,  10,   0,   0);
-    await testResizer(  0, H/2,  10, -10, -10,   0);
-    await testResizer(  0, H/2,  10,   0, -10,   0);
-    await testResizer(  0, H/2,  10,  10, -10,   0);
+    await testResizer(  0, H / 2, -10, -10,  10,   0);
+    await testResizer(  0, H / 2, -10,   0,  10,   0);
+    await testResizer(  0, H / 2, -10,  10,  10,   0);
+    await testResizer(  0, H / 2,   0, -10,   0,   0);
+    await testResizer(  0, H / 2,   0,   0,   0,   0);
+    await testResizer(  0, H / 2,   0,  10,   0,   0);
+    await testResizer(  0, H / 2,  10, -10, -10,   0);
+    await testResizer(  0, H / 2,  10,   0, -10,   0);
+    await testResizer(  0, H / 2,  10,  10, -10,   0);
 
     // top left resizer
     await testResizer(  0,   0, -10, -10,  10,  10);
     await testResizer(  0,   0, -10,   0,  10,  10 * needlessGrowth);
     await testResizer(  0,   0, -10,  10,  10, -10 * reversedGrowth);
     await testResizer(  0,   0,   0, -10,  10 * needlessGrowth,  10);
     await testResizer(  0,   0,   0,   0,   0,   0);
     await testResizer(  0,   0,   0,  10,   0, -10 * ignoredGrowth);
--- a/editor/libeditor/tests/test_root_element_replacement.html
+++ b/editor/libeditor/tests/test_root_element_replacement.html
@@ -17,32 +17,30 @@
 <pre id="test">
 </pre>
 
 <script class="testbody" type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(runTest);
 
-function runDesignModeTest(aDoc, aFocus, aNewSource)
-{
+function runDesignModeTest(aDoc, aFocus, aNewSource) {
   aDoc.designMode = "on";
 
   if (aFocus) {
     aDoc.documentElement.focus();
   }
 
   aDoc.open();
   aDoc.write(aNewSource);
   aDoc.close();
   aDoc.documentElement.focus();
 }
 
-function runContentEditableTest(aDoc, aFocus, aNewSource)
-{
+function runContentEditableTest(aDoc, aFocus, aNewSource) {
   if (aFocus) {
     aDoc.body.setAttribute("contenteditable", "true");
     aDoc.body.focus();
   }
 
   aDoc.open();
   aDoc.write(aNewSource);
   aDoc.close();
@@ -74,18 +72,17 @@ const kTests = [
   { description: "Replace to '<body contenteditable='true'></body>",
     initializer: runContentEditableTest,
     args: [ "<body contenteditable='true' id='focus'></body>" ] },
 ];
 
 var gIFrame;
 var gSetFocusToIFrame = false;
 
-function onLoadIFrame()
-{
+function onLoadIFrame() {
   var frameDoc = gIFrame.contentWindow.document;
 
   var selCon = SpecialPowers.wrap(gIFrame).contentWindow.
     docShell.
     QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor).
     getInterface(SpecialPowers.Ci.nsISelectionDisplay).
     QueryInterface(SpecialPowers.Ci.nsISelectionController);
   var utils = SpecialPowers.getDOMWindowUtils(window);
@@ -127,18 +124,17 @@ function onLoadIFrame()
     gSetFocusToIFrame = true;
     gTestIndex = 0;
     setTimeout(runTest, 0);
   } else {
     SimpleTest.finish();
   }
 }
 
-function runTest()
-{
+function runTest() {
   gIFrame = document.createElement("iframe");
   document.getElementById("display").appendChild(gIFrame);
   gIFrame.src = "about:blank";
   gIFrame.onload = onLoadIFrame;
 }
 
 </script>
 </body>
--- a/editor/libeditor/tests/test_select_all_without_body.html
+++ b/editor/libeditor/tests/test_select_all_without_body.html
@@ -13,15 +13,15 @@
   
 </div>
 <pre id="test">
 </pre>
 
 <script class="testbody" type="application/javascript">
 
 SimpleTest.waitForExplicitFinish();
-window.open("file_select_all_without_body.html", "_blank", 
+window.open("file_select_all_without_body.html", "_blank",
             "width=600,height=600");
 
 </script>
 </body>
 
 </html>
--- a/editor/libeditor/tests/test_selection_move_commands.html
+++ b/editor/libeditor/tests/test_selection_move_commands.html
@@ -20,25 +20,25 @@ async function setup() {
 
 function* runTests() {
   var e = document.getElementById("edit");
   var doc = e.contentDocument;
   var win = e.contentWindow;
   var root = doc.documentElement;
   var body = doc.body;
 
-  body.style.fontSize='16px';
-  body.style.lineHeight='16px';
-  body.style.height='400px';
-  body.style.padding='0px';
-  body.style.margin='0px';
-  body.style.borderWidth='0px';
+  body.style.fontSize = "16px";
+  body.style.lineHeight = "16px";
+  body.style.height = "400px";
+  body.style.padding = "0px";
+  body.style.margin = "0px";
+  body.style.borderWidth = "0px";
 
   var sel = win.getSelection();
-  doc.designMode='on';
+  doc.designMode = "on";
   body.innerHTML = "1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10<br>11<br>12<br>";
   win.focus();
   // Flush out layout to make sure that the subdocument will be the size we
   // expect by the time we try to scroll it.
   is(body.getBoundingClientRect().height, 400,
      "Body height should be what we set it to");
   yield;
 
@@ -175,17 +175,17 @@ function* runTests() {
     SpecialPowers.doCommand(window, "cmd_beginLine");
     is(testPageMoveCommand("cmd_movePageUp", 0), 22 - lineNum, "cmd_movePageUp");
 
     SpecialPowers.doCommand(window, "cmd_moveTop");
     is(testPageSelectCommand("cmd_selectPageDown", 0), lineNum, "cmd_selectPageDown");
     SpecialPowers.doCommand(window, "cmd_moveBottom");
     SpecialPowers.doCommand(window, "cmd_beginLine");
     is(testPageSelectCommand("cmd_selectPageUp", 0), 22 - lineNum, "cmd_selectPageUp");
-  }
+  };
 
   yield SpecialPowers.pushPrefEnv({set: [["layout.word_select.eat_space_to_next_word", false]]});
   runSelectionTests(body, 1);
   yield SpecialPowers.pushPrefEnv({set: [["layout.word_select.eat_space_to_next_word", true]]});
   runSelectionTests(node(2), 0);
 }
 
 function cleanup() {
--- a/editor/libeditor/tests/test_texteditor_keyevent_handling.html
+++ b/editor/libeditor/tests/test_texteditor_keyevent_handling.html
@@ -28,49 +28,45 @@ SimpleTest.waitForFocus(runTests, window
 var inputField = document.getElementById("inputField");
 var passwordField = document.getElementById("passwordField");
 var textarea = document.getElementById("textarea");
 
 const kIsMac = navigator.platform.indexOf("Mac") == 0;
 const kIsWin = navigator.platform.indexOf("Win") == 0;
 const kIsLinux = navigator.platform.indexOf("Linux") == 0;
 
-function runTests()
-{
+function runTests() {
   var fm = SpecialPowers.Cc["@mozilla.org/focus-manager;1"].
     getService(SpecialPowers.Ci.nsIFocusManager);
 
   var capturingPhase = { fired: false, prevented: false };
   var bubblingPhase = { fired: false, prevented: false };
 
   var listener = {
-    handleEvent: function _hv(aEvent)
-    {
+    handleEvent: function _hv(aEvent) {
       is(aEvent.type, "keypress", "unexpected event is handled");
       switch (aEvent.eventPhase) {
       case aEvent.CAPTURING_PHASE:
         capturingPhase.fired = true;
         capturingPhase.prevented = aEvent.defaultPrevented;
         break;
       case aEvent.BUBBLING_PHASE:
         bubblingPhase.fired = true;
         bubblingPhase.prevented = aEvent.defaultPrevented;
         aEvent.preventDefault(); // prevent the browser default behavior
         break;
       default:
         ok(false, "event is handled in unexpected phase");
       }
-    }
+    },
   };
 
   function check(aDescription,
-                 aFiredOnCapture, aFiredOnBubbling, aPreventedOnBubbling)
-  {
-    function getDesciption(aExpected)
-    {
+                 aFiredOnCapture, aFiredOnBubbling, aPreventedOnBubbling) {
+    function getDesciption(aExpected) {
       return aDescription + (aExpected ? " wasn't " : " was ");
     }
 
     is(capturingPhase.fired, aFiredOnCapture,
        getDesciption(aFiredOnCapture) + "fired on capture phase");
     is(bubblingPhase.fired, aFiredOnBubbling,
        getDesciption(aFiredOnBubbling) + "fired on bubbling phase");
 
@@ -88,32 +84,30 @@ function runTests()
 
   var parentElement = document.getElementById("display");
   SpecialPowers.addSystemEventListener(parentElement, "keypress", listener,
                                        true);
   SpecialPowers.addSystemEventListener(parentElement, "keypress", listener,
                                        false);
 
   function doTest(aElement, aDescription, aIsSingleLine, aIsReadonly,
-                  aIsTabbable)
-  {
-    function reset(aText)
-    {
+                  aIsTabbable) {
+    function reset(aText) {
       capturingPhase.fired = false;
       capturingPhase.prevented = false;
       bubblingPhase.fired = false;
       bubblingPhase.prevented = false;
       aElement.value = aText;
     }
 
     if (document.activeElement) {
       document.activeElement.blur();
     }
 
-    aDescription += ": "
+    aDescription += ": ";
 
     aElement.focus();
     is(SpecialPowers.unwrap(fm.focusedElement), aElement, aDescription + "failed to move focus");
 
     // Backspace key:
     //   If editor is readonly, it doesn't consume.
     //   If editor is editable, it consumes backspace and shift+backspace.
     //   Otherwise, editor doesn't consume the event but the native key
--- a/editor/spellchecker/tests/test_async_UpdateCurrentDictionary.html
+++ b/editor/spellchecker/tests/test_async_UpdateCurrentDictionary.html
@@ -21,50 +21,49 @@ SimpleTest.waitForExplicitFinish();
 addLoadEvent(start);
 
 function start() {
   var textarea = document.getElementById("editor");
   textarea.focus();
 
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm")
-  .onSpellCheck(textarea, function () {
+  .onSpellCheck(textarea, function() {
     var isc = SpecialPowers.wrap(textarea).editor.getInlineSpellChecker(false);
     ok(isc, "Inline spell checker should exist after focus and spell check");
     var sc = isc.spellChecker;
     isnot(sc.GetCurrentDictionary(), lang,
           "Current dictionary should not be set yet.");
 
     // First, set the lang attribute on the textarea, call Update, and make
     // sure the spell checker's language was updated appropriately.
     var lang = "en-US";
     textarea.setAttribute("lang", lang);
-    sc.UpdateCurrentDictionary(function () {
+    sc.UpdateCurrentDictionary(function() {
       is(sc.GetCurrentDictionary(), lang,
          "UpdateCurrentDictionary should set the current dictionary.");
 
       // Second, make some Update calls, but then do a Set.  The Set should
       // effectively cancel the Updates, but the Updates' callbacks should be
       // called nonetheless.
       var numCalls = 3;
       for (var i = 0; i < numCalls; i++) {
-        sc.UpdateCurrentDictionary(function () {
+        sc.UpdateCurrentDictionary(function() {
           is(sc.GetCurrentDictionary(), "",
              "No dictionary should be active after Update.");
           if (--numCalls == 0) {
             // This will clear the content preferences and reset "spellchecker.dictionary".
             sc.SetCurrentDictionary("");
             SimpleTest.finish();
           }
         });
       }
       try {
         sc.SetCurrentDictionary("testing-XX");
-      }
-      catch (err) {
+      } catch (err) {
         // Set throws NS_ERROR_NOT_AVAILABLE because "testing-XX" isn't really
         // an available dictionary.
       }
       is(sc.GetCurrentDictionary(), "",
          "No dictionary should be active after Set.");
     });
   });
 }
--- a/editor/spellchecker/tests/test_bug1200533.html
+++ b/editor/spellchecker/tests/test_bug1200533.html
@@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 </div>
 <pre id="test">
 <script class="testbody" ttype="application/javascript">
 
 /** Test for Bug 1200533 **/
 /** Visit the elements defined above and check the dictionary we got **/
 SimpleTest.waitForExplicitFinish();
-var content = document.getElementById('content');
+var content = document.getElementById("content");
 
 var tests = [
     // text area, value of spellchecker.dictionary, result.
     // Result: Document language.
     [ "none",  "", "en-US" ],
     // Result: Element language.
     [ "en-GB", "", "en-GB" ],
     [ "en-gb", "", "en-GB" ],
@@ -86,55 +86,55 @@ var loadListener = function(evt) {
     });
     var existenceChecks = script.sendSyncMessage("check-existence")[0][0];
     is(existenceChecks[0], true, "true expected (en-GB directory should exist)");
     is(existenceChecks[1], true, "true expected (en-AU directory should exist)");
     is(existenceChecks[2], true, "true expected (de-DE directory should exist)");
   }
 
   SpecialPowers.pushPrefEnv({set: [["spellchecker.dictionary", tests[loadCount][1]]]},
-                            function() { continueTest(evt) });
-}
+                            function() { continueTest(evt); });
+};
 
 function continueTest(evt) {
   var doc = evt.target.contentDocument;
   var elem = doc.getElementById(tests[loadCount][0]);
   var editor = SpecialPowers.wrap(elem).editor;
   editor.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor.getInlineSpellChecker(true);
 
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm")
-  .onSpellCheck(elem, function () {
+  .onSpellCheck(elem, function() {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var dict = spellchecker.GetCurrentDictionary();
-    } catch(e) {}
+    } catch (e) {}
 
     if (tests[loadCount][2] != "*") {
-      is (dict, tests[loadCount][2], "expected " + tests[loadCount][2]);
+      is(dict, tests[loadCount][2], "expected " + tests[loadCount][2]);
     } else {
       var gotEn = (dict == "en-GB" || dict == "en-AU" || dict == "en-US");
-      is (gotEn, true, "expected en-AU or en-GB or en-US");
+      is(gotEn, true, "expected en-AU or en-GB or en-US");
     }
 
     loadCount++;
     if (loadCount < tests.length) {
       // Load the iframe again.
-      content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug1200533_subframe.html?firstload=false';
+      content.src = "http://mochi.test:8888/tests/editor/spellchecker/tests/bug1200533_subframe.html?firstload=false";
     } else {
       // Remove the fake  dictionaries again, since it's otherwise picked up by later tests.
       script.sendSyncMessage("destroy");
 
       SimpleTest.finish();
     }
   });
 
 }
 
-content.addEventListener('load', loadListener);
+content.addEventListener("load", loadListener);
 
-content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug1200533_subframe.html?firstload=true';
+content.src = "http://mochi.test:8888/tests/editor/spellchecker/tests/bug1200533_subframe.html?firstload=true";
 
 </script>
 </pre>
 </body>
 </html>
--- a/editor/spellchecker/tests/test_bug1204147.html
+++ b/editor/spellchecker/tests/test_bug1204147.html
@@ -14,17 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <iframe id="content"></iframe>
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 1204147 **/
 SimpleTest.waitForExplicitFinish();
-var content = document.getElementById('content');
+var content = document.getElementById("content");
 // Load a subframe containing an editor with using "en-GB". At first
 // load, it will set the dictionary to "en-GB". The bug was that a content preference
 // was also created. At second load, we check the dictionary for another element,
 // one that should use "en-US". With the bug corrected, we get "en-US", before
 // we got "en-GB" from the content preference.
 
 var firstLoad = true;
 var script;
@@ -53,61 +53,61 @@ var loadListener = function(evt) {
     });
     is(script.sendSyncMessage("en_GB-exists")[0][0], true,
        "true expected (en-GB directory should exist)");
   }
 
   var doc = evt.target.contentDocument;
   var elem;
   if (firstLoad) {
-    elem = doc.getElementById('en-GB');
+    elem = doc.getElementById("en-GB");
   } else {
-    elem = doc.getElementById('en-US');
+    elem = doc.getElementById("en-US");
   }
 
   var editor = SpecialPowers.wrap(elem).editor;
   editor.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor.getInlineSpellChecker(true);
 
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm")
-  .onSpellCheck(elem, function () {
+  .onSpellCheck(elem, function() {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var currentDictonary = spellchecker.GetCurrentDictionary();
-    } catch(e) {}
+    } catch (e) {}
 
     if (firstLoad) {
       firstLoad = false;
 
        // First time around, the element's language should be used.
-      is (currentDictonary, "en-GB", "unexpected lang " + currentDictonary + " instead of en-GB");
+      is(currentDictonary, "en-GB", "unexpected lang " + currentDictonary + " instead of en-GB");
 
       // Note that on second load, we load a different page, which does NOT have the trouble-causing
       // contenteditable in it. Sadly, loading the same page with the trouble-maker in it
       // doesn't allow the retrieval of the spell check dictionary used for the element,
       // because the trouble-maker causes the 'global' spell check dictionary to be set to "en-GB"
       // (since it picks the first one from the list) before we have the chance to retrieve
       // the dictionary for the element (which happens asynchonously after the spell check has completed).
-      content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug1204147_subframe2.html?firstload=false';
+      content.src = "http://mochi.test:8888/tests/editor/spellchecker/tests/bug1204147_subframe2.html?firstload=false";
     } else {
       // Second time around, the element should default to en-US.
       // Without the fix, the first run sets the content preference to en-GB for the whole site.
-      is (currentDictonary, "en-US", "unexpected lang " + currentDictonary + " instead of en-US");
-      content.removeEventListener('load', loadListener);
+      is(currentDictonary, "en-US", "unexpected lang " + currentDictonary + " instead of en-US");
+      content.removeEventListener("load", loadListener);
 
       // Remove the fake en-GB dictionary again, since it's otherwise picked up by later tests.
       script.sendSyncMessage("destroy");
 
       // Reset the preference, so the last value we set doesn't collide with the next test.
       SimpleTest.finish();
     }
   });
-}
+};
 
-content.addEventListener('load', loadListener);
+content.addEventListener("load", loadListener);
 
-content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug1204147_subframe.html?firstload=true';
+content.src = "http://mochi.test:8888/tests/editor/spellchecker/tests/bug1204147_subframe.html?firstload=true";
 
 </script>
 </pre>
 </body>
 </html>
--- a/editor/spellchecker/tests/test_bug1205983.html
+++ b/editor/spellchecker/tests/test_bug1205983.html
@@ -53,50 +53,50 @@ SimpleTest.waitForFocus(function() {
     hunspell.addDirectory(de_DE);
 
     addMessageListener("de_DE-exists", () => de_DE.exists());
     addMessageListener("destroy", () => hunspell.removeDirectory(de_DE));
   });
   is(script.sendSyncMessage("de_DE-exists")[0][0], true,
      "true expected (de_DE directory should exist)");
 
-  document.getElementById('de-DE').focus();
+  document.getElementById("de-DE").focus();
 });
 
 function deFocus() {
-  elem_de = document.getElementById('de-DE');
+  elem_de = document.getElementById("de-DE");
 
-  onSpellCheck(elem_de, function () {
+  onSpellCheck(elem_de, function() {
     var Ci = SpecialPowers.Ci;
     var editingSession = SpecialPowers.wrap(window).docShell.editingSession;
     editor_de = editingSession.getEditorForWindow(window);
     selcon_de = editor_de.selectionController;
     var sel = selcon_de.getSelection(selcon_de.SELECTION_SPELLCHECK);
 
     // Check that we spelled in German, so there is only one misspelled word.
     is(sel.toString(), "German", "one misspelled word expected: German");
 
     // Now focus the textarea, which requires English spelling.
-    document.getElementById('en-US').focus();
+    document.getElementById("en-US").focus();
   });
 }
 
 function enFocus() {
-  var elem_en = document.getElementById('en-US');
+  var elem_en = document.getElementById("en-US");
   var editor_en =
     SpecialPowers.wrap(elem_en)
                  .editor;
   editor_en.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor_en.getInlineSpellChecker(true);
 
-  onSpellCheck(elem_en, function () {
+  onSpellCheck(elem_en, function() {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       currentDictonary = spellchecker.GetCurrentDictionary();
-    } catch(e) {}
+    } catch (e) {}
 
     // Check that the English dictionary is loaded and that the spell check has worked.
     is(currentDictonary, "en-US", "expected en-US");
     is(getMisspelledWords(editor_en), "Nogoodword", "one misspelled word expected: Nogoodword");
 
     // So far all was boring. The important thing is whether the spell check result
     // in the de-DE editor is still the same. After losing focus, no spell check
     // updates should take place there.
@@ -107,17 +107,17 @@ function enFocus() {
     script.sendSyncMessage("destroy");
 
     // Focus again, so the spelling gets updated, but before we need to kill the focus handler.
     elem_de.onfocus = null;
     elem_de.blur();
     elem_de.focus();
 
     // After removal, the de_DE editor should refresh the spelling with en-US.
-    onSpellCheck(elem_de, function () {
+    onSpellCheck(elem_de, function() {
       var sel = selcon_de.getSelection(selcon_de.SELECTION_SPELLCHECK);
       is(sel.toString(), "heute" + "ist" + "ein" + "guter",
          "some misspelled words expected: heute ist ein guter");
 
       // If we don't reset this, we cause massive leaks.
       selcon_de = null;
       editor_de = null;
 
--- a/editor/spellchecker/tests/test_bug1209414.html
+++ b/editor/spellchecker/tests/test_bug1209414.html
@@ -83,51 +83,51 @@ SimpleTest.waitForFocus(function() {
     addMessageListener("de_DE-exists", () => de_DE.exists());
   });
   is(script.sendSyncMessage("contextMenu-not-null")[0][0], true,
      "Got context menu XUL");
   is(script.sendSyncMessage("de_DE-exists")[0][0], true,
      "true expected (de_DE directory should exist)");
   script.addMessageListener("popupshown", handlePopup);
 
-  elem_de = document.getElementById('de-DE');
+  elem_de = document.getElementById("de-DE");
   editor_de = SpecialPowers.wrap(elem_de).editor;
   editor_de.setSpellcheckUserOverride(true);
 
-  onSpellCheck(elem_de, function () {
+  onSpellCheck(elem_de, function() {
     var inlineSpellChecker = editor_de.getInlineSpellChecker(true);
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var currentDictonary = spellchecker.GetCurrentDictionary();
-    } catch(e) {}
+    } catch (e) {}
 
     // Check that the German dictionary is loaded and that the spell check has worked.
     is(currentDictonary, "de-DE", "expected de-DE");
     is(getMisspelledWords(editor_de), "today" + "is" + "a" + "good" + "day", "some misspelled words expected: today is a good day");
 
     // Focus again, just to be sure that the context-click won't trigger another spell check.
     elem_de.focus();
 
     // Make sure all spell checking action is done before right-click to select the en-US dictionary.
-    onSpellCheck(elem_de, function () {
-      synthesizeMouse(elem_de, 2, 2, { type : "contextmenu", button : 2 }, window);
+    onSpellCheck(elem_de, function() {
+      synthesizeMouse(elem_de, 2, 2, { type: "contextmenu", button: 2 }, window);
     });
   });
 });
 
 function handlePopup() {
   var state = script.sendSyncMessage("hidepopup")[0][0];
   is(state, "open", "checking if popup is open");
 
-  onSpellCheck(elem_de, function () {
+  onSpellCheck(elem_de, function() {
     var inlineSpellChecker = editor_de.getInlineSpellChecker(true);
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       currentDictonary = spellchecker.GetCurrentDictionary();
-    } catch(e) {}
+    } catch (e) {}
 
     // Check that the English dictionary is loaded and that the spell check has worked.
     is(currentDictonary, "en-US", "expected en-US");
     is(getMisspelledWords(editor_de), "heute" + "ist" + "ein" + "guter", "some misspelled words expected: heute ist ein guter");
 
     // Remove the fake de_DE dictionary again.
     script.sendSyncMessage("destroy");
 
--- a/editor/spellchecker/tests/test_bug1219928.html
+++ b/editor/spellchecker/tests/test_bug1219928.html
@@ -27,29 +27,29 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 var spellchecker;
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm", window);
 
-  var elem = document.getElementById('en-US');
+  var elem = document.getElementById("en-US");
   elem.focus();
 
-  onSpellCheck(elem, function () {
+  onSpellCheck(elem, function() {
     var Ci = SpecialPowers.Ci;
     var editingSession = SpecialPowers.wrap(window).docShell.editingSession;
     var editor = editingSession.getEditorForWindow(window);
     var selcon = editor.selectionController;
     var sel = selcon.getSelection(selcon.SELECTION_SPELLCHECK);
 
     is(sel.toString(), "missspelled", "one misspelled word expected: missspelled");
 
-    spellchecker = SpecialPowers.Cc['@mozilla.org/editor/editorspellchecker;1']
+    spellchecker = SpecialPowers.Cc["@mozilla.org/editor/editorspellchecker;1"]
                                 .createInstance(Ci.nsIEditorSpellCheck);
     spellchecker.setFilterType(spellchecker.FILTERTYPE_NORMAL);
     spellchecker.InitSpellChecker(editor, false, spellCheckStarted);
   });
 });
 
 function spellCheckStarted() {
   var misspelledWord = spellchecker.GetNextMisspelledWord();
--- a/editor/spellchecker/tests/test_bug1365383.html
+++ b/editor/spellchecker/tests/test_bug1365383.html
@@ -17,30 +17,30 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(() => {
   let textarea = document.getElementById("editor");
   let editor = SpecialPowers.wrap(textarea).editor;
   let spellChecker =
-    SpecialPowers.Cc['@mozilla.org/editor/editorspellchecker;1']
+    SpecialPowers.Cc["@mozilla.org/editor/editorspellchecker;1"]
     .createInstance(SpecialPowers.Ci.nsIEditorSpellCheck);
 
   // Callback parameter isn't set
   spellChecker.InitSpellChecker(editor, false);
 
   textarea.focus();
 
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm")
   .onSpellCheck(textarea, () => {
     // Callback parameter isn't set
     spellChecker.UpdateCurrentDictionary();
 
     var canSpellCheck = spellChecker.canSpellCheck();
-    ok(canSpellCheck, 'spellCheck is enabled');
+    ok(canSpellCheck, "spellCheck is enabled");
     SimpleTest.finish();
   });
 });
 </script>
 </body>
 </html>
--- a/editor/spellchecker/tests/test_bug338427.html
+++ b/editor/spellchecker/tests/test_bug338427.html
@@ -25,29 +25,29 @@ function init() {
         "resource://testing-common/AsyncSpellCheckTestHelper.jsm")
                    .onSpellCheck;
     var textarea = document.getElementById("editor");
     var editor = SpecialPowers.wrap(textarea).editor;
     var spellchecker = editor.getInlineSpellChecker(true);
     spellchecker.enableRealTimeSpell = true;
     textarea.focus();
 
-    onSpellCheck(textarea, function () {
+    onSpellCheck(textarea, function() {
         var list = {}, count = {};
         spellchecker.spellChecker.GetDictionaryList(list, count);
         ok(count.value > 0, "At least one dictionary should be present");
 
         var lang = list.value[0];
         spellchecker.spellChecker.SetCurrentDictionary(lang);
 
-        onSpellCheck(textarea, function () {
+        onSpellCheck(textarea, function() {
             try {
                 var dictionary =
                     spellchecker.spellChecker.GetCurrentDictionary();
-            } catch(e) {}
+            } catch (e) {}
             is(dictionary, lang, "Unexpected spell check dictionary");
 
             // This will clear the content preferences and reset "spellchecker.dictionary".
             spellchecker.spellChecker.SetCurrentDictionary("");
             SimpleTest.finish();
         });
     });
 }
--- a/editor/spellchecker/tests/test_bug678842.html
+++ b/editor/spellchecker/tests/test_bug678842.html
@@ -14,17 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <iframe id="content"></iframe>
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 678842 **/
 SimpleTest.waitForExplicitFinish();
-var content = document.getElementById('content');
+var content = document.getElementById("content");
 // load a subframe containing an editor with a defined unknown lang. At first
 // load, it will set dictionary to en-US. At second load, it will return current
 // dictionary. So, we can check, dictionary is correctly remembered between
 // loads.
 
 var firstLoad = true;
 var script;
 
@@ -50,57 +50,57 @@ var loadListener = function(evt) {
       addMessageListener("en_GB-exists", () => en_GB.exists());
       addMessageListener("destroy", () => hunspell.removeDirectory(en_GB));
     });
     is(script.sendSyncMessage("en_GB-exists")[0][0], true,
        "true expected (en-GB directory should exist)");
   }
 
   var doc = evt.target.contentDocument;
-  var elem = doc.getElementById('textarea');
+  var elem = doc.getElementById("textarea");
   var editor = SpecialPowers.wrap(elem).editor;
   editor.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor.getInlineSpellChecker(true);
 
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm")
-  .onSpellCheck(elem, function () {
+  .onSpellCheck(elem, function() {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var currentDictonary = spellchecker.GetCurrentDictionary();
-    } catch(e) {}
+    } catch (e) {}
 
     if (!currentDictonary) {
-      spellchecker.SetCurrentDictionary('en-US');
+      spellchecker.SetCurrentDictionary("en-US");
     }
 
     if (firstLoad) {
       firstLoad = false;
 
        // First time around, the dictionary defaults to the locale.
-      is (currentDictonary, "en-US", "unexpected lang " + currentDictonary + " instead of en-US");
+      is(currentDictonary, "en-US", "unexpected lang " + currentDictonary + " instead of en-US");
 
       // Select en-GB.
       spellchecker.SetCurrentDictionary("en-GB");
 
-      content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug678842_subframe.html?firstload=false';
+      content.src = "http://mochi.test:8888/tests/editor/spellchecker/tests/bug678842_subframe.html?firstload=false";
     } else {
-      is (currentDictonary, "en-GB", "unexpected lang " + currentDictonary + " instead of en-GB");
-      content.removeEventListener('load', loadListener);
+      is(currentDictonary, "en-GB", "unexpected lang " + currentDictonary + " instead of en-GB");
+      content.removeEventListener("load", loadListener);
 
       // Remove the fake en-GB dictionary again, since it's otherwise picked up by later tests.
       script.sendSyncMessage("destroy");
 
       // This will clear the content preferences and reset "spellchecker.dictionary".
       spellchecker.SetCurrentDictionary("");
       SimpleTest.finish();
     }
   });
-}
+};
 
-content.addEventListener('load', loadListener);
+content.addEventListener("load", loadListener);
 
-content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug678842_subframe.html?firstload=true';
+content.src = "http://mochi.test:8888/tests/editor/spellchecker/tests/bug678842_subframe.html?firstload=true";
 
 </script>
 </pre>
 </body>
 </html>
--- a/editor/spellchecker/tests/test_bug697981.html
+++ b/editor/spellchecker/tests/test_bug697981.html
@@ -53,51 +53,51 @@ SimpleTest.waitForFocus(function() {
     hunspell.addDirectory(de_DE);
 
     addMessageListener("de_DE-exists", () => de_DE.exists());
     addMessageListener("destroy", () => hunspell.removeDirectory(de_DE));
   });
   is(script.sendSyncMessage("de_DE-exists")[0][0], true,
      "true expected (de_DE directory should exist)");
 
-  document.getElementById('de-DE').focus();
+  document.getElementById("de-DE").focus();
 });
 
 function deFocus() {
-  elem_de = document.getElementById('de-DE');
+  elem_de = document.getElementById("de-DE");
   editor_de = SpecialPowers.wrap(elem_de).editor;
   editor_de.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor_de.getInlineSpellChecker(true);
 
-  onSpellCheck(elem_de, function () {
+  onSpellCheck(elem_de, function() {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var currentDictonary = spellchecker.GetCurrentDictionary();
-    } catch(e) {}
+    } catch (e) {}
 
     // Check that the German dictionary is loaded and that the spell check has worked.
     is(currentDictonary, "de-DE", "expected de-DE");
     is(getMisspelledWords(editor_de), "German", "one misspelled word expected: German");
 
     // Now focus the other textarea, which requires English spelling.
-    document.getElementById('en-US').focus();
+    document.getElementById("en-US").focus();
   });
 }
 
 function enFocus() {
-  var elem_en = document.getElementById('en-US');
+  var elem_en = document.getElementById("en-US");
   var editor_en = SpecialPowers.wrap(elem_en).editor;
   editor_en.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor_en.getInlineSpellChecker(true);
 
-  onSpellCheck(elem_en, function () {
+  onSpellCheck(elem_en, function() {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       currentDictonary = spellchecker.GetCurrentDictionary();
-    } catch(e) {}
+    } catch (e) {}
 
     // Check that the English dictionary is loaded and that the spell check has worked.
     is(currentDictonary, "en-US", "expected en-US");
     is(getMisspelledWords(editor_en), "Nogoodword", "one misspelled word expected: Nogoodword");
 
     // So far all was boring. The important thing is whether the spell check result
     // in the de-DE editor is still the same. After losing focus, no spell check
     // updates should take place there.
@@ -107,21 +107,21 @@ function enFocus() {
     script.sendSyncMessage("destroy");
 
     // Focus again, so the spelling gets updated, but before we need to kill the focus handler.
     elem_de.onfocus = null;
     elem_de.blur();
     elem_de.focus();
 
     // After removal, the de_DE editor should refresh the spelling with en-US.
-    onSpellCheck(elem_de, function () {
+    onSpellCheck(elem_de, function() {
       spellchecker = inlineSpellChecker.spellChecker;
       try {
         currentDictonary = spellchecker.GetCurrentDictionary();
-      } catch(e) {}
+      } catch (e) {}
 
       // Check that the default English dictionary is loaded and that the spell check has worked.
       is(currentDictonary, "en-US", "expected en-US");
       is(getMisspelledWords(editor_de), "heute" + "ist" + "ein" + "guter",
          "some misspelled words expected: heute ist ein guter");
 
       SimpleTest.finish();
     });
--- a/editor/spellchecker/tests/test_bug717433.html
+++ b/editor/spellchecker/tests/test_bug717433.html
@@ -14,17 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <iframe id="content"></iframe>
 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 717433 **/
 SimpleTest.waitForExplicitFinish();
-var content = document.getElementById('content');
+var content = document.getElementById("content");
 // Load a subframe containing an editor with language "en". At first
 // load, it will set the dictionary to en-GB or en-US. We set the other one.
 // At second load, it will return the current dictionary. We can check that the
 // dictionary is correctly remembered between loads.
 
 var firstLoad = true;
 var expected = "";
 var script;
@@ -52,57 +52,57 @@ var loadListener = function(evt) {
       addMessageListener("en_GB-exists", () => en_GB.exists());
       addMessageListener("destroy", () => hunspell.removeDirectory(en_GB));
     });
     is(script.sendSyncMessage("en_GB-exists")[0][0], true,
        "true expected (en-GB directory should exist)");
   }
 
   var doc = evt.target.contentDocument;
-  var elem = doc.getElementById('textarea');
+  var elem = doc.getElementById("textarea");
   var editor = SpecialPowers.wrap(elem).editor;
   editor.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor.getInlineSpellChecker(true);
 
   SpecialPowers.Cu.import(
     "resource://testing-common/AsyncSpellCheckTestHelper.jsm")
-  .onSpellCheck(elem, function () {
+  .onSpellCheck(elem, function() {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var currentDictonary = spellchecker.GetCurrentDictionary();
-    } catch(e) {}
+    } catch (e) {}
 
     if (firstLoad) {
       firstLoad = false;
 
       // First time around, we get a random dictionary based on the language "en".
       if (currentDictonary == "en-GB") {
         spellchecker.SetCurrentDictionary("en-US");
         expected = "en-US";
       } else if (currentDictonary == "en-US") {
         spellchecker.SetCurrentDictionary("en-GB");
         expected = "en-GB";
       } else {
         is(true, false, "Neither en-US nor en-GB are current");
       }
-      content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug717433_subframe.html?firstload=false';
+      content.src = "http://mochi.test:8888/tests/editor/spellchecker/tests/bug717433_subframe.html?firstload=false";
     } else {
       is(currentDictonary, expected, expected + " expected");
-      content.removeEventListener('load', loadListener);
+      content.removeEventListener("load", loadListener);
 
       // Remove the fake en-GB dictionary again, since it's otherwise picked up by later tests.
       script.sendSyncMessage("destroy");
 
       // This will clear the content preferences and reset "spellchecker.dictionary".
       spellchecker.SetCurrentDictionary("");
       SimpleTest.finish();
     }
   });
-}
+};
 
-content.addEventListener('load', loadListener);
+content.addEventListener("load", loadListener);
 
-content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug717433_subframe.html?firstload=true';
+content.src = "http://mochi.test:8888/tests/editor/spellchecker/tests/bug717433_subframe.html?firstload=true";
 
 </script>
 </pre>
 </body>
 </html>