1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
6 input { background: red; }
7 button { background: red; }
8 :default { background: lime; }
12 <p id=
"description"></p>
14 <button name=
"victim" type=
"submit"/>Submit
</button>
15 <input name=
"victim" type=
"submit" value=
"Submit" />
16 <input name=
"victim" type=
"submit" value=
"Submit"/>
18 <div id=
"console"></div>
20 description("This test performs a check for the :default CSS selector on multiple submit buttons, part 2.");
22 v
= document
.getElementsByName("victim");
23 shouldBe("document.defaultView.getComputedStyle(v[0], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'");
24 for (i
= 1; i
< v
.length
; i
++)
25 shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue('background-color')", "'rgb(255, 0, 0)'");