Skip to content

Commit 51c4bf4

Browse files
BorisChioumoz-wptsync-bot
authored andcommitted
Update synchronous-callback-skipped-before-run.html to handle the DOM exception.
Per spec, if the phase of this view transition is not Done, we should have an "AbortError" DOMException when skipping the view transition. Also, we should avoid changing the style of `div` to make sure the test log is rendered correctly. Differential Revision: https://phabricator.services.mozilla.com/D239673 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1950517 gecko-commit: e793a94fab1a4827e0549a57bfa501e5a5494e36 gecko-reviewers: view-transitions-reviewers, emilio
1 parent 1f20089 commit 51c4bf4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

css/css-view-transitions/synchronous-callback-skipped-before-run.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<script src="/resources/testharnessreport.js"></script>
99

1010
<style>
11-
div {
11+
#first {
1212
width: 100px;
1313
height: 100px;
1414
background: blue;
@@ -26,6 +26,10 @@
2626
first.style.viewTransitionName = "target";
2727
});
2828
transition.skipTransition();
29+
// The phase of |transition| is not done, so skip the view transition with
30+
// an "AbortError" DOMException.
31+
// https://drafts.csswg.org/css-view-transitions-1/#ViewTransition-skipTransition
32+
await promise_rejects_dom(t, "AbortError", transition.ready);
2933
await transition.finished;
3034

3135
if (window.getComputedStyle(first).viewTransitionName == "target")

0 commit comments

Comments
 (0)