Bug 1269209 - Port test_async_UpdateCurrentDictionary.html from chrome to plain; r=masayuki
☠☠ backed out by efc1aa9ba95b ☠ ☠
authorAryeh Gregor <ayg@aryeh.name>
Mon, 22 Aug 2016 21:00:48 +0300
changeset 319729 c7d8d25e09b66c418d8fe1fbfdf3a95c403536aa
parent 319728 816ee7cab76bbbbdc925b03380d2ec8fff6e35e8
child 319730 5d2f4867ec7fd3a9ee330f5952cf9e95e7f5ebe9
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
milestone52.0a1
Bug 1269209 - Port test_async_UpdateCurrentDictionary.html from chrome to plain; r=masayuki MozReview-Commit-ID: 3dneNqKrYCe
editor/composer/test/chrome.ini
editor/composer/test/mochitest.ini
editor/composer/test/test_async_UpdateCurrentDictionary.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_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]
--- a/editor/composer/test/mochitest.ini
+++ b/editor/composer/test/mochitest.ini
@@ -8,14 +8,15 @@ 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_bug348497.html]
 [test_bug384147.html]
 [test_bug389350.html]
 skip-if = toolkit == 'android'
 [test_bug519928.html]
 [test_bug738440.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 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=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();
 
-  onSpellCheck(textarea, function () {
-    var isc = textarea.editor.getInlineSpellChecker(false);
+  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
+  .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";