Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / pseudo-required-optional-003.html
blobed26d74944a741209c24e0c5d60159d07bd2f7cf
1 <html>
2 <head>
3 <title>required/optional CSS pseudoclasses part 3</title>
4 <style>
5 input:required { background: lime; }
6 textarea:required { background: lime; }
7 input { background: red; }
8 textarea { background: red; }
9 </style>
10 <script language="JavaScript" type="text/javascript">
11 function log(message) {
12 document.getElementById("console").innerHTML += "<li>"+message+"</li>";
15 function test() {
16 if (window.testRunner)
17 testRunner.dumpAsText();
19 v = document.getElementsByName("victim");
21 for (i = 0; i < v.length; i++)
22 if (document.defaultView.getComputedStyle(v[i], null).getPropertyValue('background-color') == "rgb(0, 255, 0)")
23 log("SUCCESS");
24 else
25 log("FAILURE");
27 </script>
28 </head>
29 <body onload="test()">
30 <p>All controls should have a green background.</p>
31 <input name="victim" required />
32 <textarea name="victim" required disabled/></textarea>
33 <textarea name="victim" required readonly/></textarea>
34 <hr>
35 <ol id="console"></ol>
36 </body>
37 </html>