Bug 1296845 - Increase wait interval in test_beaconRedirect, on Android only. r=francois, a=test-only
authorGeoff Brown <gbrown@mozilla.com>
Fri, 25 Nov 2016 21:44:10 -0700
changeset 352701 cf6ea65ba55bd7cb3740a5b7020d376d7095dbaf
parent 352700 c46aa51a5335ab3bc7fde0a409b728300b540348
child 352702 8e1c11eedc84932c696531a2aba781eccd6d499b
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrancois, test-only
bugs1296845
milestone52.0a2
Bug 1296845 - Increase wait interval in test_beaconRedirect, on Android only. r=francois, a=test-only
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>