Bug 1449255: Part 2 - Fold test_bug371495 into test_manifest. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Tue, 27 Mar 2018 12:32:51 -0700
changeset 773466 213e98df838deded8908a2cf420c848ffaf80156
parent 773465 44a1e209840968c6e7e663b919f1470d6a100531
child 773467 ad0fd8ddb9c5fc906b8f2f4c1a70201be353fb72
push id104243
push usermaglione.k@gmail.com
push dateWed, 28 Mar 2018 00:15:32 +0000
reviewersaswan
bugs1449255, 371495
milestone61.0a1
Bug 1449255: Part 2 - Fold test_bug371495 into test_manifest. r?aswan MozReview-Commit-ID: 69LtwXgwBT0
toolkit/mozapps/extensions/test/addons/test_bug371495/install.rdf
toolkit/mozapps/extensions/test/xpcshell/test_bug371495.js
toolkit/mozapps/extensions/test/xpcshell/test_manifest.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/addons/test_bug371495/install.rdf
+++ /dev/null
@@ -1,26 +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>bug371495@tests.mozilla.org</em:id>
-    <em:version>1.0</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>
-    
-    <!-- Front End MetaData -->
-    <em:name>Test theme</em:name>
-    <em:type>4</em:type>
-    <em:internalName>test/1.0</em:internalName>
-    <em:optionsURL>chrome://foo/content/bar.xul</em:optionsURL>
-    <em:aboutURL>chrome://foo/content/bar.xul</em:aboutURL>
-
-  </Description>
-</RDF>
deleted file mode 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug371495.js
+++ /dev/null
@@ -1,31 +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_bug371495";
-const ID = "bug371495@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() {
-    AddonManager.getAddonByID(ID, callback_soon(function(addon) {
-      Assert.notEqual(addon, null);
-      Assert.equal(addon.name, "Test theme");
-      restartManager();
-
-      AddonManager.getAddonByID(ID, callback_soon(function(addon2) {
-        Assert.notEqual(addon2, null);
-        Assert.equal(addon2.optionsURL, null);
-        Assert.equal(addon2.aboutURL, null);
-
-        executeSoon(do_test_finished);
-      }));
-    }));
-  });
-}
--- a/toolkit/mozapps/extensions/test/xpcshell/test_manifest.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_manifest.js
@@ -597,16 +597,38 @@ const ADDONS = [
         maxVersion: "1"
       }],
       name: "Test Addon 26"
     },
     extraFiles: {"options.xul": ""},
     expected: null,
   },
 
+  // Theme manifests should ignore aboutURL and optionsURL.
+  {
+    "install.rdf": {
+      id: "bug371495@tests.mozilla.org",
+      version: "1.0",
+      type: "4",
+      internalName: "test/1.0",
+      optionsURL: "chrome://foo/content/bar.xul",
+      aboutURL: "chrome://foo/content/bar.xul",
+      name: "Test theme",
+      targetApplications: [{
+        id: "xpcshell@tests.mozilla.org",
+        minVersion: "1",
+        maxVersion: "1",
+      }],
+    },
+
+    expected: {
+      aboutURL: null,
+      optionsURL: null,
+    }
+  },
 
   // Tests compatibility based on target platforms.
 
   // No targetPlatforms so should be compatible
   {
     "install.rdf": {
       id: "tp-addon1@tests.mozilla.org",
       version: "1.0",
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
@@ -38,19 +38,16 @@ tags = blocklist
 requesttimeoutfactor = 2
 tags = blocklist
 [test_bootstrap.js]
 skip-if = true # Bug 1358846 Bug 1365021 Bug 676992
 [test_bootstrap_const.js]
 [test_bootstrap_globals.js]
 [test_bug1180901_2.js]
 skip-if = os != "win"
-[test_bug371495.js]
-# Bug 676992: test consistently hangs on Android
-skip-if = os == "android"
 [test_bug384052.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 [test_bug393285.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 tags = blocklist
 [test_bug397778.js]