Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / readonly-pseudoclass-opera-005.html
blob06d77d1cc03612acae4f4eb3d88d8c14cc48eb39
1 <html>
2 <head>
3 <title>"readonly", :read-only and :read-write</title>
4 <style>
5 input { background: red; }
6 #i1:read-write { background: lime; }
7 #i2 { background: lime; }
8 #i2:read-only { background: red; }
9 #i3:read-write { background: lime; }
10 #i4:read-only { background: lime; }
11 #i5:read-only { background: lime; }
12 #i6:read-write { background: lime; }
14 </style>
15 <link rel="help" href="http://whatwg.org/specs/web-forms/current-work/#readonly">
16 <link rel="help" href="http://whatwg.org/specs/web-forms/current-work/#relation">
17 <script language="JavaScript" type="text/javascript">
18 function log(message) {
19 document.getElementById("console").innerHTML += "<li>"+message+"</li>";
22 function test() {
23 if (window.testRunner)
24 testRunner.dumpAsText();
26 document.getElementById('i3').removeAttribute('readonly');
27 document.getElementById('i4').readOnly = true;
28 document.getElementById('i5').setAttribute('readonly','readonly');
29 document.getElementById('i6').readOnly = false;
31 var i = document.getElementsByTagName("input");
32 for (c = 0; c < i.length; c++) {
33 if (document.defaultView.getComputedStyle(i[c], null).getPropertyValue('background-color') == "rgb(0, 255, 0)")
34 log(c + ": SUCCESS");
35 else
36 log(c + ": FAILURE");
39 </script>
40 </head>
41 <body onload="test()">
42 <p>This test checks for :read-only and :read-write right behavior along with readonly attribute. Fails if some FAILURE is shown below.</p>
44 <input id="i1"/>
45 <input type="radio" readonly="readonly" id="i2"/>
46 <input readonly="readonly" id="i3"/>
47 <input id="i4"/>
48 <input id="i5"/>
49 <input readonly="readonly" id="i6"/>
50 <hr>
51 <ol id="console"></ol>
52 </body>
53 </html>