B2G/gecko/browser/base/content/test/browser_pluginnotification.js
// Tests a page with a blocked plugin in it.
Tests a page with a blocked plugin in it.
Tests a page with a blocked plugin in it .
function test5() {
  var notificationBox = gBrowser.getNotificationBox(gTestBrowser);
  ok(!notificationBox.getNotificationWithValue("missing-plugins"), "Test 5, Should not have displayed the missing plugin notification");
  ok(notificationBox.getNotificationWithValue("blocked-plugins"), "Test 5, Should have displayed the blocked plugin notification");
  ok(gTestBrowser.missingPlugins, "Test 5, Should be a missing plugin list");
  ok("application/x-test" in gTestBrowser.missingPlugins, "Test 5, Should know about application/x-test");
  ok(!("application/x-unknown" in gTestBrowser.missingPlugins), "Test 5, Should not know about application/x-unknown");
  var pluginNode = gTestBrowser.contentDocument.getElementById("test");
  ok(pluginNode, "Test 5, Found plugin in page");
  var objLoadingContent = pluginNode.QueryInterface(Ci.nsIObjectLoadingContent);
  is(objLoadingContent.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_BLOCKLISTED, "Test 5, plugin fallback type should be PLUGIN_BLOCKLISTED");
  prepareTest(test6, gTestRoot + "plugin_both.html");
}
function test5 ( ) { var notificationBox = gBrowser . getNotificationBox ( gTestBrowser ) ; ok ( ! notificationBox . getNotificationWithValue ( "missing-plugins" ) , "Test 5, Should not have displayed the missing plugin notification" ) ; ok ( notificationBox . getNotificationWithValue ( "blocked-plugins" ) , "Test 5, Should have displayed the blocked plugin notification" ) ; ok ( gTestBrowser . missingPlugins , "Test 5, Should be a missing plugin list" ) ; ok ( "application/x-test" in gTestBrowser . missingPlugins , "Test 5, Should know about application/x-test" ) ; ok ( ! ( "application/x-unknown" in gTestBrowser . missingPlugins ) , "Test 5, Should not know about application/x-unknown" ) ; var pluginNode = gTestBrowser . contentDocument . getElementById ( "test" ) ; ok ( pluginNode , "Test 5, Found plugin in page" ) ; var objLoadingContent = pluginNode . QueryInterface ( Ci . nsIObjectLoadingContent ) ; is ( objLoadingContent . pluginFallbackType , Ci . nsIObjectLoadingContent . PLUGIN_BLOCKLISTED , "Test 5, plugin fallback type should be PLUGIN_BLOCKLISTED" ) ; prepareTest ( test6 , gTestRoot + "plugin_both.html" ) ; }
Tests a page with a blocked plugin in it.
Tests a page with a blocked plugin in it .