tor-browser

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

nnn-popovers.html (1235B)


      1 <!DOCTYPE html>
      2 <link rel=author href="mailto:jarhar@chromium.org">
      3 <link rel=help href="https://github.com/whatwg/html/pull/9462">
      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 <script src="/resources/testdriver-actions.js"></script>
      9 <script src="../resources/helpers.js"></script>
     10 
     11 <button id=b0>b0</button>
     12 
     13 <div id=p1 popover=auto>
     14  <button id=b1>b1</button>
     15 
     16  <div id=p2 popover=auto>
     17    <button id=b2>b2</button>
     18 
     19    <div id=p3 popover=auto>p3</div>
     20  </div>
     21 </div>
     22 
     23 <script>
     24 promise_test(async () => {
     25  p1.showPopover();
     26  p2.showPopover();
     27  p3.showPopover();
     28  assert_true(p1.matches(':popover-open'), 'p1 should be open.');
     29  assert_true(p2.matches(':popover-open'), 'p2 should be open.');
     30  assert_true(p3.matches(':popover-open'), 'p3 should be open.');
     31 
     32  await sendCloseRequest();
     33  assert_false(p1.matches(':popover-open'), 'p1 should be closed.');
     34  assert_false(p2.matches(':popover-open'), 'p2 should be closed.');
     35  assert_false(p3.matches(':popover-open'), 'p3 should be closed.');
     36 }, 'Create three popovers without user activation');
     37 </script>