diff --git a/toolkit/content/tests/chrome/bug331215_window.xul b/toolkit/content/tests/chrome/bug331215_window.xul index c074824fc2d..2028188b4c9 100644 --- a/toolkit/content/tests/chrome/bug331215_window.xul +++ b/toolkit/content/tests/chrome/bug331215_window.xul @@ -69,7 +69,11 @@ gBrowser.addEventListener("pageshow", onPageShow, false); gBrowser.loadURI("data:text/plain,latest"); } - setTimeout(_delayedOnLoad, 1000); + let tm = Cc["@mozilla.org/thread-manager;1"]. + getService(Ci.nsIThreadManager); + tm.mainThread.dispatch({ + run: function() _delayedOnLoad() + }, Ci.nsIThread.DISPATCH_NORMAL); } function onPageShow() {