Bug 648485 - Trying to fix an intermittent failure in content/base/test/test_bug482935.html. r=ehsan

This commit is contained in:
Mounir Lamouri 2011-04-11 16:55:16 -07:00
parent 500e4eacd5
commit 78f5f9372e

View File

@ -30,7 +30,7 @@ function testCancelInPhase4() {
xhr.addEventListener("readystatechange", function(e) {
if (xhr.readyState >= 4) {
xhr.abort();
setTimeout(function() {
SimpleTest.executeSoon(function() {
// This request was cancelled, so the responseText should be empty string
is(xhr.responseText, "", "Expected empty response to cancelled request");
@ -47,7 +47,7 @@ function testCancelInPhase4() {
is(xhr2.responseText, "0", "Received fresh value for second request");
testCancelBeforePhase4();
}, 100);
});
}
}, false);
@ -70,7 +70,7 @@ function testCancelBeforePhase4() {
xhr.addEventListener("readystatechange", function(e) {
if (xhr.readyState == 3) {
xhr.abort();
setTimeout(function() {
SimpleTest.executeSoon(function() {
// This request was cancelled, so the responseText should be empty string
is(xhr.responseText, "", "Expected empty response to cancelled request");
@ -87,7 +87,7 @@ function testCancelBeforePhase4() {
is(xhr2.responseText, "1", "Received cached value for second request");
SimpleTest.finish();
}, 100);
});
}
}, false);