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 :invalid { background: lime; } | 6 :invalid { background: lime; } |
7 :valid { background: red; } | 7 :valid { background: red; } |
8 input { background: blue; } | 8 input { background: blue; } |
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 type="text" required disabled/> | 14 <input type="text" required disabled/> |
15 <input name="victim" type="text" value="Loremipsum" pattern="Lorem ipsum"/> | 15 <input name="victim" type="text" value="Loremipsum" pattern="Lorem ipsum"/> |
16 </form> | 16 </form> |
17 <div id="console"></div> | 17 <div id="console"></div> |
18 <script> | 18 <script> |
19 description("This test checks that an input element that doesn't validate and an
invalid input don't share style."); | 19 description("This test checks that an input element that doesn't validate and an
invalid input don't share style."); |
20 | 20 |
21 v = document.getElementsByTagName("input"); | 21 v = document.getElementsByTagName("input"); |
22 | 22 |
23 shouldBe("document.defaultView.getComputedStyle(v[0], null).getPropertyValue('ba
ckground-color')", "'rgb(0, 0, 255)'"); | 23 shouldBe("document.defaultView.getComputedStyle(v[0], null).getPropertyValue('ba
ckground-color')", "'rgb(0, 0, 255)'"); |
24 shouldBe("document.defaultView.getComputedStyle(v[1], null).getPropertyValue('ba
ckground-color')", "'rgb(0, 255, 0)'"); | 24 shouldBe("document.defaultView.getComputedStyle(v[1], null).getPropertyValue('ba
ckground-color')", "'rgb(0, 255, 0)'"); |
25 </script> | 25 </script> |
26 </body> | 26 </body> |
27 </html> | 27 </html> |
OLD | NEW |