OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../js/resources/js-test-pre.js"></script> |
5 <style> | 5 <style> |
6 input:default { background: lime; } | 6 input:default { background: lime; } |
7 button:default { background: lime; } | 7 button:default { background: lime; } |
8 input { background: red; } | 8 input { background: red; } |
9 button { background: red; } | 9 button { background: red; } |
10 </style> | 10 </style> |
11 </head> | 11 </head> |
12 <body> | 12 <body> |
13 <p id="description"></p> | 13 <p id="description"></p> |
14 <form method="get"> | 14 <form method="get"> |
15 <input name="victim" type="submit" value="Submit" /> | 15 <input name="victim" type="submit" value="Submit" /> |
16 </form> | 16 </form> |
17 <div id="console"></div> | 17 <div id="console"></div> |
18 <script> | 18 <script> |
19 description("This test performs a simple check for the :default CSS selector."); | 19 description("This test performs a simple check for the :default CSS selector."); |
20 | 20 |
21 v = document.getElementsByName("victim"); | 21 v = document.getElementsByName("victim"); |
22 for (i = 0; i < v.length; i++) | 22 for (i = 0; i < v.length; i++) |
23 shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue
('background-color')", "'rgb(0, 255, 0)'"); | 23 shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue
('background-color')", "'rgb(0, 255, 0)'"); |
24 </script> | 24 </script> |
25 <script src="../js/resources/js-test-post.js"></script> | |
26 </body> | 25 </body> |
27 </html> | 26 </html> |
OLD | NEW |