tor-browser

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

simulated-click-inert.html (1325B)


      1 <!DOCTYPE html>
      2 <link rel=author href="mailto:jarhar@chromium.org">
      3 <link rel=author href="mailto:falken@chromium.org">
      4 <link rel=help href="https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element">
      5 <link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=241699">
      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-actions.js"></script>
     10 <script src="/resources/testdriver-vendor.js"></script>
     11 
     12 <p>Ensure that simulated click is still dispatched to an inert node.
     13 To test manually, click the CLICK ME label and verify it does change the value of the checkbox.</p>
     14 <div>
     15 </div>
     16 <input type="checkbox" id="target">
     17 <dialog><label for="target">CLICK ME</label></dialog>
     18 
     19 <script>
     20 promise_test(async () => {
     21  async function clickOn(element) {
     22    const actions = new test_driver.Actions()
     23      .pointerMove(0, 0, {origin: element})
     24      .pointerDown()
     25      .pointerUp()
     26    await actions.send();
     27  }
     28 
     29  document.querySelector('dialog').showModal();
     30  await clickOn(document.querySelector('label'));
     31  assert_true(document.getElementById('target').checked);
     32 }, 'Ensure that simulated click is still dispatched to an inert node.');
     33 </script>