Bug 1396136 part 1 - Make forms/input/number/focus-handling.html more robust. r?jwatt draft
authorXidorn Quan <me@upsuper.org>
Tue, 05 Sep 2017 13:48:59 +1000
changeset 658960 763579a45ee9506cf87d9d037d616e5e8de7a61c
parent 658959 188ab0ba2f302227ae514a3ea1449ca4d7d0f40e
child 658961 d6e1ac0fc7cb7fe1ab990215011c4bf4ccc38ed8
push id77949
push userxquan@mozilla.com
push dateTue, 05 Sep 2017 07:02:43 +0000
reviewersjwatt
bugs1396136
milestone57.0a1
Bug 1396136 part 1 - Make forms/input/number/focus-handling.html more robust. r?jwatt MozReview-Commit-ID: DQTigOQkytq
layout/reftests/forms/input/number/focus-handling.html
--- a/layout/reftests/forms/input/number/focus-handling.html
+++ b/layout/reftests/forms/input/number/focus-handling.html
@@ -4,17 +4,19 @@
        get snapshotted before it's been focused. We're not testing                 
        invalidation so we don't need to listen for MozReftestInvalidate.           
   -->                                                                              
   <head>
     <meta charset="utf-8">
     <script>
 
 function begin() {
-  document.getElementsByTagName('input')[1].focus();
+  setTimeout(function() {
+    document.getElementsByTagName('input')[1].focus();
+  }, 0);
 }
 
 function end() {
   setTimeout(function() {
     document.documentElement.className = "";
   }, 0);
 }