Bug 1385751 - suppress the annoying warnings of flaky timeouts in media tests. draft
authorJW Wang <jwwang@mozilla.com>
Mon, 31 Jul 2017 10:35:47 +0800
changeset 618276 3face5e28805d013be65f876304cbc182a51df8d
parent 618249 0909f22e6dd160893e0d54aeedd2f1d4015c63ba
child 640022 cee4badf98d89287516cc7f1fddff6422685c80f
push id71282
push userjwwang@mozilla.com
push dateMon, 31 Jul 2017 06:01:27 +0000
bugs1385751
milestone56.0a1
Bug 1385751 - suppress the annoying warnings of flaky timeouts in media tests. MozReview-Commit-ID: dVGqVaITma
dom/media/test/manifest.js
--- 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