tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

autofocus-in-not-fully-active-document.html (538B)


      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 <script>
      7 'use strict';
      8 
      9 promise_test(async () => {
     10  let doc = document.cloneNode(false);
     11  doc.appendChild(doc.createElement('html'))
     12  doc.firstChild.innerHTML = '<body><input autofocus/></body>';
     13  await waitUntilStableAutofocusState();
     14  assert_equals(doc.activeElement, doc.body);
     15 }, 'Autofocus element in not-fully-active document should not be queued.');
     16 </script>