Bug 535907 - [SeaMonkey 2.1 !?] mochitest-browser-chrome: browser_bug295977_autoscroll_overflow.js can cause browser_bug471962.js to fail; (Av1b) Use waitForFocus().

r=neil.
This commit is contained in:
Serge Gautherie 2009-12-28 10:47:47 +01:00
parent 40a1051ef3
commit c1e4e3b79d

View File

@ -23,10 +23,11 @@ function test()
function nextTest() {
var test = allTests.shift();
if(!test) {
if (!test) {
endTest();
return;
}
var elem = doc.getElementById(test.elem);
EventUtils.synthesizeMouse(elem, 10, 10, { button: 1 },
gBrowser.contentWindow);
@ -81,9 +82,10 @@ function test()
prefSvc.clearUserPref(kPrefName_AutoScroll);
// cleaning-up
gBrowser.addTab().linkedBrowser.stop();
gBrowser.addTab("about:blank");
gBrowser.removeCurrentTab();
finish();
// waitForFocus() fixes a failure in the next test if the latter runs too soon.
waitForFocus(finish);
}
}