Bug 1447903: Part 18b - Fold test_bug425657 into test_bug397778.js. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Wed, 21 Mar 2018 23:37:59 -0700
changeset 772390 aa6ac28311db9ff6111e81201f8886ed483e3072
parent 772389 7355788a2e8ea2e6b25ca38d83809d984455205b
child 772391 278c54957071f8eb8a5ad145346d78f2f7e17fbe
push id103897
push usermaglione.k@gmail.com
push dateMon, 26 Mar 2018 01:31:53 +0000
reviewersaswan
bugs1447903, 425657, 397778
milestone61.0a1
Bug 1447903: Part 18b - Fold test_bug425657 into test_bug397778.js. r?aswan MozReview-Commit-ID: LrsRe47g0hy
toolkit/mozapps/extensions/test/addons/test_bug425657/install.rdf
toolkit/mozapps/extensions/test/xpcshell/head_addons.js
toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js
toolkit/mozapps/extensions/test/xpcshell/test_bug425657.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/test_bug425657/install.rdf
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-  <Description about="urn:mozilla:install-manifest">
-    <em:id>bug425657@tests.mozilla.org</em:id>
-    <em:version>1</em:version>
-    <em:targetApplication>
-      <Description>
-        <em:id>xpcshell@tests.mozilla.org</em:id>
-        <em:minVersion>1</em:minVersion>
-        <em:maxVersion>1</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-    <em:name>Deutsches Wörterbuch</em:name>
-  </Description>
-</RDF>
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -66,17 +66,16 @@ ChromeUtils.defineModuleGetter(this, "Mo
 
 XPCOMUtils.defineLazyServiceGetter(this, "aomStartup",
                                    "@mozilla.org/addons/addon-manager-startup;1",
                                    "amIAddonManagerStartup");
 
 // Whitelist existing tests that still use non-restartless extensions.
 const LEGACY_NON_RESTARTLESS_TESTS = new Set([
   "test_blocklistchange.js",
-  "test_bug425657.js",
   "test_bug455906.js",
 ]);
 
 if (LEGACY_NON_RESTARTLESS_TESTS.has(_TEST_FILE[0].replace(/.*\//, ""))) {
   Services.prefs.setBoolPref("extensions.legacy.non-restartless.enabled", true);
 }
 
 const {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js
@@ -20,17 +20,17 @@ const ADDON = {
   localized: [
     {
       locale: ["fr"],
       name: "fr Name",
       description: "fr Description",
     },
     {
       locale: ["de-DE"],
-      name: "de-DE Name",
+      name: "Deutsches W\u00f6rterbuch",
     },
     {
       locale: ["es-ES"],
       name: "es-ES Name",
       description: "es-ES Description",
     },
     {
       locale: ["zh-TW"],
@@ -98,31 +98,31 @@ function run_test_1() {
 
 function run_test_2() {
   // Change locale. The more specific de-DE is the best match
   Services.locale.setRequestedLocales(["de"]);
   restartManager();
 
   AddonManager.getAddonByID(ID, function(addon) {
     Assert.notEqual(addon, null);
-    Assert.equal(addon.name, "de-DE Name");
+    Assert.equal(addon.name, "Deutsches W\u00f6rterbuch");
     Assert.equal(addon.description, null);
 
     executeSoon(run_test_3);
   });
 }
 
 function run_test_3() {
   // Change locale. Locale case should have no effect
   Services.locale.setRequestedLocales(["DE-de"]);
   restartManager();
 
   AddonManager.getAddonByID(ID, function(addon) {
     Assert.notEqual(addon, null);
-    Assert.equal(addon.name, "de-DE Name");
+    Assert.equal(addon.name, "Deutsches W\u00f6rterbuch");
     Assert.equal(addon.description, null);
 
     executeSoon(run_test_4);
   });
 }
 
 function run_test_4() {
   // Change locale. es-ES should closely match
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug425657.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 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/.
- */
-
-const ADDON = "test_bug425657";
-const ID = "bug425657@tests.mozilla.org";
-
-function run_test() {
-  // Setup for test
-  do_test_pending();
-  createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1");
-
-  // Install test add-on
-  startupManager();
-  installAllFiles([do_get_addon(ADDON)], function() {
-    restartManager();
-    AddonManager.getAddonByID(ID, function(addon) {
-      Assert.notEqual(addon, null);
-      Assert.equal(addon.name, "Deutsches W\u00f6rterbuch");
-      Assert.equal(addon.name.length, 20);
-
-      executeSoon(do_test_finished);
-    });
-  });
-}
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
@@ -109,19 +109,16 @@ skip-if = os == "android"
 tags = blocklist
 [test_bug397778.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 [test_bug406118.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 tags = blocklist
-[test_bug425657.js]
-# Bug 676992: test consistently hangs on Android
-skip-if = os == "android"
 [test_bug430120.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 tags = blocklist
 [test_bug449027.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 tags = blocklist