4 input { background: red; }
5 input:focus { background: green; }
8 <p>The following text box should have focus and should be green.
</p>
9 <input type=
"text" id=
"test" autofocus
onfocus=
"setTimeout(test, 0)">
10 <div id=
"result">FAIL
</div>
12 if (window
.testRunner
) {
13 testRunner
.dumpAsText();
14 testRunner
.waitUntilDone();
18 var target
= document
.getElementById("test");
20 if (document
.defaultView
.getComputedStyle(target
, null).getPropertyValue('background-color') == "rgb(0, 128, 0)")
21 result
.innerHTML
= "PASS";
22 if (window
.testRunner
)
23 testRunner
.notifyDone();