1
0
Fork 0
firefox/testing/web-platform/tests/scroll-animations/crashtests/scroll-timeline-completion-crash.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

42 lines
1 KiB
HTML

<!DOCTYPE html>
<title>This test passes if it does not crash</title>
<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/">
<script src="/web-animations/testcommon.js"></script>
<style>
@keyframes grow-progress {
from { background-color: green; }
to { background-color: red; }
}
#container {
overflow: scroll;
width: 100px;
height: 100px;
animation: grow-progress linear forwards;
animation-timeline: scroll(self);
}
#content {
width: 200px;
height: 200px;
}
</style>
<body onload="runTest()">
<div id="container">
<div id="content"></div>
</div>
<script>
async function runTest() {
const container = document.getElementById("container");
container.scrollTo(0, container.scrollHeight - container.clientHeight);
await waitForNextFrame();
const elem = document.getElementById("content");
elem.style.width = "0px";
elem.style.height = "0px";
await waitForNextFrame();
}
</script>