Bug 1396136 part 1 - Make forms/input/number/focus-handling.html more robust. r?jwatt
MozReview-Commit-ID: DQTigOQkytq
--- 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);
}