fune/testing/web-platform/tests/css/css-view-transitions/update-callback-timeout.html
Tim Nguyen 8e92bc51b0 Bug 1889513 [wpt PR 45523] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=272117, a=testonly
Automatic update from web-platform-tests
WebKit export: [view-transitions] Add a timeout to the update callback (#45523)

https://bugs.webkit.org/show_bug.cgi?id=272117
--

wpt-commits: 8f153b13f5edeff614d450a2e2669fd3befaa125
wpt-pr: 45523
2024-04-10 09:26:20 +00:00

25 lines
1,004 B
HTML

<!DOCTYPE html>
<html>
<title>View transitions: Transition has implementation-defined timeout.</title>
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
const transition = document.startViewTransition(() => {
return new Promise(() => {});
});
transition.updateCallbackDone.then(() => {
assert_unreached();
});
transition.finished.then(() => {
assert_unreached();
});
await promise_rejects_dom(t, "TimeoutError", transition.ready);
}, "View transition should have an implementation-defined timeout on the update callback");
</script>
</body>
</html>