Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / autofocus-opera-004.html
blob1a25f1d3248d6e82bb9dbb904e90b2dcfc6ebc53
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head>
3 <title>testing "autofocus" in XHTML combined with dynamic changes</title>
4 <style>
5 input { background:red }
6 input:focus { background:lime }
7 </style>
8 <script language="JavaScript" type="text/javascript">
9 function log(message) {
10 document.getElementById("console").innerHTML += "<li>"+message+"</li>";
13 function test() {
14 if (window.testRunner) {
15 testRunner.dumpAsText();
16 testRunner.waitUntilDone();
18 var input = document.getElementsByTagName('input')[0];
19 var p = document.getElementsByTagName('p')[0];
20 var input = p.removeChild(input);
21 input.setAttribute('autofocus','false');
22 input.addEventListener('focus', check, false);
23 p.appendChild(input);
24 setTimeout(check, 1000);
27 function check() {
28 if (document.activeElement == document.getElementsByTagName("input")[0])
29 log("SUCCESS");
30 else
31 log("FAILURE");
33 if (window.testRunner)
34 testRunner.notifyDone();
37 </script>
38 </head>
39 <body onload="test()">
40 <p>The form control should have a green background: <input/></p>
41 <hr/>
42 <ol id="console"></ol>
43 </body>
44 </html>