зеркало из https://github.com/mozilla/pjs.git
Bug 443493 – Unit test for Bug 331215 fails rather frequently on Mozilla2 builds
Test uses the thread manager to place a function on the event queue of the main thread instead of using a timeout. r=mconnor
This commit is contained in:
Родитель
7cef216b39
Коммит
03d6d7ca4f
|
@ -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() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче