Bug 806147 - fix reftests that use setTimeout but not reftest-wait to include reftest-wait; r=dholbert
authorNathan Froyd <froydnj@mozilla.com>
Sat, 27 Oct 2012 12:35:42 -0400
changeset 112711 f9fa565fbd35dc328dca742f7f0e26f1316671c9
parent 112710 ec3ad127d56794c1c7ae88ee4dc6b0b3ee3b8e96
child 112712 27ae6c86237ffaf3d0d26952d74a8acbe2d1dc3e
child 112718 d4577eb79466de51155343532456203b5e1b40ae
push id23835
push userryanvm@gmail.com
push dateFri, 09 Nov 2012 00:52:02 +0000
treeherdermozilla-central@27ae6c86237f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs806147
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 806147 - fix reftests that use setTimeout but not reftest-wait to include reftest-wait; r=dholbert
layout/reftests/bidi/496006-1.html
layout/reftests/counters/t1204-increment-00-c-o-test.html
layout/reftests/counters/t1204-increment-01-c-o-test.html
layout/reftests/counters/t1204-increment-02-c-o-test.html
layout/reftests/counters/t1204-reset-01-c-o-test.html
--- a/layout/reftests/bidi/496006-1.html
+++ b/layout/reftests/bidi/496006-1.html
@@ -1,20 +1,21 @@
-<html>
+<html class="reftest-wait">
 <head>
 </head>
 <body style="direction: rtl;">
 m
 <span id="a" style="border: 1px solid black;"></span>
 <div><script>document.body.offsetHeight;</script></div>
 m
 
 <script>
 function doe() {
 var a=document.getElementById('a');
 a.style.outline = '1px solid transparent';
 document.body.offsetHeight;
 a.style.outline = '';
+document.documentElement.removeAttribute('class');
 }
 setTimeout(doe, 500);
 </script>
 </body>
 </html>
--- a/layout/reftests/counters/t1204-increment-00-c-o-test.html
+++ b/layout/reftests/counters/t1204-increment-00-c-o-test.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
  <head>
   <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
   <meta http-equiv="Content-Script-Type" content="text/javascript"/>
   <style type="text/css">
 
@@ -16,18 +16,20 @@
   <script type="text/javascript">
 
   function run() {
 	var t = document.getElementById("test");
 	var s = document.createElement("span");
 	s.setAttribute("class", "increment");
 	s.appendChild(document.createTextNode("new-"));
 	t.insertBefore(s, t.childNodes.item(1));
+	document.documentElement.removeAttribute('class');
   }
 
+  document.addEventListener("MozReftestInvalidate", run, false);
   </script>
  </head>
- <body onload="setTimeout('run()', 0)">
+ <body>
 
  <div id="test"><span class="increment"></span><span class="increment"></span><span class="increment"></span></div>
 
  </body>
 </html>
--- a/layout/reftests/counters/t1204-increment-01-c-o-test.html
+++ b/layout/reftests/counters/t1204-increment-01-c-o-test.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
  <head>
   <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
   <meta http-equiv="Content-Script-Type" content="text/javascript"/>
   <style type="text/css">
 
@@ -13,18 +13,20 @@
   .increment { counter-increment: c; }
 
   </style>
   <script type="text/javascript">
 
   function run() {
 	var t = document.getElementById("test");
 	t.removeChild(t.childNodes.item(1));
+	document.documentElement.removeAttribute('class');
   }
 
+  document.addEventListener("MozReftestInvalidate", run, false);
   </script>
  </head>
- <body onload="setTimeout('run()', 0)">
+ <body>
 
  <div id="test"><span class="increment"></span><span class="increment">FAIL-</span><span class="increment"></span><span class="increment"></span></div>
 
  </body>
 </html>
--- a/layout/reftests/counters/t1204-increment-02-c-o-test.html
+++ b/layout/reftests/counters/t1204-increment-02-c-o-test.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
  <head>
   <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
   <meta http-equiv="Content-Style-Type" content="text/css"/>
   <meta http-equiv="Content-Script-Type" content="text/javascript"/>
   <style type="text/css">
@@ -15,18 +15,20 @@
 
   </style>
   <script type="text/javascript">
 
   function run() {
     document.getElementById("one").removeAttribute("class");
 	document.getElementById("two").setAttribute("class", "increment");
 	document.getElementById("three").setAttribute("style", "counter-increment: c");
+	document.documentElement.removeAttribute('class');
   }
 
+  document.addEventListener("MozReftestInvalidate", run, false);
   </script>
  </head>
- <body onload="setTimeout('run()', 0)">
+ <body>
 
  <div id="test"><span id="one" class="increment"></span><span><span class="reset"><span class="increment"></span><span id="two" class="increment"></span></span></span><span id="three" class="use"></span><span class="increment"></span></div>
 
  </body>
 </html>
--- a/layout/reftests/counters/t1204-reset-01-c-o-test.html
+++ b/layout/reftests/counters/t1204-reset-01-c-o-test.html
@@ -1,10 +1,10 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
  <head>
   <title>CSS 2.1 Test Suite: dynamic changes to 'counter-increment'</title>
   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#counters"/>
   <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#propdef-content"/>
   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#counter"/>
   <meta http-equiv="Content-Script-Type" content="text/javascript"/>
   <style type="text/css">
 
@@ -13,18 +13,20 @@
   .increment { counter-increment: c; }
 
   </style>
   <script type="text/javascript">
 
   function run() {
 	var t = document.getElementById("test");
 	t.removeChild(t.childNodes.item(1));
+	document.documentElement.removeAttribute('class');
   }
 
+  document.addEventListener("MozReftestInvalidate", run, false);
   </script>
  </head>
- <body onload="setTimeout('run()', 0)">
+ <body>
 
  <div id="test"><span class="increment"></span><span class="reset"></span><span class="increment"></span><span class="increment"></span></div>
 
  </body>
 </html>