зеркало из https://github.com/mozilla/gecko-dev.git
Bug 468189. Stop failing the test if we don't finish within 5 seconds. It causes sporadic failures.
This commit is contained in:
Родитель
e3488f43f7
Коммит
25c80fe5bc
|
@ -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();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче