testing/web-platform/tests/css/css-overflow/scroll-marker-focus-scroll-crash.html
author Florian Quèze <florian@queze.net>
Tue, 08 Jul 2025 20:48:53 +0000 (9 hours ago)
changeset 795809 b01190f141a12f4b506acb1f4476561c4b0f2407
parent 791081 05513e62f57743d36f1c37758047636dc3e56c0a
permissions -rw-r--r--
Bug 1960567 - remove the last C++ and scriptable APIs to accumulate data to legacy telemetry histograms, r=chutten. Differential Revision: https://phabricator.services.mozilla.com/D255582
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<link rel="help" href="crbug.com/421471058">
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
  body {
    margin: 0;
  }

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

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

  #scroller::scroll-marker-group {
    height: 20px;
    width: 200px;
  }

  #scroller div::scroll-marker {
    content: "Marker";
    width: 100px;
    height: 20px;
    display: inline-block;
  }

  #scroller::scroll-button(left) {
    content: "<";
  }
</style>
<div id="scroller">
  <div></div>
  <div></div>
</div>
<script>
  async function run() {
    const kTab = '\uE004';
    await new test_driver.Actions()
      .keyDown(kTab)
      .keyUp(kTab)
      .send();
    // With a focused scroll marker, scroll to next target.
    document.querySelector('#scroller').scrollLeft = 600;
    document.documentElement.classList.remove('reftest-wait');
  }
  run();
</script>

</html>