1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../js/resources/js-test-pre.js"></script>
6 :invalid { background: lime; }
7 :valid { background: red; }
8 input { background: blue; }
12 <p id="description"></p>
14 <input type="text" required disabled/>
15 <input name="victim" type="text" value="Loremipsum" pattern="Lorem ipsum"/>
17 <div id="console"></div>
19 description("This test checks that an input element that doesn't validate and an invalid input don't share style.");
21 v = document.getElementsByTagName("input");
23 shouldBe("document.defaultView.getComputedStyle(v[0], null).getPropertyValue('background-color')", "'rgb(0, 0, 255)'");
24 shouldBe("document.defaultView.getComputedStyle(v[1], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'");
26 <script src="../js/resources/js-test-post.js"></script>