Bug 1269209 - Port test_bug338427.html from chrome to plain; r=masayuki
☠☠ backed out by db812cf6198f ☠ ☠
authorAryeh Gregor <ayg@aryeh.name>
Mon, 22 Aug 2016 21:02:11 +0300
changeset 319730 5d2f4867ec7fd3a9ee330f5952cf9e95e7f5ebe9
parent 319729 c7d8d25e09b66c418d8fe1fbfdf3a95c403536aa
child 319731 56e0713ad54b558b96ef8e4832cef9df3c283725
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)
reviewersmasayuki
bugs1269209, 338427
milestone52.0a1
Bug 1269209 - Port test_bug338427.html from chrome to plain; r=masayuki MozReview-Commit-ID: HiDXAKaZlQA
editor/composer/test/chrome.ini
editor/composer/test/mochitest.ini
editor/composer/test/test_bug338427.html
--- a/editor/composer/test/chrome.ini
+++ b/editor/composer/test/chrome.ini
@@ -1,12 +1,11 @@
 [DEFAULT]
 skip-if = buildapp == 'b2g' || os == 'android'
 
-[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]
--- a/editor/composer/test/mochitest.ini
+++ b/editor/composer/test/mochitest.ini
@@ -9,14 +9,15 @@ support-files =
   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_bug738440.html]
--- a/editor/composer/test/test_bug338427.html
+++ b/editor/composer/test/test_bug338427.html
@@ -1,34 +1,35 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=338427
 -->
 <head>
   <title>Test for Bug 338427</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" />
+  <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=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() {
-    Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
-
+    var onSpellCheck =
+      SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
+                   .onSpellCheck;
     var textarea = document.getElementById("editor");
-    var editor = textarea.editor;
+    var editor = SpecialPowers.wrap(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");