Backed out 23 changesets (bug 1269209) for various test failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Thu, 27 Oct 2016 11:48:56 -0700
changeset 319802 4bf929bdbc4f7bb4a619c41aa849df6a7204e16b
parent 319801 a87bd4b96744c8db0fc14ae18acfea09a81705c4
child 319803 7f3a92667acf1dbed3f12941e01607e8230b29d8
push id20748
push userphilringnalda@gmail.com
push dateFri, 28 Oct 2016 03:39:55 +0000
treeherderfx-team@715360440695 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1269209
milestone52.0a1
backs out0e23de3de2ed1106cf686c69ce6059dbc89bae3e
eac4a21c91f39f3bd73be505c5b7aace882144b6
faf627174b48447a081e2c028361f509c81d08fe
e77b8468e140c8e1216fa50f822804362a2e815e
d6701dc311d006e875e7147a9180c5da829e8c2a
1b9719af21a2109701967b51689462c7e605eac6
dc9d739edd0ff7b694c2bb98da9b0ffb2fcdea9d
bc025cccc7fbf04d5216c87d0e4864f88eeacc67
016b31e0631f29a0a22ed8c6f3bc627a6dc973df
b74022c44df0a6354b479454d6710ba9acfc6084
a3d0e9ed7d8565655fa6894f8b315c30decd19e8
ecf28a55600faef6f2b2451692f05aa82309bd9d
cea0421beffa3dde557dfd1edc1a780e7a0fbd92
104c0aa107474ba9058625f793f78c73e5ccf062
5f63100d5531dd4ce5d53bc1f0afac0957cff670
2ebb8eab38341fad5e3ca3ad00ffefc3aada26a9
dda3cfcd2b5c96bc42b9ca481f21d0fa8fea63a7
19eb42e6b3eb8db48f6c81bdf95c30d1c9125592
56e0713ad54b558b96ef8e4832cef9df3c283725
5d2f4867ec7fd3a9ee330f5952cf9e95e7f5ebe9
c7d8d25e09b66c418d8fe1fbfdf3a95c403536aa
816ee7cab76bbbbdc925b03380d2ec8fff6e35e8
e71532f2babd75e8b92f39a10a59bd665b26af82
Backed out 23 changesets (bug 1269209) for various test failures a=backout Backed out changeset 0e23de3de2ed (bug 1269209) Backed out changeset eac4a21c91f3 (bug 1269209) Backed out changeset faf627174b48 (bug 1269209) Backed out changeset e77b8468e140 (bug 1269209) Backed out changeset d6701dc311d0 (bug 1269209) Backed out changeset 1b9719af21a2 (bug 1269209) Backed out changeset dc9d739edd0f (bug 1269209) Backed out changeset bc025cccc7fb (bug 1269209) Backed out changeset 016b31e0631f (bug 1269209) Backed out changeset b74022c44df0 (bug 1269209) Backed out changeset a3d0e9ed7d85 (bug 1269209) Backed out changeset ecf28a55600f (bug 1269209) Backed out changeset cea0421beffa (bug 1269209) Backed out changeset 104c0aa10747 (bug 1269209) Backed out changeset 5f63100d5531 (bug 1269209) Backed out changeset 2ebb8eab3834 (bug 1269209) Backed out changeset dda3cfcd2b5c (bug 1269209) Backed out changeset 19eb42e6b3eb (bug 1269209) Backed out changeset 56e0713ad54b (bug 1269209) Backed out changeset 5d2f4867ec7f (bug 1269209) Backed out changeset c7d8d25e09b6 (bug 1269209) Backed out changeset 816ee7cab76b (bug 1269209) Backed out changeset e71532f2babd (bug 1269209)
editor/composer/test/chrome.ini
editor/composer/test/mochitest.ini
editor/composer/test/test_async_UpdateCurrentDictionary.html
editor/composer/test/test_bug1200533.html
editor/composer/test/test_bug1204147.html
editor/composer/test/test_bug1205983.html
editor/composer/test/test_bug338427.html
editor/composer/test/test_bug678842.html
editor/composer/test/test_bug697981.html
editor/composer/test/test_bug717433.html
editor/libeditor/tests/chrome.ini
editor/libeditor/tests/mochitest.ini
editor/libeditor/tests/test_bug1053048.html
editor/libeditor/tests/test_bug1100966.html
editor/libeditor/tests/test_bug1140105.html
editor/libeditor/tests/test_bug1154791.html
editor/libeditor/tests/test_bug1250010.html
editor/libeditor/tests/test_bug1257363.html
editor/libeditor/tests/test_bug366682.html
editor/libeditor/tests/test_bug46555.html
editor/libeditor/tests/test_bug471319.html
editor/libeditor/tests/test_bug483651.html
editor/libeditor/tests/test_bug635636.html
editor/libeditor/tests/test_bug830600.html
editor/libeditor/tests/test_selection_move_commands.xul
--- a/editor/composer/test/chrome.ini
+++ b/editor/composer/test/chrome.ini
@@ -1,7 +1,15 @@
 [DEFAULT]
 skip-if = buildapp == 'b2g' || os == 'android'
 
+[test_async_UpdateCurrentDictionary.html]
+[test_bug338427.html]
 [test_bug434998.xul]
+[test_bug678842.html]
+[test_bug697981.html]
+[test_bug717433.html]
+[test_bug1204147.html]
+[test_bug1200533.html]
+[test_bug1205983.html]
 [test_bug1209414.html]
 [test_bug1219928.html]
 [test_bug1266815.html]
--- a/editor/composer/test/mochitest.ini
+++ b/editor/composer/test/mochitest.ini
@@ -8,22 +8,14 @@ support-files =
   bug1204147_subframe2.html
   en-GB/en_GB.dic
   en-GB/en_GB.aff
   en-AU/en_AU.dic
   en-AU/en_AU.aff
   de-DE/de_DE.dic
   de-DE/de_DE.aff
 
-[test_async_UpdateCurrentDictionary.html]
-[test_bug338427.html]
 [test_bug348497.html]
 [test_bug384147.html]
 [test_bug389350.html]
 skip-if = toolkit == 'android'
 [test_bug519928.html]
-[test_bug678842.html]
-[test_bug697981.html]
-[test_bug717433.html]
 [test_bug738440.html]
-[test_bug1200533.html]
-[test_bug1204147.html]
-[test_bug1205983.html]
--- a/editor/composer/test/test_async_UpdateCurrentDictionary.html
+++ b/editor/composer/test/test_async_UpdateCurrentDictionary.html
@@ -1,37 +1,37 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=856270
 -->
 <head>
   <title>Test for Bug 856270 - Async UpdateCurrentDictionary</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=856270">Mozilla Bug 856270</a>
 <p id="display"></p>
 <div id="content">
 <textarea id="editor" spellcheck="true"></textarea>
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript;version=1.8">
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(start);
 
 function start() {
+  Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
   var textarea = document.getElementById("editor");
   textarea.focus();
 
-  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
-  .onSpellCheck(textarea, function () {
-    var isc = SpecialPowers.wrap(textarea).editor.getInlineSpellChecker(false);
+  onSpellCheck(textarea, function () {
+    var isc = 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";
--- a/editor/composer/test/test_bug1200533.html
+++ b/editor/composer/test/test_bug1200533.html
@@ -1,17 +1,17 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1200533
 -->
 <head>
   <title>Test for Bug 1200533</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1200533">Mozilla Bug 1200533</a>
 <p id="display"></p>
 <iframe id="content"></iframe>
 
 </div>
 <pre id="test">
@@ -43,71 +43,61 @@ var tests = [
     // Result: Random en-*.
     [ "en-ZA-not-avail", "de-DE", "*" ],
     [ "en-generic",      "de-DE", "*" ],
     // Result: Preference value.
     [ "ko-not-avail",    "de-DE", "de-DE" ],
   ];
 
 var loadCount = 0;
-var script;
+var en_GB;
+var en_AU;
+var en_DE;
+var hunspell;
 
 var loadListener = function(evt) {
+  Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
+  Components.utils.import("resource://gre/modules/Services.jsm");
+
   if (loadCount == 0) {
-    script = SpecialPowers.loadChromeScript(function() {
-      var dir = Components.classes["@mozilla.org/file/directory_service;1"]
-                          .getService(Components.interfaces.nsIProperties)
-                          .get("CurWorkD", Components.interfaces.nsIFile);
-      dir.append("tests");
-      dir.append("editor");
-      dir.append("composer");
-      dir.append("test");
-
-      var hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
-                               .getService(Components.interfaces.mozISpellCheckingEngine);
+    var dir = Components.classes["@mozilla.org/file/directory_service;1"]
+                        .getService(Components.interfaces.nsIProperties)
+                        .get("CurWorkD", Components.interfaces.nsIFile);
+    dir.append("tests");
+    dir.append("editor");
+    dir.append("composer");
+    dir.append("test");
 
-      // Install en-GB, en-AU and de-DE dictionaries.
-      var en_GB = dir.clone();
-      var en_AU = dir.clone();
-      var de_DE = dir.clone();
-      en_GB.append("en-GB");
-      en_AU.append("en-AU");
-      de_DE.append("de-DE");
-      hunspell.addDirectory(en_GB);
-      hunspell.addDirectory(en_AU);
-      hunspell.addDirectory(de_DE);
+    hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
+                         .getService(Components.interfaces.mozISpellCheckingEngine);
 
-      addMessageListener("check-existence",
-                         () => [en_GB.exists(), en_AU.exists(),
-                                de_DE.exists()]);
-      addMessageListener("destroy", () => {
-        hunspell.removeDirectory(en_GB);
-        hunspell.removeDirectory(en_AU);
-        hunspell.removeDirectory(de_DE);
-      });
-    });
-    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)");
+    // Install en-GB, en-AU and de-DE dictionaries.
+    en_GB = dir.clone();
+    en_AU = dir.clone();
+    de_DE = dir.clone();
+    en_GB.append("en-GB");
+    en_AU.append("en-AU");
+    de_DE.append("de-DE");
+    is(en_GB.exists(), true, "true expected (en-GB directory should exist)");
+    is(en_AU.exists(), true, "true expected (en-AU directory should exist)");
+    is(de_DE.exists(), true, "true expected (de-DE directory should exist)");
+    hunspell.addDirectory(en_GB);
+    hunspell.addDirectory(en_AU);
+    hunspell.addDirectory(de_DE);
   }
 
-  SpecialPowers.pushPrefEnv({set: [["spellchecker.dictionary", tests[loadCount][1]]]},
-                            function() { continueTest(evt) });
-}
+  Services.prefs.setCharPref("spellchecker.dictionary", tests[loadCount][1]);
 
-function continueTest(evt) {
   var doc = evt.target.contentDocument;
   var elem = doc.getElementById(tests[loadCount][0]);
-  var editor = SpecialPowers.wrap(elem).QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement).editor;
+  var editor = elem.QueryInterface(Components.interfaces.nsIDOMNSEditableElement).editor;
   editor.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor.getInlineSpellChecker(true);
 
-  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
-  .onSpellCheck(elem, function () {
+  onSpellCheck(elem, function () {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var dict = spellchecker.GetCurrentDictionary();
     } catch(e) {}
 
     if (tests[loadCount][2] != "*") {
       is (dict, tests[loadCount][2], "expected " + tests[loadCount][2]);
     } else {
@@ -116,17 +106,22 @@ function continueTest(evt) {
     }
 
     loadCount++;
     if (loadCount < tests.length) {
       // Load the iframe again.
       content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug1200533_subframe.html?firstload=false';
     } else {
       // Remove the fake  dictionaries again, since it's otherwise picked up by later tests.
-      script.sendSyncMessage("destroy");
+      hunspell.removeDirectory(en_GB);
+      hunspell.removeDirectory(en_AU);
+      hunspell.removeDirectory(de_DE);
+
+      // Reset the preference, so the last value we set doesn't collide with the next test.
+      Services.prefs.setCharPref("spellchecker.dictionary", "");
 
       SimpleTest.finish();
     }
   });
 
 }
 
 content.addEventListener('load', loadListener, false);
--- a/editor/composer/test/test_bug1204147.html
+++ b/editor/composer/test/test_bug1204147.html
@@ -1,17 +1,17 @@
 <!DOCTYPE html>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1204147
 -->
 <head>
   <title>Test for Bug 1204147</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1204147">Mozilla Bug 1204147</a>
 <p id="display"></p>
 <iframe id="content"></iframe>
 </div>
 
 <pre id="test">
@@ -22,58 +22,54 @@ SimpleTest.waitForExplicitFinish();
 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;
+var en_GB;
+var hunspell;
 
 var loadListener = function(evt) {
-  if (firstLoad) {
-    script = SpecialPowers.loadChromeScript(function() {
-      var dir = Components.classes["@mozilla.org/file/directory_service;1"]
-                          .getService(Components.interfaces.nsIProperties)
-                          .get("CurWorkD", Components.interfaces.nsIFile);
-      dir.append("tests");
-      dir.append("editor");
-      dir.append("composer");
-      dir.append("test");
+  Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
 
-      var hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
-                               .getService(Components.interfaces.mozISpellCheckingEngine);
+  if (firstLoad) {
+    var dir = Components.classes["@mozilla.org/file/directory_service;1"]
+                        .getService(Components.interfaces.nsIProperties)
+                        .get("CurWorkD", Components.interfaces.nsIFile);
+    dir.append("tests");
+    dir.append("editor");
+    dir.append("composer");
+    dir.append("test");
 
-      // Install en-GB dictionary.
-      en_GB = dir.clone();
-      en_GB.append("en-GB");
-      hunspell.addDirectory(en_GB);
+    hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
+                         .getService(Components.interfaces.mozISpellCheckingEngine);
 
-      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)");
+    // Install en-GB dictionary.
+    en_GB = dir.clone();
+    en_GB.append("en-GB");
+    is(en_GB.exists(), true, "true expected (en-GB directory should exist)");
+    hunspell.addDirectory(en_GB);
   }
 
   var doc = evt.target.contentDocument;
   var elem;
   if (firstLoad) {
     elem = doc.getElementById('en-GB');
   } else {
     elem = doc.getElementById('en-US');
   }
 
-  var editor = SpecialPowers.wrap(elem).QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement).editor;
+  var editor = elem.QueryInterface(Components.interfaces.nsIDOMNSEditableElement).editor;
   editor.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor.getInlineSpellChecker(true);
 
-  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
-  .onSpellCheck(elem, function () {
+  onSpellCheck(elem, function () {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var currentDictonary = spellchecker.GetCurrentDictionary();
     } catch(e) {}
 
     if (firstLoad) {
       firstLoad = false;
 
@@ -89,17 +85,17 @@ var loadListener = function(evt) {
       content.src = 'http://mochi.test:8888/tests/editor/composer/test/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, false);
 
       // Remove the fake en-GB dictionary again, since it's otherwise picked up by later tests.
-      script.sendSyncMessage("destroy");
+      hunspell.removeDirectory(en_GB);
 
       // Reset the preference, so the last value we set doesn't collide with the next test.
       SimpleTest.finish();
     }
   });
 }
 
 content.addEventListener('load', loadListener, false);
--- a/editor/composer/test/test_bug1205983.html
+++ b/editor/composer/test/test_bug1205983.html
@@ -1,137 +1,126 @@
-<!DOCTYPE html>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1205983
--->
-<head>
-  <title>Test for Bug 1205983</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1205983">Mozilla Bug 1205983</a>
-<p id="display"></p>
-</div>
-
-<div contenteditable id="de-DE" lang="de-DE" onfocus="deFocus()">German heute ist ein guter Tag</div>
-<textarea id="en-US" lang="en-US" onfocus="enFocus()">Nogoodword today is a nice day</textarea>
-
-<pre id="test">
-<script class="testbody" type="text/javascript">
-
-function getMisspelledWords(editor) {
-  return editor.selectionController.getSelection(SpecialPowers.Ci.nsISelectionController.SELECTION_SPELLCHECK).toString();
-}
-
-var elem_de;
-var editor_de;
-var selcon_de;
-var script;
-
-var onSpellCheck =
-  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
-               .onSpellCheck;
-
-/** Test for Bug 1205983 **/
-SimpleTest.waitForExplicitFinish();
-SimpleTest.waitForFocus(function() {
-  script = SpecialPowers.loadChromeScript(function() {
-    var dir = Components.classes["@mozilla.org/file/directory_service;1"]
-                        .getService(Components.interfaces.nsIProperties)
-                        .get("CurWorkD", Components.interfaces.nsIFile);
-    dir.append("tests");
-    dir.append("editor");
-    dir.append("composer");
-    dir.append("test");
-
-    var hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
-                             .getService(Components.interfaces.mozISpellCheckingEngine);
-
-    // Install de-DE dictionary.
-    var de_DE = dir.clone();
-    de_DE.append("de-DE");
-    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();
-});
-
-function deFocus() {
-  elem_de = document.getElementById('de-DE');
-
-  onSpellCheck(elem_de, function () {
-    var Ci = SpecialPowers.Ci;
-    var editingSession = SpecialPowers.wrap(window)
-                               .QueryInterface(Ci.nsIInterfaceRequestor)
-                               .getInterface(Ci.nsIWebNavigation)
-                               .QueryInterface(Ci.nsIInterfaceRequestor)
-                               .getInterface(Ci.nsIEditingSession);
-    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();
-  });
-}
-
-function enFocus() {
-  var elem_en = document.getElementById('en-US');
-  var editor_en =
-    SpecialPowers.wrap(elem_en)
-                 .QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement)
-                 .editor;
-  editor_en.setSpellcheckUserOverride(true);
-  var inlineSpellChecker = editor_en.getInlineSpellChecker(true);
-
-  onSpellCheck(elem_en, function () {
-    var spellchecker = inlineSpellChecker.spellChecker;
-    try {
-      currentDictonary = spellchecker.GetCurrentDictionary();
-    } 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.
-    var sel = selcon_de.getSelection(selcon_de.SELECTION_SPELLCHECK);
-    is(sel.toString(), "German", "one misspelled word expected: German");
-
-    // Remove the fake de_DE dictionary again.
-    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 () {
-      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;
-
-      SimpleTest.finish();
-    });
-  });
-}
-
-</script>
-</pre>
-</body>
-</html>
+<!DOCTYPE html>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1205983
+-->
+<head>
+  <title>Test for Bug 1205983</title>
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1205983">Mozilla Bug 1205983</a>
+<p id="display"></p>
+</div>
+
+<div contenteditable id="de-DE" lang="de-DE" onfocus="deFocus()">German heute ist ein guter Tag</div>
+<textarea id="en-US" lang="en-US" onfocus="enFocus()">Nogoodword today is a nice day</textarea>
+
+<pre id="test">
+<script class="testbody" type="text/javascript">
+
+function getMisspelledWords(editor) {
+  return editor.selectionController.getSelection(Components.interfaces.nsISelectionController.SELECTION_SPELLCHECK).toString();
+}
+
+var elem_de;
+var editor_de;
+var selcon_de;
+var de_DE;
+var hunspell;
+
+/** Test for Bug 1205983 **/
+SimpleTest.waitForExplicitFinish();
+SimpleTest.waitForFocus(function() {
+  Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
+
+  var dir = Components.classes["@mozilla.org/file/directory_service;1"]
+                      .getService(Components.interfaces.nsIProperties)
+                      .get("CurWorkD", Components.interfaces.nsIFile);
+  dir.append("tests");
+  dir.append("editor");
+  dir.append("composer");
+  dir.append("test");
+
+  hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
+                       .getService(Components.interfaces.mozISpellCheckingEngine);
+
+  // Install de-DE dictionary.
+  de_DE = dir.clone();
+  de_DE.append("de-DE");
+  is(de_DE.exists(), true, "true expected (de_DE directory should exist)");
+  hunspell.addDirectory(de_DE);
+
+  document.getElementById('de-DE').focus();
+});
+
+function deFocus() {
+  elem_de = document.getElementById('de-DE');
+
+  onSpellCheck(elem_de, function () {
+    var Ci = Components.interfaces;
+    var editingSession = window.QueryInterface(Ci.nsIInterfaceRequestor)
+                               .getInterface(Ci.nsIWebNavigation)
+                               .QueryInterface(Ci.nsIInterfaceRequestor)
+                               .getInterface(Ci.nsIEditingSession);
+    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();
+  });
+}
+
+function enFocus() {
+  var elem_en = document.getElementById('en-US');
+  var editor_en = elem_en.QueryInterface(Components.interfaces.nsIDOMNSEditableElement).editor;
+  editor_en.setSpellcheckUserOverride(true);
+  var inlineSpellChecker = editor_en.getInlineSpellChecker(true);
+
+  onSpellCheck(elem_en, function () {
+    var spellchecker = inlineSpellChecker.spellChecker;
+    try {
+      currentDictonary = spellchecker.GetCurrentDictionary();
+    } 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.
+    var sel = selcon_de.getSelection(selcon_de.SELECTION_SPELLCHECK);
+    is(sel.toString(), "German", "one misspelled word expected: German");
+
+    // Remove the fake de_DE dictionary again.
+    hunspell.removeDirectory(de_DE);
+
+    // 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 () {
+      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;
+
+      SimpleTest.finish();
+    });
+  });
+}
+
+</script>
+</pre>
+</body>
+</html>
--- a/editor/composer/test/test_bug338427.html
+++ b/editor/composer/test/test_bug338427.html
@@ -1,35 +1,34 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=338427
 -->
 <head>
   <title>Test for Bug 338427</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=338427">Mozilla Bug 338427</a>
 <p id="display"></p>
 <div id="content">
 <textarea id="editor" lang="testing-XX" spellcheck="true"></textarea>
 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 338427 **/
 function init() {
-    var onSpellCheck =
-      SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
-                   .onSpellCheck;
+    Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
+
     var textarea = document.getElementById("editor");
-    var editor = SpecialPowers.wrap(textarea).editor;
+    var editor = textarea.editor;
     var spellchecker = editor.getInlineSpellChecker(true);
     spellchecker.enableRealTimeSpell = true;
     textarea.focus();
 
     onSpellCheck(textarea, function () {
         var list = {}, count = {};
         spellchecker.spellChecker.GetDictionaryList(list, count);
         ok(count.value > 0, "At least one dictionary should be present");
--- a/editor/composer/test/test_bug678842.html
+++ b/editor/composer/test/test_bug678842.html
@@ -1,17 +1,17 @@
 <!DOCTYPE html>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=678842
 -->
 <head>
   <title>Test for Bug 678842</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=678842">Mozilla Bug 678842</a>
 <p id="display"></p>
 <iframe id="content"></iframe>
   
 </div>
 <pre id="test">
@@ -21,52 +21,49 @@ https://bugzilla.mozilla.org/show_bug.cg
 SimpleTest.waitForExplicitFinish();
 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;
+var en_GB;
+var hunspell;
 
 var loadListener = function(evt) {
-  if (firstLoad) {
-    script = SpecialPowers.loadChromeScript(function() {
-      var dir = Components.classes["@mozilla.org/file/directory_service;1"]
-                          .getService(Components.interfaces.nsIProperties)
-                          .get("CurWorkD", Components.interfaces.nsIFile);
-      dir.append("tests");
-      dir.append("editor");
-      dir.append("composer");
-      dir.append("test");
+  Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
+  Components.utils.import("resource://gre/modules/Services.jsm");
 
-      var hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
-                               .getService(Components.interfaces.mozISpellCheckingEngine);
+  if (firstLoad) {
+    var dir = Components.classes["@mozilla.org/file/directory_service;1"]
+                        .getService(Components.interfaces.nsIProperties)
+                        .get("CurWorkD", Components.interfaces.nsIFile);
+    dir.append("tests");
+    dir.append("editor");
+    dir.append("composer");
+    dir.append("test");
 
-      // Install en-GB dictionary.
-      en_GB = dir.clone();
-      en_GB.append("en-GB");
-      hunspell.addDirectory(en_GB);
+    hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
+                         .getService(Components.interfaces.mozISpellCheckingEngine);
 
-      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)");
+    // Install en-GB dictionary.
+    en_GB = dir.clone();
+    en_GB.append("en-GB");
+    is(en_GB.exists(), true, "true expected (en-GB directory should exist)");
+    hunspell.addDirectory(en_GB);
   }
 
   var doc = evt.target.contentDocument;
   var elem = doc.getElementById('textarea');
-  var editor = SpecialPowers.wrap(elem).QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement).editor;
+  var editor = elem.QueryInterface(Components.interfaces.nsIDOMNSEditableElement).editor;
   editor.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor.getInlineSpellChecker(true);
 
-  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
-  .onSpellCheck(elem, function () {
+  onSpellCheck(elem, function () {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var currentDictonary = spellchecker.GetCurrentDictionary();
     } catch(e) {}
 
     if (!currentDictonary) {
       spellchecker.SetCurrentDictionary('en-US');
     }
@@ -81,17 +78,17 @@ var loadListener = function(evt) {
       spellchecker.SetCurrentDictionary("en-GB");
 
       content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug678842_subframe.html?firstload=false';
     } else {
       is (currentDictonary, "en-GB", "unexpected lang " + currentDictonary + " instead of en-GB");
       content.removeEventListener('load', loadListener, false);
 
       // Remove the fake en-GB dictionary again, since it's otherwise picked up by later tests.
-      script.sendSyncMessage("destroy");
+      hunspell.removeDirectory(en_GB);
 
       // This will clear the content preferences and reset "spellchecker.dictionary".
       spellchecker.SetCurrentDictionary("");
       SimpleTest.finish();
     }
   });
 }
 
--- a/editor/composer/test/test_bug697981.html
+++ b/editor/composer/test/test_bug697981.html
@@ -1,73 +1,66 @@
 <!DOCTYPE html>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=697981
 -->
 <head>
   <title>Test for Bug 697981</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=697981">Mozilla Bug 697981</a>
 <p id="display"></p>
 </div>
 
 <textarea id="de-DE" lang="de-DE" onfocus="deFocus()">German heute ist ein guter Tag</textarea>
 <textarea id="en-US" lang="en-US" onfocus="enFocus()">Nogoodword today is a nice day</textarea>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 function getMisspelledWords(editor) {
-  return editor.selectionController.getSelection(SpecialPowers.Ci.nsISelectionController.SELECTION_SPELLCHECK).toString();
+  return editor.selectionController.getSelection(Components.interfaces.nsISelectionController.SELECTION_SPELLCHECK).toString();
 }
 
 var elem_de;
 var editor_de;
-var script;
-
-var onSpellCheck =
-  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
-               .onSpellCheck;
+var de_DE;
+var hunspell;
 
 /** Test for Bug 697981 **/
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
-  script = SpecialPowers.loadChromeScript(function() {
-    var dir = Components.classes["@mozilla.org/file/directory_service;1"]
-                        .getService(Components.interfaces.nsIProperties)
-                        .get("CurWorkD", Components.interfaces.nsIFile);
-    dir.append("tests");
-    dir.append("editor");
-    dir.append("composer");
-    dir.append("test");
+  Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
 
-    var hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
-                             .getService(Components.interfaces.mozISpellCheckingEngine);
+  var dir = Components.classes["@mozilla.org/file/directory_service;1"]
+                      .getService(Components.interfaces.nsIProperties)
+                      .get("CurWorkD", Components.interfaces.nsIFile);
+  dir.append("tests");
+  dir.append("editor");
+  dir.append("composer");
+  dir.append("test");
 
-    // Install de-DE dictionary.
-    var de_DE = dir.clone();
-    de_DE.append("de-DE");
-    hunspell.addDirectory(de_DE);
+  hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
+                       .getService(Components.interfaces.mozISpellCheckingEngine);
 
-    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)");
+  // Install de-DE dictionary.
+  de_DE = dir.clone();
+  de_DE.append("de-DE");
+  is(de_DE.exists(), true, "true expected (de_DE directory should exist)");
+  hunspell.addDirectory(de_DE);
 
   document.getElementById('de-DE').focus();
 });
 
 function deFocus() {
   elem_de = document.getElementById('de-DE');
-  editor_de = SpecialPowers.wrap(elem_de).QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement).editor;
+  editor_de = elem_de.QueryInterface(Components.interfaces.nsIDOMNSEditableElement).editor;
   editor_de.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor_de.getInlineSpellChecker(true);
 
   onSpellCheck(elem_de, function () {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var currentDictonary = spellchecker.GetCurrentDictionary();
     } catch(e) {}
@@ -78,17 +71,17 @@ function deFocus() {
 
     // Now focus the other textarea, which requires English spelling.
     document.getElementById('en-US').focus();
   });
 }
 
 function enFocus() {
   var elem_en = document.getElementById('en-US');
-  var editor_en = SpecialPowers.wrap(elem_en).QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement).editor;
+  var editor_en = elem_en.QueryInterface(Components.interfaces.nsIDOMNSEditableElement).editor;
   editor_en.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor_en.getInlineSpellChecker(true);
 
   onSpellCheck(elem_en, function () {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       currentDictonary = spellchecker.GetCurrentDictionary();
     } catch(e) {}
@@ -98,17 +91,17 @@ function enFocus() {
     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.
     is(getMisspelledWords(editor_de), "German", "one misspelled word expected: German");
 
     // Remove the fake de_DE dictionary again.
-    script.sendSyncMessage("destroy");
+    hunspell.removeDirectory(de_DE);
 
     // 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 () {
--- a/editor/composer/test/test_bug717433.html
+++ b/editor/composer/test/test_bug717433.html
@@ -1,17 +1,17 @@
 <!DOCTYPE html>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=717433
 -->
 <head>
   <title>Test for Bug 717433</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=717433">Mozilla Bug 717433</a>
 <p id="display"></p>
 <iframe id="content"></iframe>
 
 </div>
 <pre id="test">
@@ -22,53 +22,48 @@ SimpleTest.waitForExplicitFinish();
 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;
+var en_GB;
+var hunspell;
 
 var loadListener = function(evt) {
+  Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
 
   if (firstLoad) {
-    script = SpecialPowers.loadChromeScript(function() {
-      var dir = Components.classes["@mozilla.org/file/directory_service;1"]
-                          .getService(Components.interfaces.nsIProperties)
-                          .get("CurWorkD", Components.interfaces.nsIFile);
-      dir.append("tests");
-      dir.append("editor");
-      dir.append("composer");
-      dir.append("test");
+    var dir = Components.classes["@mozilla.org/file/directory_service;1"]
+                        .getService(Components.interfaces.nsIProperties)
+                        .get("CurWorkD", Components.interfaces.nsIFile);
+    dir.append("tests");
+    dir.append("editor");
+    dir.append("composer");
+    dir.append("test");
 
-      var hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
-                               .getService(Components.interfaces.mozISpellCheckingEngine);
+    hunspell = Components.classes["@mozilla.org/spellchecker/engine;1"]
+                         .getService(Components.interfaces.mozISpellCheckingEngine);
 
-      // Install en-GB dictionary.
-      var en_GB = dir.clone();
-      en_GB.append("en-GB");
-      hunspell.addDirectory(en_GB);
-
-      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)");
+    // Install en-GB dictionary.
+    en_GB = dir.clone();
+    en_GB.append("en-GB");
+    is(en_GB.exists(), true, "true expected (en-GB directory should exist)");
+    hunspell.addDirectory(en_GB);
   }
 
   var doc = evt.target.contentDocument;
   var elem = doc.getElementById('textarea');
-  var editor = SpecialPowers.wrap(elem).QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement).editor;
+  var editor = elem.QueryInterface(Components.interfaces.nsIDOMNSEditableElement).editor;
   editor.setSpellcheckUserOverride(true);
   var inlineSpellChecker = editor.getInlineSpellChecker(true);
 
-  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
-  .onSpellCheck(elem, function () {
+  onSpellCheck(elem, function () {
     var spellchecker = inlineSpellChecker.spellChecker;
     try {
       var currentDictonary = spellchecker.GetCurrentDictionary();
     } catch(e) {}
 
     if (firstLoad) {
       firstLoad = false;
 
@@ -83,17 +78,17 @@ var loadListener = function(evt) {
         is(true, false, "Neither en-US nor en-GB are current");
       }
       content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug717433_subframe.html?firstload=false';
     } else {
       is(currentDictonary, expected, expected + " expected");
       content.removeEventListener('load', loadListener, false);
 
       // Remove the fake en-GB dictionary again, since it's otherwise picked up by later tests.
-      script.sendSyncMessage("destroy");
+      hunspell.removeDirectory(en_GB);
 
       // This will clear the content preferences and reset "spellchecker.dictionary".
       spellchecker.SetCurrentDictionary("");
       SimpleTest.finish();
     }
   });
 }
 
--- a/editor/libeditor/tests/chrome.ini
+++ b/editor/libeditor/tests/chrome.ini
@@ -1,32 +1,46 @@
 [DEFAULT]
 skip-if = buildapp == 'b2g' || os == 'android'
 support-files = green.png
 
+[test_bug46555.html]
+[test_bug366682.html]
+support-files = spellcheck.js
+[test_bug471319.html]
+[test_bug483651.html]
 [test_bug489202.xul]
 [test_bug490879.xul]
 subsuite = clipboard
 [test_bug569988.html]
 skip-if = buildapp == 'mulet'
 [test_bug599983.xul]
 skip-if = buildapp == 'mulet'
 [test_bug607584.xul]
 [test_bug616590.xul]
+[test_bug635636.html]
 [test_bug636465.xul]
 [test_bug646194.xul]
 [test_bug780908.xul]
+[test_bug830600.html]
+subsuite = clipboard
+[test_bug1053048.html]
+[test_bug1100966.html]
+[test_bug1102906.html]
 [test_bug1101392.html]
 subsuite = clipboard
-[test_bug1102906.html]
+[test_bug1140105.html]
 [test_bug1140617.xul]
 subsuite = clipboard
 [test_bug1153237.html]
+[test_bug1154791.html]
 [test_bug1248128.html]
 [test_bug1248185.html]
+[test_bug1250010.html]
+[test_bug1257363.html]
 [test_composition_event_created_in_chrome.html]
 [test_contenteditable_text_input_handling.html]
 [test_dragdrop.html]
 skip-if = buildapp == 'mulet'
 [test_htmleditor_keyevent_handling.html]
 [test_selection_move_commands.xul]
 [test_set_document_title_transaction.html]
 [test_texteditor_keyevent_handling.html]
--- a/editor/libeditor/tests/mochitest.ini
+++ b/editor/libeditor/tests/mochitest.ini
@@ -9,28 +9,26 @@ support-files =
   file_bug549262.html
   file_bug586662.html
   file_bug674770-1.html
   file_bug915962.html
   file_select_all_without_body.html
   green.png
   spellcheck.js
 
-[test_bug46555.html]
 [test_bug200416.html]
 [test_bug289384.html]
 skip-if = os != "mac"
 [test_bug290026.html]
 [test_bug291780.html]
 [test_bug309731.html]
 [test_bug316447.html]
 [test_bug318065.html]
 [test_bug332636.html]
 support-files = test_bug332636.html^headers^
-[test_bug366682.html]
 [test_bug372345.html]
 skip-if = toolkit == 'android'
 [test_bug404320.html]
 [test_bug408231.html]
 skip-if = toolkit == 'android'
 [test_bug410986.html]
 subsuite = clipboard
 skip-if = toolkit == 'android'
@@ -41,26 +39,24 @@ skip-if = android_version == '18' # bug 
 skip-if = toolkit == 'android'
 [test_bug439808.html]
 [test_bug442186.html]
 [test_bug449243.html]
 [test_bug455992.html]
 [test_bug456244.html]
 [test_bug460740.html]
 [test_bug468353.html]
-[test_bug471319.html]
 [test_bug471722.html]
 [test_bug478725.html]
 subsuite = clipboard
 skip-if = toolkit == 'android'
 [test_bug480647.html]
 [test_bug480972.html]
 subsuite = clipboard
 skip-if = toolkit == 'android'
-[test_bug483651.html]
 [test_bug484181.html]
 skip-if = toolkit == 'android'
 [test_bug487524.html]
 [test_bug502673.html]
 [test_bug514156.html]
 [test_bug520189.html]
 subsuite = clipboard
 skip-if = toolkit == 'android'
@@ -110,18 +106,16 @@ skip-if = toolkit == 'android'
 [test_bug612128.html]
 [test_bug612447.html]
 [test_bug620906.html]
 skip-if = toolkit == 'android' #TIMED_OUT
 [test_bug622371.html]
 skip-if = toolkit == 'android' #bug 957797
 [test_bug625452.html]
 [test_bug629845.html]
-[test_bug635636.html]
-skip-if = e10s
 [test_bug638596.html]
 [test_bug640321.html]
 skip-if = android_version == '18' # bug 1147989
 [test_bug641466.html]
 [test_bug645914.html]
 [test_bug668599.html]
 [test_bug674770-1.html]
 subsuite = clipboard
@@ -147,59 +141,49 @@ subsuite = clipboard
 [test_bug767684.html]
 [test_bug772796.html]
 [test_bug773262.html]
 [test_bug780035.html]
 [test_bug787432.html]
 [test_bug790475.html]
 [test_bug795785.html]
 [test_bug796839.html]
-[test_bug830600.html]
-subsuite = clipboard
-skip-if = e10s
 [test_bug832025.html]
 [test_bug850043.html]
 [test_bug857487.html]
 [test_bug858918.html]
 [test_bug915962.html]
 [test_bug974309.html]
 skip-if = toolkit == 'android'
 [test_bug966155.html]
 skip-if = os != "win"
 [test_bug966552.html]
 skip-if = os != "win"
 [test_bug998188.html]
 [test_bug1026397.html]
-[test_bug1053048.html]
 [test_bug1067255.html]
-[test_bug1068979.html]
-subsuite = clipboard
 [test_bug1094000.html]
-[test_bug1100966.html]
-[test_bug1109465.html]
-[test_bug1140105.html]
-[test_bug1154791.html]
-[test_bug1162952.html]
-[test_bug1181130-1.html]
-[test_bug1181130-2.html]
-[test_bug1186799.html]
-[test_bug1247483.html]
-subsuite = clipboard
-skip-if = toolkit == 'android'
-[test_bug1250010.html]
-[test_bug1257363.html]
-[test_bug1258085.html]
-[test_bug1268736.html]
-
 [test_CF_HTML_clipboard.html]
 subsuite = clipboard
 [test_contenteditable_focus.html]
 [test_dom_input_event_on_htmleditor.html]
 skip-if = toolkit == 'android' # bug 1054087
 [test_dom_input_event_on_texteditor.html]
 [test_keypress_untrusted_event.html]
 [test_root_element_replacement.html]
 [test_select_all_without_body.html]
 [test_spellcheck_pref.html]
 skip-if = toolkit == 'android'
+[test_bug1068979.html]
+subsuite = clipboard
+[test_bug1109465.html]
+[test_bug1162952.html]
+[test_bug1186799.html]
+[test_bug1181130-1.html]
+[test_bug1181130-2.html]
 [test_backspace_vs.html]
 [test_css_chrome_load_access.html]
 skip-if = toolkit == 'android' # chrome urls not available due to packaging
+[test_bug1247483.html]
+subsuite = clipboard
+skip-if = toolkit == 'android'
+[test_bug1258085.html]
+[test_bug1268736.html]
--- a/editor/libeditor/tests/test_bug1053048.html
+++ b/editor/libeditor/tests/test_bug1053048.html
@@ -1,32 +1,32 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1053048
 -->
 <head>
   <meta charset="utf-8">
   <title>Test for Bug 1053048</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
   <script type="application/javascript">
 
   /** Test for Bug 1053048 **/
   SimpleTest.waitForExplicitFinish();
   SimpleTest.waitForFocus(runTests);
 
-  const nsISelectionPrivate = SpecialPowers.Ci.nsISelectionPrivate;
-  const nsISelectionListener = SpecialPowers.Ci.nsISelectionListener;
-  const nsIDOMNSEditableElement = SpecialPowers.Ci.nsIDOMNSEditableElement;
+  const nsISelectionPrivate = Components.interfaces.nsISelectionPrivate;
+  const nsISelectionListener = Components.interfaces.nsISelectionListener;
+  const nsIDOMNSEditableElement = Components.interfaces.nsIDOMNSEditableElement;
 
   function runTests()
   {
-    var textarea = SpecialPowers.wrap(document.getElementById("textarea"));
+    var textarea = document.getElementById("textarea");
     textarea.focus();
 
     var editor = textarea.QueryInterface(nsIDOMNSEditableElement).editor;
     var selectionPrivate = editor.selection.QueryInterface(nsISelectionPrivate);
 
     var selectionListener = {
       count: 0,
       notifySelectionChanged: function (aDocument, aSelection, aReason)
--- a/editor/libeditor/tests/test_bug1100966.html
+++ b/editor/libeditor/tests/test_bug1100966.html
@@ -1,18 +1,18 @@
 <!DOCTYPE>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1100966
 -->
 <head>
   <title>Test for Bug 1100966</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
 </head>
 <body>
 <div id="display">
 </div>
 <div id="content" contenteditable>
 =====<br>
 correct<br>
 fivee sixx<br>
@@ -43,22 +43,21 @@ SimpleTest.waitForFocus(function() {
 
       SimpleTest.finish();
     },0);
   },0);
 
 });
 
 function getSpellCheckSelection() {
-  var Ci = SpecialPowers.Ci;
-  var editingSession = SpecialPowers.wrap(window)
-    .QueryInterface(Ci.nsIInterfaceRequestor)
-    .getInterface(Ci.nsIWebNavigation)
-    .QueryInterface(Ci.nsIInterfaceRequestor)
-    .getInterface(Ci.nsIEditingSession);
+  var Ci = Components.interfaces;
+  var editingSession = window.QueryInterface(Ci.nsIInterfaceRequestor)
+                             .getInterface(Ci.nsIWebNavigation)
+                             .QueryInterface(Ci.nsIInterfaceRequestor)
+                             .getInterface(Ci.nsIEditingSession);
   var editor = editingSession.getEditorForWindow(window);
   var selcon = editor.selectionController;
   return selcon.getSelection(selcon.SELECTION_SPELLCHECK);
 }
 
 </script>
 </body>
 
--- a/editor/libeditor/tests/test_bug1140105.html
+++ b/editor/libeditor/tests/test_bug1140105.html
@@ -1,18 +1,18 @@
 <!DOCTYPE>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1140105
 -->
 <head>
   <title>Test for Bug 1140105</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
 </head>
 <body>
 <div id="display">
 </div>
 
 <div id="content" contenteditable><font face="Arial">1234567890</font></div>
 
 <pre id="test">
@@ -33,35 +33,34 @@ SimpleTest.waitForFocus(function() {
   is(selRange.endContainer.nodeName, "#text", "selection should be in text node");
   is(selRange.endOffset, 9, "offset should be 9");
 
   var firstHas = {};
   var anyHas = {};
   var allHas = {};
   var editor = getEditor();
 
-  var atomService = SpecialPowers.Cc["@mozilla.org/atom-service;1"].getService(SpecialPowers.Ci.nsIAtomService);
+  var atomService = Components.classes["@mozilla.org/atom-service;1"].getService(Components.interfaces.nsIAtomService);
   var propAtom = atomService.getAtom("font");
   editor.getInlineProperty(propAtom, "face", "Arial", firstHas, anyHas, allHas);
   is(firstHas.value, true, "Test for Arial: firstHas: true expected");
   is(anyHas.value, true, "Test for Arial: anyHas: true expected");
   is(allHas.value, true, "Test for Arial: allHas: true expected");
   editor.getInlineProperty(propAtom, "face", "Courier", firstHas, anyHas, allHas);
   is(firstHas.value, false, "Test for Courier: firstHas: false expected");
   is(anyHas.value, false, "Test for Courier: anyHas: false expected");
   is(allHas.value, false, "Test for Courier: allHas: false expected");
 
   SimpleTest.finish();
 
 });
 
 function getEditor() {
-  var Ci = SpecialPowers.Ci;
-  var editingSession = SpecialPowers.wrap(window)
-                             .QueryInterface(Ci.nsIInterfaceRequestor)
+  var Ci = Components.interfaces;
+  var editingSession = window.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIWebNavigation)
                              .QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIEditingSession);
   var editor = editingSession.getEditorForWindow(window);
   editor.QueryInterface(Ci.nsIHTMLEditor);
   return editor;
 }
 
--- a/editor/libeditor/tests/test_bug1154791.html
+++ b/editor/libeditor/tests/test_bug1154791.html
@@ -1,18 +1,18 @@
 <!DOCTYPE>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1154791
 -->
 <head>
   <title>Test for Bug 1154791</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
 </head>
 <body>
 <div id="display">
 </div>
 
 <div id="content" contenteditable>
 <tt>thiss onee is stilll a</tt>
 </div>
@@ -45,19 +45,18 @@ SimpleTest.waitForFocus(function() {
         SimpleTest.finish();
       },0);
     },0);
   },0);
 
 });
 
 function getSpellCheckSelection() {
-  var Ci = SpecialPowers.Ci;
-  var editingSession = SpecialPowers.wrap(window)
-                             .QueryInterface(Ci.nsIInterfaceRequestor)
+  var Ci = Components.interfaces;
+  var editingSession = window.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIWebNavigation)
                              .QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIEditingSession);
   var editor = editingSession.getEditorForWindow(window);
   var selcon = editor.selectionController;
   return selcon.getSelection(selcon.SELECTION_SPELLCHECK);
 }
 
--- a/editor/libeditor/tests/test_bug1250010.html
+++ b/editor/libeditor/tests/test_bug1250010.html
@@ -1,18 +1,18 @@
 <!DOCTYPE>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1250010
 -->
 <head>
   <title>Test for Bug 1250010</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
 </head>
 <body>
 <div id="display">
 </div>
 
 <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>
 
--- a/editor/libeditor/tests/test_bug1257363.html
+++ b/editor/libeditor/tests/test_bug1257363.html
@@ -1,18 +1,18 @@
 <!DOCTYPE>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1257363
 -->
 <head>
   <title>Test for Bug 1257363</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
 </head>
 <body>
 <div id="display">
 </div>
 
 <div id="backspaceCSS" contenteditable><p style="color:red;">12345</p>67</div>
 <div id="backspace" contenteditable><p><font color="red">12345</font></p>67</div>
 <div id="deleteCSS" contenteditable><p style="color:red;">x</p></div>
--- a/editor/libeditor/tests/test_bug366682.html
+++ b/editor/libeditor/tests/test_bug366682.html
@@ -1,18 +1,18 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=366682
 -->
 <head>
   <title>Test for Bug 366682</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
   <script src="spellcheck.js"></script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=366682">Mozilla Bug 366682</a>
 <p id="display"></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
@@ -29,33 +29,32 @@ function getEdit() {
   return document.getElementById('edit');
 }
 
 function editDoc() {
   return getEdit().contentDocument;
 }
 
 function getEditor() {
-  var Ci = SpecialPowers.Ci;
+  var Ci = Components.interfaces;
   var win = editDoc().defaultView;
-  var editingSession = SpecialPowers.wrap(win)
-    .QueryInterface(Ci.nsIInterfaceRequestor)
-    .getInterface(Ci.nsIWebNavigation)
-    .QueryInterface(Ci.nsIInterfaceRequestor)
-    .getInterface(Ci.nsIEditingSession);
+  var editingSession = win.QueryInterface(Ci.nsIInterfaceRequestor)
+                          .getInterface(Ci.nsIWebNavigation)
+                          .QueryInterface(Ci.nsIInterfaceRequestor)
+                          .getInterface(Ci.nsIEditingSession);
   return editingSession.getEditorForWindow(win);
 }
 
 function runTest() {
   editDoc().body.innerHTML = "<div>errror and an other errror</div>";
   gMisspeltWords = ["errror", "errror"];
   editDoc().designMode = "on";
 
-  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
-               .onSpellCheck(editDoc().documentElement, evalTest);
+  Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
+  onSpellCheck(editDoc().documentElement, evalTest);
 }
 
 function evalTest() {
   ok(isSpellingCheckOk(getEditor(), gMisspeltWords),
      "All misspellings accounted for.");
   SimpleTest.finish();
 }
 </script>
--- a/editor/libeditor/tests/test_bug46555.html
+++ b/editor/libeditor/tests/test_bug46555.html
@@ -4,18 +4,19 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=46555
 -->
 
 <head>
   <title>Test for Bug 46555</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="application/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
 </head>
 
 <body>
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=46555">Mozilla Bug 46555</a>
   <p id="display"></p>
   <div id="content" style="display: none">
   </div>
 
@@ -26,18 +27,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
       /** Test for Bug 46555 **/
       SimpleTest.waitForExplicitFinish();
       SimpleTest.waitForFocus(function() {
         const kCmd = "cmd_selectAll";
 
         var input = document.getElementById("t1");
         input.focus();
-        var controller =
-          SpecialPowers.wrap(input).controllers.getControllerForCommand(kCmd);
+        var controller = input.controllers.getControllerForCommand(kCmd);
 
         // Test 1: Select All should be disabled if editor is empty
         is(controller.isCommandEnabled(kCmd), false,
            "Select All command disabled when editor is empty");
 
         SimpleTest.finish();
       });
    </script>
--- a/editor/libeditor/tests/test_bug471319.html
+++ b/editor/libeditor/tests/test_bug471319.html
@@ -4,51 +4,52 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=471319
 -->
 
 <head>
   <title>Test for Bug 471319</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="application/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
 </head>
 
 <body onload="doTest();">
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=471319">Mozilla Bug 471319</a>
   <p id="display"></p>
   <div id="content" style="display: none">
   </div>
 
   <pre id="test">
     <script type="application/javascript;version=1.7">
 
       /** Test for Bug 471319 **/
     
       SimpleTest.waitForExplicitFinish();
 
       function doTest() {
-        let t1 = SpecialPowers.wrap($("t1"));
+        let t1 = $("t1");
         let editor = null;
 
         // Test 1: Undo on an empty editor - the editor should not forget about
         // the bogus node
-        t1.QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement);
+        t1.QueryInterface(Components.interfaces.nsIDOMNSEditableElement);
         t1Editor = t1.editor;
 
         // Did the editor recognize the new bogus node?
         t1Editor.undo(1);
         ok(!t1.value, "<br> still recognized as bogus node on undo");
 
 
         // Test 2: Redo on an empty editor - the editor should not forget about
         // the bogus node
-        let t2 = SpecialPowers.wrap($("t2"));
-        t2.QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement);
+        let t2 = $("t2");
+        t2.QueryInterface(Components.interfaces.nsIDOMNSEditableElement);
         t2Editor = t2.editor;
 
         // Did the editor recognize the new bogus node?
         t2Editor.redo(1);
         ok(!t2.value, "<br> still recognized as bogus node on redo");
 
 
         // Test 3: Undoing a batched transaction where both end points of the
--- a/editor/libeditor/tests/test_bug483651.html
+++ b/editor/libeditor/tests/test_bug483651.html
@@ -4,20 +4,23 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=483651
 -->
 
 <head>
   <title>Test for Bug 483651</title>
-  <script src="/MochiKit/packed.js"></script>
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="application/javascript"
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="application/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
+  <script type="application/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
 </head>
 
 <body onload="doTest();">
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=483651">Mozilla Bug 483651</a>
   <p id="display"></p>
   <div id="content" style="display: none">
   </div>
 
@@ -25,17 +28,20 @@ https://bugzilla.mozilla.org/show_bug.cg
     <script type="application/javascript">
 
       /** Test for Bug 483651 **/
 
       SimpleTest.waitForExplicitFinish();
 
       function doTest() {
         var t1 = $("t1");
-        var editor = SpecialPowers.wrap(t1).editor;
+        var editor = null;
+
+        if (t1 instanceof Components.interfaces.nsIDOMNSEditableElement)
+          editor = t1.editor;
 
         ok(editor, "able to get editor for the element");
         t1.focus();
         synthesizeKey("A", {});
         synthesizeKey("VK_BACK_SPACE", {});
 
         try {
           // Was the trailing br removed?
--- a/editor/libeditor/tests/test_bug635636.html
+++ b/editor/libeditor/tests/test_bug635636.html
@@ -1,18 +1,18 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=635636
 -->
 <head>
   <title>Test for Bug 635636</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=635636">Mozilla Bug 635636</a>
 <p id="display"></p>
 <div id="content">
 </div>
 <pre id="test">
 <script type="application/javascript">
@@ -28,19 +28,18 @@ addLoadEvent(function() {
     SimpleTest.waitForFocus(b2, w);
   }
 
   function b2()
   {
     w.document.designMode = 'on';
     w.location = "data:text/plain,2";
     d = w.document.getElementsByTagName("div")[0];
-    const Ci = SpecialPowers.Ci;
-    var mainWindow = SpecialPowers.wrap(w)
-                      .QueryInterface(Ci.nsIInterfaceRequestor)
+    const Ci = Components.interfaces;
+    var mainWindow = w.QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIWebNavigation)
                       .QueryInterface(Ci.nsIDocShellTreeItem)
                       .rootTreeItem
                       .QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIDOMWindow);
     var browser = mainWindow.gBrowser.selectedBrowser;
     browser.addEventListener("pageshow", function() {
       setTimeout(b3, 0);
--- a/editor/libeditor/tests/test_bug830600.html
+++ b/editor/libeditor/tests/test_bug830600.html
@@ -3,47 +3,48 @@
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=830600
 -->
 <head>
   <title>Test for Bug 830600</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
-  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+  <script type="application/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="application/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
+  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
 </head>
 
 <body>
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=830600">Mozilla Bug 830600</a>
   <p id="display"></p>
   <div id="content" style="display: none">
   </div>
   <input type="text" id="t1" />
   <pre id="test">
     <script type="application/javascript;version=1.7">
 
       /** Test for Bug 830600 **/
       SimpleTest.waitForExplicitFinish();
       SimpleTest.waitForFocus(function() {
-        const Ci = SpecialPowers.Ci;
+        const Ci = Components.interfaces;
         function test(str, expected, callback) {
           var t = document.getElementById("t1");
-          SpecialPowers.wrap(t).QueryInterface(Ci.nsIDOMNSEditableElement);
+          t.QueryInterface(Ci.nsIDOMNSEditableElement);
           t.focus();
           t.value = "";
-          var editor = SpecialPowers.wrap(t).editor;
-          editor.QueryInterface(Ci.nsIPlaintextEditor);
-          var origNewlineHandling = editor.newlineHandling;
-          editor.newlineHandling = Ci.nsIPlaintextEditor.eNewlinesStripSurroundingWhitespace
+          t.editor.QueryInterface(Ci.nsIPlaintextEditor);
+          var origNewlineHandling = t.editor.newlineHandling;
+          t.editor.newlineHandling = Ci.nsIPlaintextEditor.eNewlinesStripSurroundingWhitespace
           SimpleTest.waitForClipboard(str,
             function() {
-              SpecialPowers.Cc["@mozilla.org/widget/clipboardhelper;1"]
-                        .getService(Ci.nsIClipboardHelper)
+              Components.classes["@mozilla.org/widget/clipboardhelper;1"]
+                        .getService(Components.interfaces.nsIClipboardHelper)
                         .copyString(str);
             },
             function() {
               synthesizeKey("V", {accelKey: true});
               is(t.value, expected, "New line handling works correctly");
               t.value = "";
               callback();
             },
--- a/editor/libeditor/tests/test_selection_move_commands.xul
+++ b/editor/libeditor/tests/test_selection_move_commands.xul
@@ -216,16 +216,16 @@ function execTests() {
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
 ]]>
 </script>
 
 <body  id="html_body" xmlns="http://www.w3.org/1999/xhtml">
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=454004">Mozilla Bug 454004</a>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=372685">Mozilla Bug 372685</a>
 <p id="display"></p>
 
 <pre id="test">
 </pre>
 <iframe id="edit" width="200" height="100" src="about:blank"/>
 </body>
 </window>