Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / autofocus-opera-006.html
blob556a5fe81b9b51e76de25b4d09d7d5e586623f5b
1 <html>
2 <head>
3 <title>test with multiple controls having "autofocus" set</title>
4 <style>
5 input, input#test:focus { background:lime }
6 input:focus, input#test { background:red }
7 </style>
8 <script src="resources/common.js"></script>
9 <script language="JavaScript" type="text/javascript">
10 function log(message) {
11 document.getElementById("console").innerHTML += "<li>"+message+"</li>";
14 function test() {
15 if (window.testRunner)
16 testRunner.dumpAsText();
18 if (document.activeElement == document.getElementById("test"))
19 log("SUCCESS");
20 else
21 log("FAILURE");
22 if (window.testRunner)
23 testRunner.notifyDone();
26 waitUntilLoadedAndAutofocused(test);
27 </script>
28 </head>
29 <body>
30 <p>All form controls below should have a green background:</p>
31 <p><input autofocus id="test">
32 <p><input autofocus>
33 <p><input autofocus>
34 <p><input>
35 <p><input autofocus>
36 <p><input>
37 <hr/>
38 <ol id="console"></ol>
39 </body>
40 </html>