Bug 629145 - Part 2: Fix incorrect assumptions about autofocus; r,a=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 27 Jan 2011 00:26:33 -0500
changeset 61554 0fc69d3548fde1839bfe6e558f3d92b0f610500c
parent 61553 1fb93d40acc9e4bf4d207d02d9dc6a822fb8f7c5
child 61555 7e5338ae09f9ce53057caed795d3c2541e023665
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs629145
milestone2.0b11pre
Bug 629145 - Part 2: Fix incorrect assumptions about autofocus; r,a=roc autofocus element will be focused after the load event is fired. This patch changes the tests to focus the desired elements at the load event explicitly.
layout/base/tests/bug612271-ref.html
layout/base/tests/bug613807-1-ref.html
--- a/layout/base/tests/bug612271-ref.html
+++ b/layout/base/tests/bug612271-ref.html
@@ -1,11 +1,11 @@
 <!DOCTYPE HTML><html><head>
   <script type="text/javascript" src="/MochiKit/packed.js"></script>
   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
 </head>
-<body>
-  <textarea autofocus style="height: 200px; display: block;"
+<body onload="document.querySelector('textarea').focus()">
+  <textarea style="height: 200px; display: block;"
     >foo
 </textarea>
   4 - 4
 </body>
 </html>
--- a/layout/base/tests/bug613807-1-ref.html
+++ b/layout/base/tests/bug613807-1-ref.html
@@ -1,6 +1,6 @@
 <!DOCTYPE HTML>
 <html>
-<body>
-<textarea id="t" rows="4" autofocus></textarea>
+<body onload="document.querySelector('textarea').focus()">
+<textarea id="t" rows="4"></textarea>
 </body>
 </html>