B2G/gecko/browser/base/content/test/browser_pluginnotification.js
// Tests a page with a working plugin that is click-to-play
Tests a page with a working plugin that is click-to-play
Tests a page with a working plugin that is click - to - play
function test8() {
  var notificationBox = gBrowser.getNotificationBox(gTestBrowser);
  ok(!notificationBox.getNotificationWithValue("missing-plugins"), "Test 8, Should not have displayed the missing plugin notification");
  ok(!notificationBox.getNotificationWithValue("blocked-plugins"), "Test 8, Should not have displayed the blocked plugin notification");
  ok(!gTestBrowser.missingPlugins, "Test 8, Should not be a missing plugin list");
  ok(PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser), "Test 8, Should have a click-to-play notification");
  var pluginNode = gTestBrowser.contentDocument.getElementById("test");
  ok(pluginNode, "Test 8, Found plugin in page");
  var objLoadingContent = pluginNode.QueryInterface(Ci.nsIObjectLoadingContent);
  is(objLoadingContent.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY, "Test 8, plugin fallback type should be PLUGIN_CLICK_TO_PLAY");
  prepareTest(test9a, gTestRoot + "plugin_test2.html");
}
function test8 ( ) { var notificationBox = gBrowser . getNotificationBox ( gTestBrowser ) ; ok ( ! notificationBox . getNotificationWithValue ( "missing-plugins" ) , "Test 8, Should not have displayed the missing plugin notification" ) ; ok ( ! notificationBox . getNotificationWithValue ( "blocked-plugins" ) , "Test 8, Should not have displayed the blocked plugin notification" ) ; ok ( ! gTestBrowser . missingPlugins , "Test 8, Should not be a missing plugin list" ) ; ok ( PopupNotifications . getNotification ( "click-to-play-plugins" , gTestBrowser ) , "Test 8, Should have a click-to-play notification" ) ; var pluginNode = gTestBrowser . contentDocument . getElementById ( "test" ) ; ok ( pluginNode , "Test 8, Found plugin in page" ) ; var objLoadingContent = pluginNode . QueryInterface ( Ci . nsIObjectLoadingContent ) ; is ( objLoadingContent . pluginFallbackType , Ci . nsIObjectLoadingContent . PLUGIN_CLICK_TO_PLAY , "Test 8, plugin fallback type should be PLUGIN_CLICK_TO_PLAY" ) ; prepareTest ( test9a , gTestRoot + "plugin_test2.html" ) ; }
Tests a page with a working plugin that is click-to-play
Tests a page with a working plugin that is click - to - play