summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/pseudo-valid-007.html
blob: 7420d66fd39569592ad584982a46f843e872a0fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
<style>
 :valid { background: lime; }
 :invalid { background: red; }
 select { background: red; }
</style>
</head>
<body>
<p id="description"></p>
<form method="get">
<select name="victim"><option>Lorem ipsum</option></select>
<select name="victim" required><option>empty</option><option>another</option></select>
</form>
<div id="console"></div>
<script>
description("This test performs a check for the :valid CSS selector on a select element.");

v = document.getElementsByName("victim");
for (i = 0; i < v.length; i++)
    shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'");
</script>
</body>
</html>