tor-browser

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

select-tab-navigation.tentative.html (1117B)


      1 <!DOCTYPE html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <script src="/resources/testdriver.js"></script>
      5 <script src="/resources/testdriver-actions.js"></script>
      6 <script src="/resources/testdriver-vendor.js"></script>
      7 
      8 <input id="input1">
      9 <select id="select">
     10  <option>one</option>
     11  <option>two</option>
     12  <option>three</option>
     13 </select>
     14 <input id="input3">
     15 
     16 <style>
     17  select, ::picker(select) {
     18    appearance: base-select;
     19  }
     20 </style>
     21 
     22 <script>
     23 promise_test(async () => {
     24  const TAB_KEY = "\uE004";
     25 
     26  const input1 = document.getElementById("input1");
     27  const select = document.getElementById("select");
     28 
     29  input1.focus();
     30  assert_equals(document.activeElement.id, "input1", "input1 should be active");
     31 
     32  await test_driver.send_keys(input1, TAB_KEY);
     33  assert_equals(document.activeElement.id, "select", "select should be active");
     34 
     35  await test_driver.send_keys(select, TAB_KEY);
     36  assert_equals(document.activeElement.id, "input3", "input3 should be active");
     37 }, "Check that <select> occupies just one slot in tab navigation.");
     38 </script>