Bug 473680. Stop crashtest 458637-1.html early (returning success) if it's running too long.
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 15 Jan 2009 21:00:27 +1300
changeset 23739 9813b594352a5303bcf3023a2b26f87edeeabf97
parent 23738 a7f7ec7f347cb39b47977f8a3a259277bb96ba3b
child 23741 73fbb12f48e1408529acdcad4b748f78c41be185
push id4692
push userrocallahan@mozilla.com
push dateThu, 15 Jan 2009 08:00:54 +0000
treeherdermozilla-central@9813b594352a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs473680, 458637
milestone1.9.2a1pre
Bug 473680. Stop crashtest 458637-1.html early (returning success) if it's running too long.
content/base/crashtests/458637-1.html
--- a/content/base/crashtests/458637-1.html
+++ b/content/base/crashtests/458637-1.html
@@ -1,25 +1,27 @@
 <html class="reftest-wait">
 <head>
 <script type="text/javascript">
 
 var iterations = 0;
+var start = new Date();
 
 function boom()
 {
   document.getElementById("i").style.overflow = "scroll";
   document.getElementById("i").src = document.getElementById("i").src;
   setTimeout(boom2, 10); // must be a short timeout
 }
 
 function boom2()
 {
   document.getElementById("i").style.overflow = "";
-  if (++iterations < 10)
+  var now = new Date();
+  if (++iterations < 20 && now - start < 5000)
     setTimeout(boom, 10);
   else
     document.documentElement.removeAttribute("class");
 }
 
 </script>
 </head>