Bug 1275715 P1 Lengthen timeout for all tests using fetch_test_framework.js. r=asuth
authorBen Kelly <ben@wanderview.com>
Fri, 27 May 2016 08:24:14 -0700
changeset 340364 a6ffa86cfef899baadcd016ac380b6a8c2152269
parent 340363 13ff741f383dae901b1581bfdc2683c4cf7f6f3c
child 340365 250efc2d1015311f4c7abcb01d49244dbc8de333
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1275715
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1275715 P1 Lengthen timeout for all tests using fetch_test_framework.js. r=asuth
dom/tests/mochitest/fetch/fetch_test_framework.js
dom/tests/mochitest/fetch/test_fetch_cors.html
--- a/dom/tests/mochitest/fetch/fetch_test_framework.js
+++ b/dom/tests/mochitest/fetch/fetch_test_framework.js
@@ -1,9 +1,16 @@
 function testScript(script) {
+
+  // The framework runs the entire test in many different configurations.
+  // On slow platforms and builds this can make the tests likely to
+  // timeout while they are still running.  Lengthen the timeout to
+  // accomodate this.
+  SimpleTest.requestLongerTimeout(2);
+
   // reroute.html should have set this variable if a service worker is present!
   if (!("isSWPresent" in window)) {
     window.isSWPresent = false;
   }
 
   function setupPrefs() {
     return new Promise(function(resolve, reject) {
       SpecialPowers.pushPrefEnv({
--- a/dom/tests/mochitest/fetch/test_fetch_cors.html
+++ b/dom/tests/mochitest/fetch/test_fetch_cors.html
@@ -11,17 +11,13 @@
 </head>
 <body>
 <p id="display"></p>
 <div id="content" style="display: none"></div>
 <pre id="test"></pre>
 <script type="text/javascript" src="utils.js"> </script>
 <script type="text/javascript" src="fetch_test_framework.js"> </script>
 <script class="testbody" type="text/javascript">
-
-// XXXcatalinb: this test takes a really long time to run on android debug.
-SimpleTest.requestLongerTimeout(2);
-
 testScript("test_fetch_cors.js");
 </script>
 </body>
 </html>