Bug 813372 - Tweaking the test a bit to try to avoid intermittent failures.
authorMats Palmgren <matspal@gmail.com>
Fri, 17 May 2013 16:36:25 +0000
changeset 132236 37b8fa6c1c92d8b5644afb43eacdd4da080377e4
parent 132235 de25384f4170d0fb752a78b4f6a1f57654703427
child 132239 86e3e253c6b630ffdca34f3ff0b1f1ec20a6967c
child 132245 a487c1595a94f5a48d8f10cf2f3dc8f2710265a3
child 132253 1f6740440eaaacc3db8aafa583116431aae02f78
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs813372
milestone24.0a1
Bug 813372 - Tweaking the test a bit to try to avoid intermittent failures.
layout/base/crashtests/813372-1.html
--- a/layout/base/crashtests/813372-1.html
+++ b/layout/base/crashtests/813372-1.html
@@ -29,23 +29,24 @@
 
 
 <section id="details" class="hide">
 I'm a test of hiding animation
 <button onclick="this.parentNode.classList.add('hide')">Click me to hide</button>
 </section>
 
 <script>
-var x = document.getElementById('details');
 var kNumIterations = 5;
 var currentIteration = 0;
+var inrval;
 
 function doe() {
-  x.classList.toggle('hide');
   if (++currentIteration >= kNumIterations) {
     clearInterval(inrval);
     document.documentElement.removeAttribute('class');
+  } else {
+    document.getElementById('details').classList.toggle('hide');
   }
 }
-var inrval = setInterval(doe, 800);
+document.addEventListener("MozReftestInvalidate", function(){ inrval = setInterval(doe, 1000); }, false);
 </script>
 </body>
 </html>