fune/testing/web-platform/tests/css/css-view-transitions/root-element-display-none-during-transition-crash.html
Tim Nguyen c9339acefd Bug 1893561 [wpt PR 45924] - Fix some view transitions crashtests, a=testonly
Automatic update from web-platform-tests
Fix some view transitions crashtests (#45924)

They are currently written as reftests with reftest-wait and friends, convert them to use test-wait.
--

wpt-commits: 6ae7875d4162f8178de4bdce3da56887bce673e4
wpt-pr: 45924
2024-04-30 08:01:03 +00:00

27 lines
745 B
HTML

<!DOCTYPE html>
<html class=test-wait>
<title>View transitions: entry animation from root display none</title>
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
<link rel="author" href="mailto:vmpstr@chromium.org">
<style>
.hidden {
display: none;
}
::view-transition-group(*) {
animation-duration: 500s
}
</style>
<script>
async function runTest() {
transition = document.startViewTransition();
transition.ready.then(() => {
requestAnimationFrame(() => {
document.documentElement.classList.toggle("hidden");
});
});
transition.finished.then(() => document.documentElement.classList.remove("test-wait"));
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>