Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!doctype html>
<meta charset="utf-8">
<title>CSS Overflow Test: ::scroll-marker-group supports hover</title>
<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>
body {
margin: 0;
}
#scroller {
overflow: auto;
scroll-marker-group: before;
&::scroll-marker-group {
background: red;
height: 100px;
width: 100px;
}
&::scroll-marker-group:hover {
background: green;
}
}
</style>
<div id="scroller"></div>
<script>
promise_test(async t => {
assert_equals(getComputedStyle(scroller, "::scroll-marker-group").backgroundColor, "rgb(255, 0, 0)", "::scroll-marker-group is unhovered");
const watcher = new EventWatcher(t, scroller, 'mouseover');
const waitMouseover = watcher.wait_for('mouseover');
await new test_driver.Actions()
.pointerMove(15, 15)
.send();
await waitMouseover;
assert_equals(getComputedStyle(scroller, "::scroll-marker-group").backgroundColor, "rgb(0, 128, 0)", "::scroll-marker-group is hovered");
});
</script>