1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
6 :valid { background: lime; }
7 :invalid { background: red; }
8 select { background: red; }
12 <p id=
"description"></p>
14 <select name=
"victim"><option>Lorem ipsum
</option></select>
15 <select name=
"victim" required
><option>empty
</option><option>another
</option></select>
17 <div id=
"console"></div>
19 description("This test performs a check for the :valid CSS selector on a select element.");
21 v
= document
.getElementsByName("victim");
22 for (i
= 0; i
< v
.length
; i
++)
23 shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'");