diff --git a/browser/base/content/test/Makefile.in b/browser/base/content/test/Makefile.in
index 5f3a2657bf3..6125ccc4154 100644
--- a/browser/base/content/test/Makefile.in
+++ b/browser/base/content/test/Makefile.in
@@ -318,6 +318,7 @@ _BROWSER_FILES = \
blockPluginVulnerableUpdatable.xml \
blockPluginVulnerableNoUpdate.xml \
blockNoPlugins.xml \
+ blockPluginHard.xml \
browser_utilityOverlay.js \
browser_bug676619.js \
download_page.html \
diff --git a/browser/base/content/test/blockPluginHard.xml b/browser/base/content/test/blockPluginHard.xml
new file mode 100644
index 00000000000..24eb5bc6fc7
--- /dev/null
+++ b/browser/base/content/test/blockPluginHard.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/browser/base/content/test/browser_pluginnotification.js b/browser/base/content/test/browser_pluginnotification.js
index 9d574cbe1ff..85e772e8062 100644
--- a/browser/base/content/test/browser_pluginnotification.js
+++ b/browser/base/content/test/browser_pluginnotification.js
@@ -58,12 +58,16 @@ TabOpenListener.prototype = {
function test() {
waitForExplicitFinish();
+ requestLongerTimeout(2);
registerCleanupFunction(function() {
+ Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
Services.prefs.clearUserPref("plugins.click_to_play");
getTestPlugin().enabledState = Ci.nsIPluginTag.STATE_ENABLED;
getTestPlugin("Second Test Plug-in").enabledState = Ci.nsIPluginTag.STATE_ENABLED;
});
Services.prefs.setBoolPref("plugins.click_to_play", false);
+ Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true);
+
var plugin = getTestPlugin();
plugin.enabledState = Ci.nsIPluginTag.STATE_ENABLED;
@@ -117,7 +121,6 @@ function test1() {
var plugin = getTestPlugin();
ok(plugin, "Should have a test plugin");
plugin.enabledState = Ci.nsIPluginTag.STATE_ENABLED;
- plugin.blocklisted = false;
prepareTest(test2, gTestRoot + "plugin_test.html");
}
@@ -159,14 +162,19 @@ function test4(tab, win) {
}
function prepareTest5() {
+ info("prepareTest5");
var plugin = getTestPlugin();
plugin.enabledState = Ci.nsIPluginTag.STATE_ENABLED;
- plugin.blocklisted = true;
- prepareTest(test5, gTestRoot + "plugin_test.html");
+ setAndUpdateBlocklist(gHttpTestRoot + "blockPluginHard.xml",
+ function() {
+ info("prepareTest5 callback");
+ prepareTest(test5, gTestRoot + "plugin_test.html");
+ });
}
// Tests a page with a blocked plugin in it.
function test5() {
+ info("test5");
var notificationBox = gBrowser.getNotificationBox(gTestBrowser);
ok(!PopupNotifications.getNotification("plugins-not-found", gTestBrowser), "Test 5, Should not have displayed the missing plugin notification");
ok(notificationBox.getNotificationWithValue("blocked-plugins"), "Test 5, Should have displayed the blocked plugin notification");
@@ -204,11 +212,12 @@ function test7() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
var plugin = getTestPlugin();
- plugin.blocklisted = false;
plugin.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
getTestPlugin("Second Test Plug-in").enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
- prepareTest(test8, gTestRoot + "plugin_test.html");
+ setAndUpdateBlocklist(gHttpTestRoot + "blockNoPlugins.xml", function() {
+ prepareTest(test8, gTestRoot + "plugin_test.html");
+ });
}
// Tests a page with a working plugin that is click-to-play
@@ -533,7 +542,6 @@ function test14() {
Services.prefs.setBoolPref("plugins.click_to_play", true);
var plugin = getTestPlugin();
- plugin.blocklisted = false;
plugin.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
getTestPlugin("Second Test Plug-in").enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
prepareTest(test15, gTestRoot + "plugin_alternate_content.html");
diff --git a/content/base/test/chrome/Makefile.in b/content/base/test/chrome/Makefile.in
index 630673116b3..f27b6eb378b 100644
--- a/content/base/test/chrome/Makefile.in
+++ b/content/base/test/chrome/Makefile.in
@@ -17,6 +17,8 @@ MOCHITEST_FILES = \
MOCHITEST_CHROME_FILES = \
test_bug206691.xul \
test_bug391728.html \
+ blockPluginHard.xml \
+ blockNoPlugins.xml \
file_bug391728.html \
file_bug391728_2.html \
test_bug421622.xul \
diff --git a/content/base/test/chrome/blockNoPlugins.xml b/content/base/test/chrome/blockNoPlugins.xml
new file mode 100644
index 00000000000..e4e191b3708
--- /dev/null
+++ b/content/base/test/chrome/blockNoPlugins.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/content/base/test/chrome/blockPluginHard.xml b/content/base/test/chrome/blockPluginHard.xml
new file mode 100644
index 00000000000..24eb5bc6fc7
--- /dev/null
+++ b/content/base/test/chrome/blockPluginHard.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/content/base/test/chrome/test_bug391728.html b/content/base/test/chrome/test_bug391728.html
index 9968b7acde2..ca35343a9b1 100644
--- a/content/base/test/chrome/test_bug391728.html
+++ b/content/base/test/chrome/test_bug391728.html
@@ -17,6 +17,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=391728