tor-browser

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

does-not-move-when-outside-focusgroup.html (1224B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>HTML Test: focusgroup - Focus does not move when initially set on an element not included in the focusgroup.</title>
      4 <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
      5 <link rel="help" href="https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/Focusgroup/explainer.md">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <script src="/resources/testdriver.js"></script>
      9 <script src="/resources/testdriver-vendor.js"></script>
     10 <script src="/resources/testdriver-actions.js"></script>
     11 <script src="../resources/focusgroup-utils.js"></script>
     12 
     13 <div focusgroup="toolbar">
     14  <span id=item1 tabindex=0>item1</span>
     15  <span id=item2 tabindex=0>item2</span>
     16 </div>
     17 <span id=out tabindex=0>out</span>
     18 
     19 <script>
     20 
     21  promise_test(async t => {
     22    var out = document.getElementById("out");
     23 
     24    await focusAndKeyPress(out, kArrowUp);
     25    assert_equals(document.activeElement, out);
     26 
     27    await focusAndKeyPress(out, kArrowLeft);
     28    assert_equals(document.activeElement, out);
     29  }, "When the focus is set on an element outside of the focusgroup, an arrow keypress shouldn't move the focus at all.");
     30 
     31 </script>