Bug 885324 - Try to fix intermittent failure in test_bug529119-2.html. r=mayhemer

This commit is contained in:
Martijn Wargers 2014-07-21 15:10:50 +02:00
parent d2d53b621a
commit e83d7d0937

View File

@ -14,6 +14,7 @@ var faultyURL = "http://some-nonexistent-domain-27489274c892748217cn2384.com/";
var w = null;
var phase = 0;
var isWindowLoaded = false;
function pollForPage(expectErrorPage, f, w)
{
@ -42,6 +43,12 @@ function pollForPage(expectErrorPage, f, w)
function windowLoaded()
{
// The code under here should only be run once
// The test popup window workingURL was already opened
if (isWindowLoaded)
return;
isWindowLoaded = true;
/* 2. We have successfully loaded a page, now go to a faulty URL */
// XXX The test fails when we change the location synchronously
window.setTimeout(function() {