B2G/gecko/browser/base/content/test/browser_pluginnotification.js
// Tests a page with a disabled plugin in it.
Tests a page with a disabled plugin in it.
Tests a page with a disabled plugin in it .
function test3() {
  var notificationBox = gBrowser.getNotificationBox(gTestBrowser);
  ok(!notificationBox.getNotificationWithValue("missing-plugins"), "Test 3, Should not have displayed the missing plugin notification");
  ok(!notificationBox.getNotificationWithValue("blocked-plugins"), "Test 3, Should not have displayed the blocked plugin notification");
  ok(!gTestBrowser.missingPlugins, "Test 3, Should not be a missing plugin list");
  new TabOpenListener("about:addons", test4, prepareTest5);
  var pluginNode = gTestBrowser.contentDocument.getElementById("test");
  ok(pluginNode, "Test 3, Found plugin in page");
  var objLoadingContent = pluginNode.QueryInterface(Ci.nsIObjectLoadingContent);
  is(objLoadingContent.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_DISABLED, "Test 3, plugin fallback type should be PLUGIN_DISABLED");
  var manageLink = gTestBrowser.contentDocument.getAnonymousElementByAttribute(pluginNode, "class", "managePluginsLink");
  ok(manageLink, "Test 3, found 'manage' link in plugin-problem binding");
  EventUtils.synthesizeMouseAtCenter(manageLink, {}, gTestBrowser.contentWindow);
}
function test3 ( ) { var notificationBox = gBrowser . getNotificationBox ( gTestBrowser ) ; ok ( ! notificationBox . getNotificationWithValue ( "missing-plugins" ) , "Test 3, Should not have displayed the missing plugin notification" ) ; ok ( ! notificationBox . getNotificationWithValue ( "blocked-plugins" ) , "Test 3, Should not have displayed the blocked plugin notification" ) ; ok ( ! gTestBrowser . missingPlugins , "Test 3, Should not be a missing plugin list" ) ; new TabOpenListener ( "about:addons" , test4 , prepareTest5 ) ; var pluginNode = gTestBrowser . contentDocument . getElementById ( "test" ) ; ok ( pluginNode , "Test 3, Found plugin in page" ) ; var objLoadingContent = pluginNode . QueryInterface ( Ci . nsIObjectLoadingContent ) ; is ( objLoadingContent . pluginFallbackType , Ci . nsIObjectLoadingContent . PLUGIN_DISABLED , "Test 3, plugin fallback type should be PLUGIN_DISABLED" ) ; var manageLink = gTestBrowser . contentDocument . getAnonymousElementByAttribute ( pluginNode , "class" , "managePluginsLink" ) ; ok ( manageLink , "Test 3, found 'manage' link in plugin-problem binding" ) ; EventUtils . synthesizeMouseAtCenter ( manageLink , { } , gTestBrowser . contentWindow ) ; }
Tests a page with a disabled plugin in it.
Tests a page with a disabled plugin in it .