Bug 546169 - Use an event listener instead of a timeout to avoid intermittent failures. r=gavin

This commit is contained in:
Steven MacLeod 2013-12-15 14:05:53 -05:00
parent 4842c69eb1
commit 9f0759f40e
2 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@
support-files = head.js
[browser_bug400731.js]
# [browser_bug415846.js]
# Disabled for too many intermittent failures (bug 546169)
# Previously disabled on Mac because of its bizarre special-and-unique
[browser_bug415846.js]
skip-if = os == "mac"
# Disabled on Mac because of its bizarre special-and-unique
# snowflake of a help menu.

View File

@ -37,11 +37,13 @@ function testNormal_PopupListener() {
// Now launch the phishing test. Can't use onload here because error pages don't
// fire normal load events.
window.addEventListener("DOMContentLoaded", testPhishing, true);
content.location = "http://www.mozilla.org/firefox/its-a-trap.html";
setTimeout(testPhishing, 2000);
}
function testPhishing() {
window.removeEventListener("DOMContentLoaded", testPhishing, true);
menu.addEventListener("popupshown", testPhishing_PopupListener, false);
menu.openPopup(null, "", 0, 0, false, null);
}