forked from mirrors/gecko-dev
Automatic update from web-platform-tests Rework keyframes-remove-documentElement-crash.html to not use testharness.js (#21052) Previously this test would fail when loaded locally as the testharness.js cleanup code would try to access document.documentElement, which had been removed. Instead, use the crashtest support (https://web-platform-tests.org/writing-tests/crashtest.html). Fixes #20020 -- wpt-commits: 12f1eb104c6b5036f133778113adac50f7bca2bf wpt-pr: 21052
28 lines
728 B
HTML
28 lines
728 B
HTML
<!doctype html>
|
|
<html class="test-wait">
|
|
<title>CSS Animations Test: Chrome crash when removing documentElement and @keyframes stylesheet</title>
|
|
<link rel="help" href="https://crbug.com/999522">
|
|
<style>
|
|
@keyframes anim {
|
|
from { color: pink }
|
|
to { color: purple }
|
|
}
|
|
div {
|
|
animation: notfound 1s;
|
|
}
|
|
</style>
|
|
<div></div>
|
|
<script>
|
|
window.addEventListener('load', () => {
|
|
document.body.offsetTop;
|
|
document.querySelector("style").remove();
|
|
// We need the root later to remove the test-wait class.
|
|
const root = document.documentElement;
|
|
document.documentElement.remove();
|
|
|
|
// rAF to make sure that style runs.
|
|
requestAnimationFrame(() => {
|
|
root.classList.remove('test-wait');
|
|
});
|
|
});
|
|
</script>
|