3 <title>dynamically inserted control with
"autofocus" set
</title>
5 input { background:red }
6 input:focus { background:lime }
8 <script language=
"JavaScript" type=
"text/javascript">
9 function log(message
) {
10 document
.getElementById("console").innerHTML
+= "<li>"+message
+"</li>";
14 if (window
.layoutTestController
)
15 layoutTestController
.dumpAsText();
17 if (document
.activeElement
== document
.getElementsByTagName("input")[0])
24 <body onload=
"test()">
25 <p>FAIL (The script did not run.)
</p>
27 document
.getElementsByTagName('p')[0].innerHTML
= "This form control should have a green background: <input autofocus>";
30 <ol id=
"console"></ol>