Bug 1442500 - Part 3. Move spellchecker tests to editor/spellchecker. r=masayuki
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 02 Mar 2018 12:57:54 +0900
changeset 406514 1e2f56a1e4b4d08a3be3217cfebeff7bfcedaa25
parent 406513 b2e381dcef742e7d56a4575bb0fa208abead384c
child 406515 3e515738e4b5230b58c23b1c8a8ee24574bd6c10
push id33567
push userebalazs@mozilla.com
push dateMon, 05 Mar 2018 09:40:48 +0000
treeherdermozilla-central@e365d166458b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1442500
milestone60.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 1442500 - Part 3. Move spellchecker tests to editor/spellchecker. r=masayuki Many tests in composer are for spellchecker, so we should move it to /editor/spellchecker/tests. MozReview-Commit-ID: 7qmNymVXyZP
editor/composer/test/bug1200533_subframe.html
editor/composer/test/bug1204147_subframe.html
editor/composer/test/bug1204147_subframe2.html
editor/composer/test/bug678842_subframe.html
editor/composer/test/bug717433_subframe.html
editor/composer/test/de-DE/de_DE.aff
editor/composer/test/de-DE/de_DE.dic
editor/composer/test/en-AU/en_AU.aff
editor/composer/test/en-AU/en_AU.dic
editor/composer/test/en-GB/en_GB.aff
editor/composer/test/en-GB/en_GB.dic
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_bug1209414.html
editor/composer/test/test_bug1219928.html
editor/composer/test/test_bug1365383.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/spellchecker/moz.build
editor/spellchecker/tests/bug1200533_subframe.html
editor/spellchecker/tests/bug1204147_subframe.html
editor/spellchecker/tests/bug1204147_subframe2.html
editor/spellchecker/tests/bug678842_subframe.html
editor/spellchecker/tests/bug717433_subframe.html
editor/spellchecker/tests/de-DE/de_DE.aff
editor/spellchecker/tests/de-DE/de_DE.dic
editor/spellchecker/tests/en-AU/en_AU.aff
editor/spellchecker/tests/en-AU/en_AU.dic
editor/spellchecker/tests/en-GB/en_GB.aff
editor/spellchecker/tests/en-GB/en_GB.dic
editor/spellchecker/tests/mochitest.ini
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/composer/test/mochitest.ini
+++ b/editor/composer/test/mochitest.ini
@@ -1,42 +1,8 @@
 [DEFAULT]
-support-files =
-  bug678842_subframe.html
-  bug717433_subframe.html
-  bug1200533_subframe.html
-  bug1204147_subframe.html
-  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]
-skip-if = os == 'android'
-[test_bug338427.html]
-skip-if = os == 'android'
 [test_bug348497.html]
 [test_bug384147.html]
 [test_bug389350.html]
 skip-if = toolkit == 'android'
 [test_bug519928.html]
-[test_bug678842.html]
-skip-if = os == 'android'
-[test_bug697981.html]
-skip-if = os == 'android'
-[test_bug717433.html]
-skip-if = os == 'android'
 [test_bug738440.html]
-[test_bug1200533.html]
-skip-if = os == 'android'
-[test_bug1204147.html]
-skip-if = os == 'android'
-[test_bug1205983.html]
-skip-if = os == 'android'
-[test_bug1209414.html]
-skip-if = os == 'android'
-[test_bug1219928.html]
-skip-if = e10s || os == 'android'
-[test_bug1365383.html]
-skip-if = os == 'android'
--- a/editor/spellchecker/moz.build
+++ b/editor/spellchecker/moz.build
@@ -1,14 +1,16 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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/.
 
+MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
+
 XPIDL_SOURCES += [
     'nsIInlineSpellChecker.idl',
     'nsITextServicesFilter.idl',
 ]
 
 XPIDL_MODULE = 'txtsvc'
 
 EXPORTS += [
rename from editor/composer/test/bug1200533_subframe.html
rename to editor/spellchecker/tests/bug1200533_subframe.html
rename from editor/composer/test/bug1204147_subframe.html
rename to editor/spellchecker/tests/bug1204147_subframe.html
rename from editor/composer/test/bug1204147_subframe2.html
rename to editor/spellchecker/tests/bug1204147_subframe2.html
rename from editor/composer/test/bug678842_subframe.html
rename to editor/spellchecker/tests/bug678842_subframe.html
rename from editor/composer/test/bug717433_subframe.html
rename to editor/spellchecker/tests/bug717433_subframe.html
rename from editor/composer/test/de-DE/de_DE.aff
rename to editor/spellchecker/tests/de-DE/de_DE.aff
rename from editor/composer/test/de-DE/de_DE.dic
rename to editor/spellchecker/tests/de-DE/de_DE.dic
rename from editor/composer/test/en-AU/en_AU.aff
rename to editor/spellchecker/tests/en-AU/en_AU.aff
rename from editor/composer/test/en-AU/en_AU.dic
rename to editor/spellchecker/tests/en-AU/en_AU.dic
rename from editor/composer/test/en-GB/en_GB.aff
rename to editor/spellchecker/tests/en-GB/en_GB.aff
rename from editor/composer/test/en-GB/en_GB.dic
rename to editor/spellchecker/tests/en-GB/en_GB.dic
copy from editor/composer/test/mochitest.ini
copy to editor/spellchecker/tests/mochitest.ini
--- a/editor/composer/test/mochitest.ini
+++ b/editor/spellchecker/tests/mochitest.ini
@@ -1,42 +1,26 @@
 [DEFAULT]
+skip-if = os == 'android'
 support-files =
   bug678842_subframe.html
   bug717433_subframe.html
   bug1200533_subframe.html
   bug1204147_subframe.html
   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]
-skip-if = os == 'android'
-[test_bug338427.html]
-skip-if = os == 'android'
-[test_bug348497.html]
-[test_bug384147.html]
-[test_bug389350.html]
-skip-if = toolkit == 'android'
-[test_bug519928.html]
 [test_bug678842.html]
-skip-if = os == 'android'
 [test_bug697981.html]
-skip-if = os == 'android'
 [test_bug717433.html]
-skip-if = os == 'android'
-[test_bug738440.html]
 [test_bug1200533.html]
-skip-if = os == 'android'
 [test_bug1204147.html]
-skip-if = os == 'android'
 [test_bug1205983.html]
-skip-if = os == 'android'
 [test_bug1209414.html]
-skip-if = os == 'android'
 [test_bug1219928.html]
-skip-if = e10s || os == 'android'
+skip-if = e10s
 [test_bug1365383.html]
-skip-if = os == 'android'
rename from editor/composer/test/test_async_UpdateCurrentDictionary.html
rename to editor/spellchecker/tests/test_async_UpdateCurrentDictionary.html
rename from editor/composer/test/test_bug1200533.html
rename to editor/spellchecker/tests/test_bug1200533.html
--- a/editor/composer/test/test_bug1200533.html
+++ b/editor/spellchecker/tests/test_bug1200533.html
@@ -53,18 +53,18 @@ var script;
 var loadListener = function(evt) {
   if (loadCount == 0) {
     script = SpecialPowers.loadChromeScript(function() {
       var dir = Cc["@mozilla.org/file/directory_service;1"]
                   .getService(Ci.nsIProperties)
                   .get("CurWorkD", Ci.nsIFile);
       dir.append("tests");
       dir.append("editor");
-      dir.append("composer");
-      dir.append("test");
+      dir.append("spellchecker");
+      dir.append("tests");
 
       var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
                        .getService(Ci.mozISpellCheckingEngine);
 
       // Install en-GB, en-AU and de-DE dictionaries.
       var en_GB = dir.clone();
       var en_AU = dir.clone();
       var de_DE = dir.clone();
@@ -114,27 +114,27 @@ function continueTest(evt) {
     } else {
       var gotEn = (dict == "en-GB" || dict == "en-AU" || dict == "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/composer/test/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.src = 'http://mochi.test:8888/tests/editor/composer/test/bug1200533_subframe.html?firstload=true';
+content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug1200533_subframe.html?firstload=true';
 
 </script>
 </pre>
 </body>
 </html>
rename from editor/composer/test/test_bug1204147.html
rename to editor/spellchecker/tests/test_bug1204147.html
--- a/editor/composer/test/test_bug1204147.html
+++ b/editor/spellchecker/tests/test_bug1204147.html
@@ -32,18 +32,18 @@ var script;
 var loadListener = function(evt) {
   if (firstLoad) {
     script = SpecialPowers.loadChromeScript(function() {
       var dir = Cc["@mozilla.org/file/directory_service;1"]
                   .getService(Ci.nsIProperties)
                   .get("CurWorkD", Ci.nsIFile);
       dir.append("tests");
       dir.append("editor");
-      dir.append("composer");
-      dir.append("test");
+      dir.append("spellchecker");
+      dir.append("tests");
 
       var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
                        .getService(Ci.mozISpellCheckingEngine);
 
       // Install en-GB dictionary.
       en_GB = dir.clone();
       en_GB.append("en-GB");
       hunspell.addDirectory(en_GB);
@@ -82,17 +82,17 @@ var loadListener = function(evt) {
       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/composer/test/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);
 
       // Remove the fake en-GB dictionary again, since it's otherwise picked up by later tests.
       script.sendSyncMessage("destroy");
@@ -100,14 +100,14 @@ var loadListener = function(evt) {
       // Reset the preference, so the last value we set doesn't collide with the next test.
       SimpleTest.finish();
     }
   });
 }
 
 content.addEventListener('load', loadListener);
 
-content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug1204147_subframe.html?firstload=true';
+content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug1204147_subframe.html?firstload=true';
 
 </script>
 </pre>
 </body>
 </html>
rename from editor/composer/test/test_bug1205983.html
rename to editor/spellchecker/tests/test_bug1205983.html
--- a/editor/composer/test/test_bug1205983.html
+++ b/editor/spellchecker/tests/test_bug1205983.html
@@ -36,18 +36,18 @@ var onSpellCheck =
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
   script = SpecialPowers.loadChromeScript(function() {
     var dir = Cc["@mozilla.org/file/directory_service;1"]
                 .getService(Ci.nsIProperties)
                 .get("CurWorkD", Ci.nsIFile);
     dir.append("tests");
     dir.append("editor");
-    dir.append("composer");
-    dir.append("test");
+    dir.append("spellchecker");
+    dir.append("tests");
 
     var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
                      .getService(Ci.mozISpellCheckingEngine);
 
     // Install de-DE dictionary.
     var de_DE = dir.clone();
     de_DE.append("de-DE");
     hunspell.addDirectory(de_DE);
rename from editor/composer/test/test_bug1209414.html
rename to editor/spellchecker/tests/test_bug1209414.html
--- a/editor/composer/test/test_bug1209414.html
+++ b/editor/spellchecker/tests/test_bug1209414.html
@@ -55,18 +55,18 @@ SimpleTest.waitForFocus(function() {
     contextMenu.addEventListener("popupshown",
                                  () => sendAsyncMessage("popupshown"));
 
     var dir = Cc["@mozilla.org/file/directory_service;1"]
                 .getService(Ci.nsIProperties)
                 .get("CurWorkD", Ci.nsIFile);
     dir.append("tests");
     dir.append("editor");
-    dir.append("composer");
-    dir.append("test");
+    dir.append("spellchecker");
+    dir.append("tests");
 
     var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
                      .getService(Ci.mozISpellCheckingEngine);
 
     // Install de-DE dictionary.
     de_DE = dir.clone();
     de_DE.append("de-DE");
     hunspell.addDirectory(de_DE);
rename from editor/composer/test/test_bug1219928.html
rename to editor/spellchecker/tests/test_bug1219928.html
rename from editor/composer/test/test_bug1365383.html
rename to editor/spellchecker/tests/test_bug1365383.html
rename from editor/composer/test/test_bug338427.html
rename to editor/spellchecker/tests/test_bug338427.html
rename from editor/composer/test/test_bug678842.html
rename to editor/spellchecker/tests/test_bug678842.html
--- a/editor/composer/test/test_bug678842.html
+++ b/editor/spellchecker/tests/test_bug678842.html
@@ -31,18 +31,18 @@ var script;
 var loadListener = function(evt) {
   if (firstLoad) {
     script = SpecialPowers.loadChromeScript(function() {
       var dir = Cc["@mozilla.org/file/directory_service;1"]
                   .getService(Ci.nsIProperties)
                   .get("CurWorkD", Ci.nsIFile);
       dir.append("tests");
       dir.append("editor");
-      dir.append("composer");
-      dir.append("test");
+      dir.append("spellchecker");
+      dir.append("tests");
 
       var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
                        .getService(Ci.mozISpellCheckingEngine);
 
       // Install en-GB dictionary.
       en_GB = dir.clone();
       en_GB.append("en-GB");
       hunspell.addDirectory(en_GB);
@@ -76,31 +76,31 @@ var loadListener = function(evt) {
       firstLoad = false;
 
        // First time around, the dictionary defaults to the locale.
       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/composer/test/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);
 
       // 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.src = 'http://mochi.test:8888/tests/editor/composer/test/bug678842_subframe.html?firstload=true';
+content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug678842_subframe.html?firstload=true';
 
 </script>
 </pre>
 </body>
 </html>
rename from editor/composer/test/test_bug697981.html
rename to editor/spellchecker/tests/test_bug697981.html
--- a/editor/composer/test/test_bug697981.html
+++ b/editor/spellchecker/tests/test_bug697981.html
@@ -36,18 +36,18 @@ var onSpellCheck =
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(function() {
   script = SpecialPowers.loadChromeScript(function() {
     var dir = Cc["@mozilla.org/file/directory_service;1"]
                 .getService(Ci.nsIProperties)
                 .get("CurWorkD", Ci.nsIFile);
     dir.append("tests");
     dir.append("editor");
-    dir.append("composer");
-    dir.append("test");
+    dir.append("spellchecker");
+    dir.append("tests");
 
     var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
                      .getService(Ci.mozISpellCheckingEngine);
 
     // Install de-DE dictionary.
     var de_DE = dir.clone();
     de_DE.append("de-DE");
     hunspell.addDirectory(de_DE);
rename from editor/composer/test/test_bug717433.html
rename to editor/spellchecker/tests/test_bug717433.html
--- a/editor/composer/test/test_bug717433.html
+++ b/editor/spellchecker/tests/test_bug717433.html
@@ -33,18 +33,18 @@ var loadListener = function(evt) {
 
   if (firstLoad) {
     script = SpecialPowers.loadChromeScript(function() {
       var dir = Cc["@mozilla.org/file/directory_service;1"]
                   .getService(Ci.nsIProperties)
                   .get("CurWorkD", Ci.nsIFile);
       dir.append("tests");
       dir.append("editor");
-      dir.append("composer");
-      dir.append("test");
+      dir.append("spellchecker");
+      dir.append("tests");
 
       var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
                        .getService(Ci.mozISpellCheckingEngine);
 
       // Install en-GB dictionary.
       var en_GB = dir.clone();
       en_GB.append("en-GB");
       hunspell.addDirectory(en_GB);
@@ -78,31 +78,31 @@ var loadListener = function(evt) {
         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/composer/test/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);
 
       // 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.src = 'http://mochi.test:8888/tests/editor/composer/test/bug717433_subframe.html?firstload=true';
+content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug717433_subframe.html?firstload=true';
 
 </script>
 </pre>
 </body>
 </html>