1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
6 :valid { background: red; }
7 :invalid { background: red; }
8 textarea { background: lime; }
12 <p id=
"description"></p>
14 <textarea name=
"victim" readonly
>Lorem ipsum
</textarea>
15 <textarea name=
"victim" disabled
>Lorem ipsum
</textarea>
17 <div id=
"console"></div>
19 description("This test performs a check for the :valid/:invalid CSS selector on textarea elements where it shouldn't be applied.");
21 v
= document
.getElementsByName("victim");
22 for (i
= 0; i
< v
.length
; i
++)
23 shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue('background-color')", "'rgb(0, 255, 0)'");