skip-another-top-level-browsing-context.html (600B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script src="resources/utils.js"></script> 5 <script> 6 'use strict'; 7 8 promise_test(async () => { 9 let w = window.open('resources/moving-autofocus-to-parent.html'); 10 await waitForLoad(w); 11 await waitUntilStableAutofocusState(w); 12 assert_equals(w.document.activeElement, w.document.body); 13 assert_equals(document.activeElement, document.body); 14 w.close(); 15 }, 'Autofocus elements queued in another top-level browsing context\'s ' + 16 'documents should be skipped.'); 17 </script>