Bug 1385751 - suppress the annoying warnings of flaky timeouts in media tests.
MozReview-Commit-ID: dVGqVaITma
--- a/dom/media/test/manifest.js
+++ b/dom/media/test/manifest.js
@@ -1689,17 +1689,18 @@ function MediaTestManager() {
this.handlers[token] = handler;
var onTimeout = () => {
this.hasTimeout = true;
ok(false, `${token} timed out!`);
this.finished(token);
};
// Default timeout to 180s for each test.
- this.timers[token] = setTimeout(onTimeout, 180000);
+ // Call SimpleTest._originalSetTimeout() to bypass the flaky timeout checker.
+ this.timers[token] = SimpleTest._originalSetTimeout.call(window, onTimeout, 180000);
is(this.numTestsRunning, this.tokens.length,
"[started " + token + " t=" + elapsedTime(this.startTime) + "] Length of array should match number of running tests");
}
// Registers that the test corresponding to 'token' has finished. Call when
// you've finished your test. If all tests are complete this will finish the
// run, otherwise it may start up the next run. It's ok to call multiple times