mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
9e8cc51307
--HG-- rename : browser/components/safebrowsing/content/blockedSite.xhtml => browser/base/content/blockedSite.xhtml rename : browser/components/safebrowsing/content/report-phishing-overlay.xul => browser/base/content/report-phishing-overlay.xul rename : browser/components/safebrowsing/content/test/browser_bug400731.js => browser/base/content/test/browser_bug400731.js rename : browser/components/safebrowsing/content/test/browser_bug415846.js => browser/base/content/test/browser_bug415846.js rename : browser/components/safebrowsing/SafeBrowsing.jsm => toolkit/components/url-classifier/SafeBrowsing.jsm
41 lines
1.5 KiB
JavaScript
41 lines
1.5 KiB
JavaScript
/* Check for the intended visibility of the "Ignore this warning" text*/
|
|
|
|
function test() {
|
|
waitForExplicitFinish();
|
|
|
|
gBrowser.selectedTab = gBrowser.addTab();
|
|
|
|
// Navigate to malware site. Can't use an onload listener here since
|
|
// error pages don't fire onload
|
|
window.addEventListener("DOMContentLoaded", testMalware, true);
|
|
content.location = "http://www.mozilla.org/firefox/its-an-attack.html";
|
|
}
|
|
|
|
function testMalware() {
|
|
window.removeEventListener("DOMContentLoaded", testMalware, true);
|
|
|
|
// Confirm that "Ignore this warning" is visible - bug 422410
|
|
var el = content.document.getElementById("ignoreWarningButton");
|
|
ok(el, "Ignore warning button should be present for malware");
|
|
|
|
var style = content.getComputedStyle(el, null);
|
|
is(style.display, "inline-block", "Ignore Warning button should be display:inline-block for malware");
|
|
|
|
// Now launch the phishing test
|
|
window.addEventListener("DOMContentLoaded", testPhishing, true);
|
|
content.location = "http://www.mozilla.org/firefox/its-a-trap.html";
|
|
}
|
|
|
|
function testPhishing() {
|
|
window.removeEventListener("DOMContentLoaded", testPhishing, true);
|
|
|
|
var el = content.document.getElementById("ignoreWarningButton");
|
|
ok(el, "Ignore warning button should be present for phishing");
|
|
|
|
var style = content.getComputedStyle(el, null);
|
|
is(style.display, "inline-block", "Ignore Warning button should be display:inline-block for phishing");
|
|
|
|
gBrowser.removeCurrentTab();
|
|
finish();
|
|
}
|