commit-queue@webkit.org | 38332f6 | 2011-11-08 18:04:11 +0000 | [diff] [blame] | 1 | <!DOCYTPE html> |
| 2 | <html> |
| 3 | <style> |
| 4 | input { background: red; } |
| 5 | input:focus { background: green; } |
| 6 | </style> |
| 7 | <body> |
| 8 | <p>The following text box should have focus and should be green.</p> |
| 9 | <input type="text" id="test" autofocus> |
| 10 | <div id="result">FAIL</div> |
| 11 | <script> |
rniwa@webkit.org | ea3cf92 | 2012-06-22 06:52:33 +0000 | [diff] [blame] | 12 | if (window.testRunner) { |
| 13 | testRunner.dumpAsText(); |
commit-queue@webkit.org | 38332f6 | 2011-11-08 18:04:11 +0000 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | var test = document.getElementById("test"); |
| 17 | if (document.defaultView.getComputedStyle(test, null).getPropertyValue('background-color') == "rgb(0, 128, 0)") |
| 18 | result.innerHTML = "PASS"; |
| 19 | </script> |
| 20 | </body> |
| 21 | </html> |