tor-browser

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

label-in-invoker.html (924B)


      1 <!DOCTYPE html>
      2 <link rel=author href="mailto:jarhar@chromium.org">
      3 <link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=1523168">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/resources/testdriver.js"></script>
      7 <script src="/resources/testdriver-vendor.js"></script>
      8 
      9 <button popovertarget=mypopover>
     10  <label>label</label>
     11 </button>
     12 <div id=mypopover popover=auto>popover</div>
     13 
     14 <script>
     15 promise_test(async() => {
     16  const label = document.querySelector('label');
     17  assert_false(mypopover.matches(':popover-open'),
     18    'Popover should be closed at the start of the test.');
     19  await test_driver.click(label);
     20  assert_true(mypopover.matches(':popover-open'),
     21    'The popover should be opened by clicking on the label.');
     22 }, 'Buttons with popovertarget should invoke targets even if there is a label in the button.');
     23 </script>