зеркало из https://github.com/mozilla/pjs.git
Bug 422410 - "anti malware warning UI should allow pass through / show ignore link" (display the clickthrough for both phishing and malware) [p=johnath@mozilla.com (Johnathan Nightingale [johnath]) r=gavin a=blocking-firefox3+]
This commit is contained in:
Родитель
890829bb27
Коммит
9e7212b648
|
@ -147,10 +147,6 @@
|
||||||
el = document.getElementById("errorLongDescText_malware");
|
el = document.getElementById("errorLongDescText_malware");
|
||||||
el.parentNode.removeChild(el);
|
el.parentNode.removeChild(el);
|
||||||
|
|
||||||
// Unhide clickthrough button
|
|
||||||
el = document.getElementById("ignoreWarningButton");
|
|
||||||
el.style.display = "-moz-box";
|
|
||||||
|
|
||||||
// Set sitename
|
// Set sitename
|
||||||
document.getElementById("phishing_sitename").textContent = getHostString();
|
document.getElementById("phishing_sitename").textContent = getHostString();
|
||||||
document.title = document.getElementById("errorTitleText_phishing")
|
document.title = document.getElementById("errorTitleText_phishing")
|
||||||
|
@ -174,7 +170,6 @@
|
||||||
top: 23px;
|
top: 23px;
|
||||||
left: 20px;
|
left: 20px;
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
display: none; /* Hide the button by default */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ignoreWarning {
|
#ignoreWarning {
|
||||||
|
|
|
@ -15,12 +15,12 @@ function test() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function testMalware() {
|
function testMalware() {
|
||||||
// Confirm that "Ignore this warning" is hidden
|
// Confirm that "Ignore this warning" is visible - bug 422410
|
||||||
var el = newBrowser.contentDocument.getElementById("ignoreWarningButton");
|
var el = newBrowser.contentDocument.getElementById("ignoreWarningButton");
|
||||||
ok(el, "Ignore warning button should be present (but hidden) for malware");
|
ok(el, "Ignore warning button should be present for malware");
|
||||||
|
|
||||||
var style = newBrowser.contentWindow.getComputedStyle(el, null);
|
var style = newBrowser.contentWindow.getComputedStyle(el, null);
|
||||||
is(style.display, "none", "Ignore Warning button should be display:none for malware");
|
is(style.display, "-moz-box", "Ignore Warning button should be display:-moz-box for malware");
|
||||||
|
|
||||||
// Now launch the phishing test
|
// Now launch the phishing test
|
||||||
newBrowser.contentWindow.location = 'http://www.mozilla.com/firefox/its-a-trap.html';
|
newBrowser.contentWindow.location = 'http://www.mozilla.com/firefox/its-a-trap.html';
|
||||||
|
|
Загрузка…
Ссылка в новой задаче