Bug 596237 - [SeaMonkey 2.1] TEST-UNEXPECTED-FAIL | chrome://mochikit/content/browser/content/html/document/test/browser_bug592641.js; r=bobbyholley a=NPOTB

This commit is contained in:
Neil 2010-09-14 15:48:46 -04:00
parent cf38d1c59a
commit 6b7202a7df

View File

@ -11,13 +11,7 @@ function test() {
ctx.tab1 = gBrowser.addTab(testPath + "bug592641_img.jpg");
ctx.tab1Browser = gBrowser.getBrowserForTab(ctx.tab1);
ctx.tab1Browser.addEventListener("load",
// onload is fired in OnStopDecode, so let's
// use executeSoon() to make sure that any
// other OnStopDecode event handlers get the
// chance to fire first.
function() {executeSoon(load1Done);},
true);
ctx.tab1Browser.addEventListener("load", load1Soon, true);
}
function checkTitle(title) {
@ -27,9 +21,14 @@ function checkTitle(title) {
"Title should be correct on load #" + ctx.loadsDone);
}
function load1Soon() {
ctx.tab1Browser.removeEventListener("load", load1Soon, true);
// onload is fired in OnStopDecode, so let's use executeSoon() to make sure
// that any other OnStopDecode event handlers get the chance to fire first.
executeSoon(load1Done);
}
function load1Done() {
// Check the title
var title = ctx.tab1Browser.contentWindow.document.title;
checkTitle(title);
@ -38,19 +37,17 @@ function load1Done() {
// the cached case.
ctx.tab2 = gBrowser.addTab(testPath + "bug592641_img.jpg");
ctx.tab2Browser = gBrowser.getBrowserForTab(ctx.tab2);
ctx.tab2Browser.addEventListener("load",
// onload is fired in OnStopDecode, so let's
// use executeSoon() to make sure that any
// other OnStopDecode event handlers get the
// chance to fire first.
function() {executeSoon(load2Done);},
true);
ctx.tab2Browser.addEventListener("load", load2Soon, true);
}
function load2Soon() {
ctx.tab2Browser.removeEventListener("load", load2Soon, true);
// onload is fired in OnStopDecode, so let's use executeSoon() to make sure
// that any other OnStopDecode event handlers get the chance to fire first.
executeSoon(load2Done);
}
function load2Done() {
// Check the title
var title = ctx.tab2Browser.contentWindow.document.title;
checkTitle(title);