blob: c4f6108e8d88a22d31b4dc6cd4c5e533e23d0c36 [file] [log] [blame]
<html>
<head>
<title>&lt;input type="checkbox"&gt; and "readonly"</title>
<style>
input:read-only { background:red }
input { display:none }
</style>
<link rel="help" href="http://whatwg.org/specs/web-forms/current-work/#readonly">
<link rel="help" href="http://whatwg.org/specs/web-forms/current-work/#relation">
<script language="JavaScript" type="text/javascript">
function log(message) {
document.getElementById("console").innerHTML += "<li>"+message+"</li>";
}
function test() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var i = document.getElementById("victim");
if (document.defaultView.getComputedStyle(i, null).getPropertyValue('display') == "none")
log("SUCCESS");
else
log("FAILURE");
}
</script>
</head>
<body onload="test()">
<p>This test checks for :read-only right behavior on checkboxes. Fails if FAILURE is shown below.</p>
<p><input type="checkbox" id="victim" readonly/></p>
<hr>
<ol id="console"></ol>
</body>
</html>