Bug 1449255: Part 10 - Rename test_bug468528 to test_blocklist_plugin_regexp.js. r=aswan
authorKris Maglione <maglione.k@gmail.com>
Tue, 27 Mar 2018 15:23:10 -0700
changeset 777718 10015c7138aeaba11b514279e067c2b6e9599ed8
parent 777717 776dafdd2ced4bd341cdb620b1e7fa7dd35a41fa
child 777719 9ef52e1e1a7c16944c7ca8b17639fbd73a1c1db5
push id105269
push userbmo:gl@mozilla.com
push dateThu, 05 Apr 2018 08:11:19 +0000
reviewersaswan
bugs1449255, 468528
milestone61.0a1
Bug 1449255: Part 10 - Rename test_bug468528 to test_blocklist_plugin_regexp.js. r=aswan MozReview-Commit-ID: HVXg5ljc52z
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_plugin_regexp.js
toolkit/mozapps/extensions/test/xpcshell/test_bug468528.js
toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini
rename from toolkit/mozapps/extensions/test/xpcshell/test_bug468528.js
rename to toolkit/mozapps/extensions/test/xpcshell/test_blocklist_plugin_regexp.js
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug468528.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_plugin_regexp.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 = [{
   // Normal blacklisted plugin, before an invalid regexp
   name: "test_bug468528_1",
   version: "5",
   disabled: false,
   blocklisted: false
 },
 {
@@ -35,24 +33,23 @@ var PLUGINS = [{
 
 
 function run_test() {
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9");
 
   // We cannot force the blocklist to update so just copy our test list to the profile
   copyBlocklistToProfile(do_get_file("data/test_bug468528.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);
 
   // not blocked - won't match due to invalid regexp
-  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[1], "1", "1.9") == nsIBLS.STATE_NOT_BLOCKED);
+  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[1], "1", "1.9") == blocklist.STATE_NOT_BLOCKED);
 
   // blocked - the invalid regexp for the previous item shouldn't affect this one
-  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[2], "1", "1.9") == nsIBLS.STATE_BLOCKED);
+  Assert.ok(blocklist.getPluginBlocklistState(PLUGINS[2], "1", "1.9") == blocklist.STATE_BLOCKED);
 
   // not blocked - the previous invalid regexp shouldn't act as a wildcard
-  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
@@ -31,16 +31,20 @@ tags = blocklist
 [test_blocklist_metadata_filters.js]
 # Bug 676992: test consistently hangs on Android
 skip-if = os == "android"
 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_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"
@@ -54,20 +58,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_bug468528.js]
-# Bug 676992: test consistently hangs on Android
-skip-if = os == "android"
-tags = blocklist
 [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