Bug 1296845 - Increase wait interval in test_beaconRedirect, on Android only; r=francois
authorGeoff Brown <gbrown@mozilla.com>
Fri, 25 Nov 2016 21:44:10 -0700
changeset 324345 762cd82916340a3803543cda64079fcdf5cd9dd6
parent 324330 5b45f7938182ea8bf814ab0bb6373bcf803755b5
child 324346 95a822efc877b26b46b348aa334fd482377267ab
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersfrancois
bugs1296845
milestone53.0a1
Bug 1296845 - Increase wait interval in test_beaconRedirect, on Android only; r=francois
dom/tests/mochitest/beacon/test_beaconRedirect.html
--- a/dom/tests/mochitest/beacon/test_beaconRedirect.html
+++ b/dom/tests/mochitest/beacon/test_beaconRedirect.html
@@ -42,16 +42,21 @@ function queryIfRedirectSucceeded() {
   xhr.send();
 }
 
 function runTest() {
   var data = new Uint8Array([0,1,2,3]);
   navigator.sendBeacon(BEACON_URL, data);
 
   // we have to make sure the channel did follow the redirect hence
-  // we have to wait for 4 seconds before we can query the result.
-  intervalID = setInterval(queryIfRedirectSucceeded, 4000);
+  // we have to wait for a few seconds before we can query the result.
+  interval = 4000;
+  if (navigator.appVersion.indexOf("Android") >= 0) {
+    // Android Debug on an emulator can be very slow
+    interval = 10000;
+  }
+  intervalID = setInterval(queryIfRedirectSucceeded, interval);
 }
 
 </script>
 </pre>
 </body>
 </html>