Test for bug 934503, r=jaws
☠☠ backed out by b0bce439c6e2 ☠ ☠
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 04 Nov 2013 16:47:38 -0500
changeset 153431 f631148645b39315c1065c8bf19749c367b7e98b
parent 153430 a8131d677d9b5d640e18cb3cab06f669a2175050
child 153432 7f907948d5471b0576f899e10dfa15c815386bde
push id3332
push userbsmedberg@mozilla.com
push dateMon, 04 Nov 2013 21:47:55 +0000
treeherderfx-team@f631148645b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs934503
milestone28.0a1
Test for bug 934503, r=jaws
browser/base/content/test/general/browser_pluginnotification.js
--- a/browser/base/content/test/general/browser_pluginnotification.js
+++ b/browser/base/content/test/general/browser_pluginnotification.js
@@ -839,10 +839,32 @@ function test24d() {
   });
 }
 
 function test25() {
   let notification = PopupNotifications.getNotification("click-to-play-plugins");
   ok(notification, "Test 25: There should be a plugin notification even if the plugin was immediately removed");
   ok(notification.dismissed, "Test 25: The notification should be dismissed by default");
 
+  prepareTest(test26, gTestRoot + "plugin_small.html");
+}
+
+function test26() {
+  let notification = PopupNotifications.getNotification("click-to-play-plugins");
+  ok(notification, "Test 26: There should be a plugin notification");
+  ok(gBrowser.ownerDocument.getElementById("plugins-notification-icon").classList.contains("plugin-hidden"),
+     "Test 26: The plugin notification icon should be highlighted");
+
+  // Don't use setTestPluginEnabledState here because we already saved the
+  // prior value
+  getTestPlugin().enabledState = Ci.nsIPluginTag.STATE_ENABLED;
+
+  prepareTest(test27, gTestRoot + "plugin_small.html");
+}
+
+function test27() {
+  let notification = PopupNotifications.getNotification("click-to-play-plugins");
+  ok(notification, "Test 27: There should be a plugin notification");
+  ok(!gBrowser.ownerDocument.getElementById("plugins-notification-icon").classList.contains("plugin-hidden"),
+     "Test 27: The plugin notification icon should not be highlighted");
+
   finishTest();
 }