blob: 79c7771b30eaaf3ab1f04d00f2f5053b36593c35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<!DOCYTPE html>
<html>
<style>
input { background: red; }
input:focus { background: green; }
</style>
<body>
<p>The following text box should have focus and should be green.</p>
<input type="text" id="test" autofocus>
<div id="result">FAIL</div>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
}
var test = document.getElementById("test");
if (document.defaultView.getComputedStyle(test, null).getPropertyValue('background-color') == "rgb(0, 128, 0)")
result.innerHTML = "PASS";
</script>
</body>
</html>
|