skip-not-fully-active.html (652B)
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 6 <iframe srcdoc="<input autofocus><script>window.frameElement.remove();</script>"></iframe> 7 8 <script> 9 'use strict'; 10 11 promise_test(async () => { 12 let iframe = document.querySelector('iframe'); 13 let iframeDocument = iframe.contentDocument; 14 await waitForLoad(window); 15 assert_not_equals(document.activeElement, iframe); 16 assert_equals(iframeDocument.activeElement, iframeDocument.body); 17 }, 'Autofocus element in not-fully-active document should be skipped while flusing.'); 18 </script>