3 <title>View transitions: transition skipped if no containment on old element
</title>
4 <link rel=
"help" href=
"https://www.w3.org/TR/css-view-transitions-1/">
5 <link rel=
"author" href=
"mailto:khushalsagar@chromium.org">
7 <script src=
"/resources/testharness.js"></script>
8 <script src=
"/resources/testharnessreport.js"></script>
15 view-transition-name: target;
22 promise_test(async t
=> {
23 assert_implements(document
.startViewTransition
, "Missing document.startViewTransition");
24 return new Promise(async (resolve
, reject
) => {
25 let transition
= document
.startViewTransition(() => {
26 first
.style
.contain
= "paint";
29 let readyRejected
= false;
30 transition
.ready
.then(reject
, () => { readyRejected
= true; });
32 let domUpdated
= false;
33 transition
.domUpdated
.then(() => { domUpdated
= true; }, reject
);
34 transition
.finished
.then(() => {
35 assert_true(readyRejected
, "ready not rejected");
36 assert_true(domUpdated
, "dom not updated");
38 if (window
.getComputedStyle(first
).contain
== "paint")
41 reject("dom update callback did not run");
45 }, "uncontained old element should skip the transition");