diff --git a/browser/base/content/test/browser_tab_dragdrop.js b/browser/base/content/test/browser_tab_dragdrop.js index 973454df401..04e4acdd7fa 100644 --- a/browser/base/content/test/browser_tab_dragdrop.js +++ b/browser/base/content/test/browser_tab_dragdrop.js @@ -61,9 +61,7 @@ function test() executeSoon(function () { var win = gBrowser.replaceTabWithWindow(t); - win.addEventListener("load", function () { - win.removeEventListener("load", arguments.callee, true); - + whenDelayedStartupFinished(win, function () { // Verify that the original window now only has the initial tab left in it. is(gBrowser.tabs[0], tabs[0], "tab0"); is(gBrowser.getBrowserForTab(gBrowser.tabs[0]).contentWindow.location, "about:blank", "tab0 uri"); @@ -82,7 +80,7 @@ function test() }, false); win.gBrowser.goBack(); }); - }, true); + }); }); }, true); b.loadURI("about:blank"); @@ -111,10 +109,10 @@ function test() gBrowser.getBrowserForTab(tabs[i]).addEventListener("load", fn(waitForLoad,i), true); } - setLocation(1, "data:text/html,