Bug 1330630 - Use "reftest-wait" to fix reftest fail for 315920-26.html. draft
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 12 Jan 2017 23:02:20 +0800
changeset 460441 f6cb75e51f78b5eabdd860be90965a752003ab6d
parent 459620 54103f40261cc982b11b2748514c56a5bdeb474c
child 542043 253e891dc7056607184efe7e84358fdde74c8d33
push id41387
push userbmo:tlin@mozilla.com
push dateFri, 13 Jan 2017 02:34:52 +0000
bugs1330630, 315920
Bug 1330630 - Use "reftest-wait" to fix reftest fail for 315920-26.html. Use "reftest-wait" to ensure the action in <body onload> is performed before taking the snapshot. MozReview-Commit-ID: 54pLjGIUheq
--- a/layout/reftests/bugs/315920-26.html
+++ b/layout/reftests/bugs/315920-26.html
@@ -1,20 +1,21 @@
 <!DOCTYPE html>
+<html class="reftest-wait">
       span {color: red}
       #one:checked + span {color: green}
       #two:default + span {color: green}
   <body onload='document.getElementById("one").setAttribute("type", "checkbox");
-                document.getElementById("two").setAttribute("type", "checkbox");'>
+                document.getElementById("two").setAttribute("type", "checkbox");
+                document.documentElement.removeAttribute("class");'>
       <input type="text" id="one" checked="checked"/>
       <span>Should be no red </span>
       <input type="text" id="two" checked="checked"/>
       <span>Should be no red </span>