Bug 1040769 - Make test_bug570341.html more resilient against timeouts on slower platforms. r=ehsan, a=test-only
authorGeoff Brown <gbrown@mozilla.com>
Tue, 22 Nov 2016 13:49:48 -0700
changeset 352576 207271d653e47b11aff98e58c5a7fef64b28da9a
parent 352575 de0e24173bdba9cde20adfce848333ffa2efd6e0
child 352577 45a3bdf8faec3a039d6d2598c7531134da0113fd
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)
reviewersehsan, test-only
bugs1040769, 570341
milestone52.0a2
Bug 1040769 - Make test_bug570341.html more resilient against timeouts on slower platforms. r=ehsan, a=test-only
docshell/test/test_bug570341.html
--- a/docshell/test/test_bug570341.html
+++ b/docshell/test/test_bug570341.html
@@ -103,19 +103,20 @@ window.onload = function() {
     unload = Date.now();
   }, true);
   var seenLoad = 0;
   win.addEventListener('load', function (){
     seenLoad = Date.now();
   }, true);
   frames[0].location = 'bug570341_recordevents.html'
   var interval = setInterval(function () {
+    // time constants here are arbitrary, chosen to allow the test to pass
     var stopPolling = (win.performance && win.performance.loadEventEnd) ||
-                      (seenLoad && Date.now() >= seenLoad + 200) ||
-                      Date.now() >= start + 5000;
+                      (seenLoad && Date.now() >= seenLoad + 3000) ||
+                      Date.now() >= start + 30000;
     if (stopPolling) {
       clearInterval(interval);
       checkValues();
     } else if (win._testing_evt_load) {
       seenLoad = Date.now();
     }
   }, 100);
 }