Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-overflow/scroll-marker-group-hover.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<title>CSS Overflow Test: ::scroll-marker-group supports hover</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker-group-pseudo">
<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>