mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Put back the load timeout code that I backed out yesterday, since it now works. b=369319
This commit is contained in:
parent
cee499d3d2
commit
b86f3c4b80
@ -53,6 +53,7 @@ var gCanvas;
|
||||
var gURLs;
|
||||
var gState;
|
||||
var gPart1Key;
|
||||
var gFailureTimeout;
|
||||
|
||||
const EXPECTED_PASS = 0;
|
||||
const EXPECTED_FAIL = 1;
|
||||
@ -174,6 +175,8 @@ function StartCurrentTest()
|
||||
|
||||
function StartCurrentURI(aState)
|
||||
{
|
||||
gFailureTimeout = setTimeout(LoadFailed, LOAD_FAILURE_TIMEOUT);
|
||||
|
||||
gState = aState;
|
||||
gBrowser.loadURI(gURLs[0]["url" + aState].spec);
|
||||
}
|
||||
@ -200,6 +203,7 @@ function OnDocumentLoad(event)
|
||||
// Ignore load events for subframes.
|
||||
return;
|
||||
|
||||
clearTimeout(gFailureTimeout);
|
||||
// Since we can't use a bubbling-phase load listener from chrome,
|
||||
// this is a capturing phase listener. So do setTimeout twice, the
|
||||
// first to get us after the onload has fired in the content, and
|
||||
@ -255,3 +259,11 @@ function DocumentLoaded()
|
||||
throw "Unexpected state."
|
||||
}
|
||||
}
|
||||
|
||||
function LoadFailed()
|
||||
{
|
||||
dump("REFTEST UNEXPECTED FAIL (LOADING): " +
|
||||
gURLs[0]["url" + gState].spec + "\n");
|
||||
gURLs.shift();
|
||||
StartCurrentTest();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user