Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / readonly-pseudoclass-opera-003.html
blob09fcc86b1d289a6fadbf7edc7d80decfbdf3bdfe
1 <html>
2 <head>
3 <title>"readonly" and elements it does not apply to</title>
4 <style>
5 input:read-only { background:red }
6 input { display: none }
7 select:read-only { background:red }
8 select { display: none }
9 button:read-only { background:red }
10 button { display: none }
11 </style>
12 <link rel="help" href="http://whatwg.org/specs/web-forms/current-work/#readonly">
13 <link rel="help" href="http://whatwg.org/specs/web-forms/current-work/#relation">
14 <script language="JavaScript" type="text/javascript">
15 function log(message) {
16 document.getElementById("console").innerHTML += "<li>"+message+"</li>";
19 function test() {
20 if (window.testRunner)
21 testRunner.dumpAsText();
23 var i = document.getElementsByName("victim");
24 for (c = 0; c < i.length; c++) {
25 if (document.defaultView.getComputedStyle(i[c], null).getPropertyValue('display') == "none")
26 log(c + ": SUCCESS");
27 else
28 log(c + ": FAILURE");
31 </script>
32 </head>
33 <body onload="test()">
34 <p>:read-only doesn't apply to following controls. Fails if FAILURE is shown somewhere.</p>
35 <input name="victim" type="radio" readonly>
36 <input name="victim" type="file" readonly>
37 <input name="victim" type="range" readonly disabled>
38 <input name="victim" type="button" readonly>
39 <input name="victim" type="submit" readonly>
40 <input name="victim" type="reset" readonly>
41 <select name="victim" readonly></select>
42 <button name="victim" readonly></button>
43 <button name="victim" readonly type="reset"></button>
44 <button name="victim" readonly type="submit"></button>
45 <hr>
46 <ol id="console"></ol>
47 </body>
48 </html>