blob: a20e55af18e922c4761ed48dbf2f456f62e3cd64 [file] [log] [blame]
commit-queue@webkit.org38332f62011-11-08 18:04:11 +00001<!DOCYTPE html>
2<html>
3<style>
4input { background: red; }
5input: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.orgea3cf922012-06-22 06:52:33 +000012if (window.testRunner) {
13 testRunner.dumpAsText();
commit-queue@webkit.org38332f62011-11-08 18:04:11 +000014}
15
16var test = document.getElementById("test");
17if (document.defaultView.getComputedStyle(test, null).getPropertyValue('background-color') == "rgb(0, 128, 0)")
18 result.innerHTML = "PASS";
19</script>
20</body>
21</html>