chromium/third_party/blink/web_tests/wpt_internal/css/css-overflow/scroll-buttons-activation.html

<!doctype html>
<meta charset="utf-8">
<title>CSS Test: ::scroll-next-button and ::scroll-prev-button box creation</title>
<link rel="help" href="https://github.com/flackr/carousel/tree/main/scroll-button">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
  * {
    margin: 0;
    padding: 0;
  }

  #scroller {
    width: 600px;
    height: 300px;
    overflow: auto;
    scroll-marker-group: after;
    white-space: nowrap;
  }

  #scroller div {
    background: green;
    display: inline-block;
    width: 600px;
    height: 270px;
  }

  #scroller :first-child {
    background: purple;
  }

  #scroller::scroll-marker-group {
    border: 3px solid black;
    padding: 5px;
    display: flex;
    height: 20px;
    width: 40px;
  }

  #scroller::scroll-next-button {
    content: ">";
    background: blue;
    display: flex;
    height: 20px;
    width: 20px;
    top: 0px;
    left: 0px;
    position: absolute;
    z-index: 99;
  }

  #scroller div::scroll-marker {
    content: "";
    width: 10px;
    height: 10px;
    background-color: blue;
    border-radius: 100%;
    display: inline-block;
  }
</style>
<div id="scroller">
  <div></div>
  <div></div>
</div>
<script>
  scroller.scrollLeft = 1;
  document.documentElement.offsetTop;

  promise_test(async t => {
    actions_promise = new test_driver.Actions()
    .pointerMove(5, 5)
    .pointerDown()
    .pointerUp()
    .send();
    await actions_promise;
    assert_equals(scroller.scrollLeft, 604);
  });
</script>