tor-browser

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

chrome-object-tab-focus-bug.html (1455B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Tabbing through object tag</title>
      4 <link rel="author" title="atotic@chromium.org">
      5 <link rel="help" href="https://crbug.com/1132895">
      6 <meta assert="assert" content="Tabbed focus works through OBJECT tags">
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <script src="/resources/testdriver.js"></script>
     10 <script src="/resources/testdriver-vendor.js"></script>
     11 
     12 <p>Pressing TAB twice should focus/highlight end checkbox</p>
     13 
     14 <input type="checkbox" id="start">start</a>
     15 <object type='text/html' data='data:text/html,' width='16' height='16'></object>
     16 <input type="checkbox" id="end" >end</a>
     17 
     18 <script>
     19 
     20 let t = async_test("focus advances with tab key thorough object element");
     21 
     22 let start = document.querySelector("#start");
     23 let object = document.querySelector("object");
     24 let end = document.querySelector("#end");
     25 let tab = "\uE004";
     26 
     27 t.step( _ => {
     28  document.querySelector("#start").focus();
     29  assert_equals(document.activeElement, start, "start got focus");
     30  test_driver.send_keys(document.activeElement, tab).then( _ => {
     31    t.step( _ => {
     32      assert_equals(document.activeElement, object, "object got focus");
     33      test_driver.send_keys(document.activeElement, tab).then( _ => {
     34        t.step( _ => {
     35          assert_equals(document.activeElement, end, "end got focus");
     36          t.done();
     37        });
     38      });
     39    });
     40  });
     41 });
     42 
     43 </script>