1
0
Fork 0
firefox/testing/web-platform/tests/css/css-overflow/scroll-button-disabled-no-focus.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

30 lines
935 B
HTML

<!doctype html>
<meta charset="utf-8">
<title>CSS Test: disabled ::scroll-button() shouldn't be focusable</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons">
<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>
div::scroll-button(inline-start) {
content: "";
background-color: green;
}
div::scroll-button(inline-start):focus {
background-color: red;
}
</style>
<div id="target"></div>
<script>
promise_test(async t => {
const kTab = '\uE004';
await new test_driver.Actions()
.keyDown(kTab)
.keyUp(kTab)
.send();
assert_equals(getComputedStyle(target, "::scroll-button(inline-start)").backgroundColor, "rgb(0, 128, 0)");
});
</script>