tor-browser

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

scroll-button-focus-active-element.html (1162B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Test: document.activeElement for ::scroll-button is scroller</title>
      4 <link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="/resources/testdriver.js"></script>
      8 <script src="/resources/testdriver-actions.js"></script>
      9 <script src="/resources/testdriver-vendor.js"></script>
     10 <style>
     11  body {
     12    margin: 0;
     13  }
     14 
     15  #scroller {
     16    width: 600px;
     17    height: 300px;
     18    overflow: auto;
     19    white-space: nowrap;
     20  }
     21 
     22  #scroller div {
     23    display: inline-block;
     24    width: 600px;
     25    height: 270px;
     26  }
     27 
     28  #scroller::scroll-button(right) {
     29    content: ">";
     30    width: 100px;
     31    height: 20px;
     32    background-color: blue;
     33  }
     34 </style>
     35 <div id="scroller">
     36  <div></div>
     37  <div></div>
     38 </div>
     39 <script>
     40  promise_test(async t => {
     41    await new test_driver.Actions()
     42      .pointerMove(15, 310)
     43      .pointerDown()
     44      .pointerUp()
     45      .send();
     46    assert_equals(document.activeElement, scroller, "document.activeElement for ::scroll-button is scroller");
     47  });
     48 </script>