summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/autofocus-in-sandbox-with-allow-scripts.html
blob: 9f1e6cc902b6178ab6b11cc3a367ced904622ed4 (plain)
1
2
3
4
5
6
7
8
9
10
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}
</script>
This test passes if the activeElement is the input element rather than the body
(which it would be if the sandbox didn't allow autofocus although allow-scripts flag is set).
<iframe sandbox="allow-scripts"
    src="data:text/html,<input autofocus onfocus='console.log(document.activeElement.tagName); testRunner.notifyDone();'>"></iframe>