tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / css / readonly-pseudoclass-opera-003.html
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>";
17     }
18
19     function test() {
20         if (window.layoutTestController)
21             layoutTestController.dumpAsText();
22
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");
29         }
30     }
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>