haikuwebkit/LayoutTests/fast/forms/autofocus-keygen.html

24 lines
591 B
HTML

<!DOCTYPE html><!-- webkit-test-runner [ KeygenElementEnabled=true ] -->
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
window.jsTestIsAsync = true;
function onLoad() {
shouldBe('document.activeElement', 'document.querySelector("keygen")');
shouldBe('document.activeElement.autofocus', 'true');
finishJSTest();
}
</script>
</head>
<body onload="onLoad();">
<keygen autofocus>
<pre id="console">
This tests whether the keygen element supports the autofocus attribute.
</pre>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>