tor-browser

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

focus-reverse-unassignable-slot.html (1068B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
      4 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1014868">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="/resources/testdriver.js"></script>
      8 <script src="/resources/testdriver-vendor.js"></script>
      9 <script src="/resources/testdriver-actions.js"></script>
     10 <script src="resources/shadow-dom.js"></script>
     11 <script src="resources/focus-utils.js"></script>
     12 
     13 <div>
     14  <template shadowrootmode=open>
     15    <slot></slot>
     16  </template>
     17  <slot>
     18    <input id=input1>
     19  </slot>
     20  <slot>
     21    <input id=input2>
     22  </slot>
     23 </div>
     24 
     25 <script>
     26 promise_test(async () => {
     27  input2.focus();
     28  assert_equals(document.activeElement, input2);
     29 
     30  await navigateFocusBackward();
     31  assert_equals(document.activeElement, input1);
     32 }, `Verifies that focusing backwards from an input inside a slot which has no shadow root goes to the previous focusable element in light DOM.`);
     33 </script>