blob: 556a5fe81b9b51e76de25b4d09d7d5e586623f5b [file] [log] [blame]
<html>
<head>
<title>test with multiple controls having "autofocus" set</title>
<style>
input, input#test:focus { background:lime }
input:focus, input#test { background:red }
</style>
<script src="resources/common.js"></script>
<script language="JavaScript" type="text/javascript">
function log(message) {
document.getElementById("console").innerHTML += "<li>"+message+"</li>";
}
function test() {
if (window.testRunner)
testRunner.dumpAsText();
if (document.activeElement == document.getElementById("test"))
log("SUCCESS");
else
log("FAILURE");
if (window.testRunner)
testRunner.notifyDone();
}
waitUntilLoadedAndAutofocused(test);
</script>
</head>
<body>
<p>All form controls below should have a green background:</p>
<p><input autofocus id="test">
<p><input autofocus>
<p><input autofocus>
<p><input>
<p><input autofocus>
<p><input>
<hr/>
<ol id="console"></ol>
</body>
</html>