Bug 1449255: Part 11a - Rename test_bug514327_1 to test_blocklist_plugin_severities.js. r=aswan
authorKris Maglione <maglione.k@gmail.com>
Tue, 27 Mar 2018 15:25:53 -0700
changeset 777719 9ef52e1e1a7c16944c7ca8b17639fbd73a1c1db5
parent 777718 10015c7138aeaba11b514279e067c2b6e9599ed8
child 777720 c3a654349747b36fe438ce3045fb774b2dabc757
push id105269
push userbmo:gl@mozilla.com
push dateThu, 05 Apr 2018 08:11:19 +0000
reviewersaswan
bugs1449255
milestone61.0a1
Bug 1449255: Part 11a - Rename test_bug514327_1 to test_blocklist_plugin_severities.js. r=aswan MozReview-Commit-ID: Aor9QhJiBzE
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_plugin_severities.js
toolkit/mozapps/extensions/test/xpcshell/test_bug514327_1.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
rename from toolkit/mozapps/extensions/test/xpcshell/test_bug514327_1.js
rename to toolkit/mozapps/extensions/test/xpcshell/test_blocklist_plugin_severities.js
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug514327_1.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_plugin_severities.js
@@ -1,14 +1,12 @@
 /* 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 nsIBLS = Ci.nsIBlocklistService;
-
 var PLUGINS = [{
   // blocklisted - default severity
   name: "test_bug514327_1",
   version: "5",
   disabled: false,
   blocklisted: false
 },
 {
@@ -35,22 +33,22 @@ var PLUGINS = [{
 }];
 
 
 function run_test() {
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9");
 
   copyBlocklistToProfile(do_get_file("data/test_bug514327_1.xml"));
 
-  var blocklist = Cc["@mozilla.org/extensions/blocklist;1"].getService(nsIBLS);
+  var {blocklist} = Services;
 
   // blocked (sanity check)
-  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[0], "1", "1.9") == nsIBLS.STATE_BLOCKED);
+  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[0], "1", "1.9") == blocklist.STATE_BLOCKED);
 
   // outdated
-  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[1], "1", "1.9") == nsIBLS.STATE_OUTDATED);
+  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[1], "1", "1.9") == blocklist.STATE_OUTDATED);
 
   // outdated
-  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[2], "1", "1.9") == nsIBLS.STATE_OUTDATED);
+  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[2], "1", "1.9") == blocklist.STATE_OUTDATED);
 
   // not blocked
-  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[3], "1", "1.9") == nsIBLS.STATE_NOT_BLOCKED);
+  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[3], "1", "1.9") == blocklist.STATE_NOT_BLOCKED);
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
@@ -35,16 +35,20 @@ tags = blocklist
 [test_blocklist_osabi.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 tags = blocklist
 [test_blocklist_plugin_regexp.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 tags = blocklist
+[test_blocklist_plugin_severities.js]
+# Bug 676992: test consistently hangs on Android
+skip-if = os == "android"
+tags = blocklist
 [test_blocklist_prefs.js]
 tags = blocklist
 [test_blocklist_regexp.js]
 skip-if = os == "android"
 tags = blocklist
 [test_blocklist_severities.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
@@ -58,20 +62,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_bug514327_1.js]
-# Bug 676992: test consistently hangs on Android
-skip-if = os == "android"
-tags = blocklist
 [test_bug514327_2.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 tags = blocklist
 [test_bug514327_3.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 tags = blocklist