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="../../resources/js-test.js"></script> |
5 <style> | 5 <style> |
6 :valid { background: lime; } | 6 :valid { background: lime; } |
7 :invalid { background: red; } | 7 :invalid { background: red; } |
8 input { background: red; } | 8 input { background: red; } |
9 </style> | 9 </style> |
10 </head> | 10 </head> |
11 <body> | 11 <body> |
12 <p id="description"></p> | 12 <p id="description"></p> |
13 <form method="get"> | 13 <form method="get"> |
14 <input name="victim" type="text" value="Lorem ipsum"/> | 14 <input name="victim" type="text" value="Lorem ipsum"/> |
15 <input name="victim" type="text" value="Lorem ipsum" required/> | 15 <input name="victim" type="text" value="Lorem ipsum" required/> |
16 <input name="victim" type="text" value="Lorem ipsum" pattern="Lorem ipsum"/> | 16 <input name="victim" type="text" value="Lorem ipsum" pattern="Lorem ipsum"/> |
17 <input name="victim" type="submit"> | 17 <input name="victim" type="submit"> |
18 <button name="victim"></button> | 18 <button name="victim"></button> |
19 </form> | 19 </form> |
20 <div id="console"></div> | 20 <div id="console"></div> |
21 <script> | 21 <script> |
22 description("This test performs a check for the :valid CSS selector on various i
nput and button elements."); | 22 description("This test performs a check for the :valid CSS selector on various i
nput and button elements."); |
23 | 23 |
24 v = document.getElementsByName("victim"); | 24 v = document.getElementsByName("victim"); |
25 for (i = 0; i < v.length; i++) | 25 for (i = 0; i < v.length; i++) |
26 shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue
('background-color')", "'rgb(0, 255, 0)'"); | 26 shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue
('background-color')", "'rgb(0, 255, 0)'"); |
27 </script> | 27 </script> |
28 </body> | 28 </body> |
29 </html> | 29 </html> |
OLD | NEW |