Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / readonly-pseudoclass-opera-002.html
blobb38e9430fdca62bdd708d71226d88173e3568381
1 <html>
2 <head>
3 <title>&lt;input&gt; and "readonly"</title>
4 <style>
5 input:read-only { background:lime }
6 input { background:red }
7 </style>
8 <link rel="help" href="http://whatwg.org/specs/web-forms/current-work/#readonly">
9 <link rel="help" href="http://whatwg.org/specs/web-forms/current-work/#relation">
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 var i = document.getElementById("victim");
20 if (document.defaultView.getComputedStyle(i, null).getPropertyValue('background-color') == "rgb(0, 255, 0)")
21 log("SUCCESS");
22 else
23 log("FAILURE");
25 </script>
26 </head>
27 <body onload="test()">
28 <p>This test checks for :read-only right behavior. Fails if FAILURE is shown below.</p>
29 <p><input id="victim" readonly/></p>
30 <hr>
31 <ol id="console"></ol>
32 </body>
33 </html>