blob: a26a44dbfb6e8c3eb81c7b216f9aa1c0da8bb9ed [file] [log] [blame]
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/utils.js"></script>
<script>
'use strict';
promise_test(async () => {
let doc = document.cloneNode(false);
doc.appendChild(doc.createElement('html'))
doc.firstChild.innerHTML = '<body><input autofocus/></body>';
await waitUntilStableAutofocusState();
assert_equals(doc.activeElement, doc.body);
}, 'Autofocus element in not-fully-active document should not be queued.');
</script>