Bug 468189. Stop failing the test if we don't finish within 5 seconds. It causes sporadic failures.

This commit is contained in:
Boris Zbarsky 2009-01-07 09:23:56 -05:00
Родитель e3488f43f7
Коммит 25c80fe5bc
1 изменённых файлов: 0 добавлений и 9 удалений

Просмотреть файл

@ -48,12 +48,10 @@
<script type="application/javascript"><![CDATA[
const LISTEN_EVENTS = ["load", "unload", "pageshow", "pagehide"];
const MISSING_EVENTS_TIMEOUT = 5000;
var gBrowser;
var gTestsIterator;
var gExpected = [];
var gMissingEventsTimeoutId;
function ok(condition, message) {
window.opener.wrappedJSObject.SimpleTest.ok(condition, message);
@ -62,8 +60,6 @@
window.opener.wrappedJSObject.SimpleTest.is(a, b, message);
}
function finish() {
clearTimeout(gMissingEventsTimeoutId);
for each (let eventType in LISTEN_EVENTS) {
gBrowser.removeEventListener(eventType, eventListener, true);
}
@ -79,11 +75,6 @@
gBrowser.addEventListener(eventType, eventListener, true);
}
gMissingEventsTimeoutId = setTimeout(function() {
ok(false, "Did not receive all expected events");
finish();
}, MISSING_EVENTS_TIMEOUT);
gTestsIterator = testsIterator();
nextTest();
}