13 var newTab = gBrowser.addTab();
14 gBrowser.selectedTab = newTab;
15 newBrowser = gBrowser.getBrowserForTab(newTab);
18 gBrowser.addEventListener(
"load",
testNormal,
false);
19 newBrowser.contentWindow.location =
'http://example.com/';
23 gBrowser.removeEventListener(
"load",
testNormal,
false);
26 menu = document.getElementById(
"menu_HelpPopup");
27 ok(
menu,
"Help menu should exist!");
36 var reportMenu = document.getElementById(
"menu_HelpPopup_reportPhishingtoolmenu");
37 var errorMenu = document.getElementById(
"menu_HelpPopup_reportPhishingErrortoolmenu");
38 is(reportMenu.hidden,
false,
"Report phishing menu should be visible on normal sites");
39 is(errorMenu.hidden,
true,
"Report error menu item should be hidden on normal sites");
44 newBrowser.contentWindow.location =
'http://www.mozilla.com/firefox/its-a-trap.html';
56 var reportMenu = document.getElementById(
"menu_HelpPopup_reportPhishingtoolmenu");
57 var errorMenu = document.getElementById(
"menu_HelpPopup_reportPhishingErrortoolmenu");
58 is(reportMenu.hidden,
true,
"Report phishing menu should be hidden on phishing sites");
59 is(errorMenu.hidden,
false,
"Report error menu item should be visible on phishing sites");
62 gBrowser.removeCurrentTab();
function testNormal_PopupListener()
function testPhishing_PopupListener()