Update web-platform-tests to revision b'4a4653e088039aec186d6dc1d488120d77695c3a'

This commit is contained in:
WPT Sync Bot 2022-12-11 01:16:53 +00:00
parent 470a50ab60
commit 6337336fab
1043 changed files with 19705 additions and 6973 deletions

View file

@ -50,6 +50,8 @@ div { box-sizing: border-box; will-change: transform }
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
function runTest() {
document.startViewTransition(() => {
wrapper.classList.toggle("wrap_perspective");

View file

@ -51,6 +51,8 @@ div { box-sizing: border-box; will-change: transform }
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
function runTest() {
document.startViewTransition(() => {
wrapper.classList.toggle("wrap_perspective");

View file

@ -43,6 +43,8 @@ html::view-transition-old(target) { animation: unset; opacity: 1; }
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(takeScreenshot);

View file

@ -65,6 +65,8 @@ html::view-transition { background: pink }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
lockme.classList.add("locked");
document.startViewTransition(() => {

View file

@ -54,6 +54,8 @@ html::view-transition-new(target1) { animation: unset; opacity: 1; }
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
scrollblue.scrollIntoView();

View file

@ -61,6 +61,8 @@ html::view-transition-new(root) { animation: unset; opacity: 1; height: 100%; }
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
// Add a shared element to ensure its bounds don't expand the root snapshot

View file

@ -57,6 +57,8 @@ html::view-transition-new(target2) { animation: unset; opacity: 1; }
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
target1.style = "";

View file

@ -53,6 +53,8 @@ html::view-transition-new(target) { animation: unset; opacity: 0; }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
// Remove the target to ensure the ref is compared against the snapshot.

View file

@ -47,6 +47,8 @@ html::view-transition-old(target) { animation: unset; opacity: 0; }
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
let t = document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -48,6 +48,8 @@ html::view-transition-new(target) { animation: unset; opacity: 0; }
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -95,6 +95,8 @@ html::view-transition { background: lightpink; }
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
const f = document.createElement("div");

View file

@ -81,6 +81,8 @@ html::view-transition { background: lightpink; }
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -61,6 +61,8 @@ html::view-transition { background: lightpink; }
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
left.classList.remove("left-tag");

View file

@ -56,6 +56,8 @@ html::view-transition-new(backdrop), html::view-transition-new(dialog) {
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
const transition = document.startViewTransition(() => {
target.showModal();

View file

@ -56,6 +56,8 @@ html::view-transition-old(backdrop), html::view-transition-old(dialog) {
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
target.showModal();
const transition = document.startViewTransition(() => {

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: duplicate tags in the old DOM skip the transition</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -21,6 +21,7 @@ div {
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise((resolve, reject) => {
first.style = "view-transition-name: target";
second.style = "view-transition-name: target";

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: duplicate tags in the new DOM skip the transition</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -21,6 +21,7 @@ div {
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise((resolve, reject) => {
first.style = "view-transition-name: target";
let transition = document.startViewTransition(() => {

View file

@ -56,6 +56,8 @@
<div class="hidden"></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
document.getElementsByClassName("target")[0].style.background="lightgreen";

View file

@ -35,6 +35,7 @@ html::view-transition-image-pair(*) {
<div id=first></div>
<script>
async_test(t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
let names = [];
document.documentElement.addEventListener("animationstart", (e) => {
names.push(e.pseudoElement);

View file

@ -66,6 +66,8 @@ html::view-transition { background: pink }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
content.remove();

View file

@ -52,6 +52,7 @@ html::view-transition-new(shared) {
<script>
async_test(t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
document.startViewTransition(() => {
target.classList.toggle("before");
target.classList.toggle("after");
@ -68,5 +69,4 @@ async_test(t => {
});
});
}, "hit test should not hit unpainted element, but does hit pseudo and unrelated elements");
</script>

View file

@ -46,6 +46,8 @@ html::view-transition-new(shared) {
<div id=target class=before></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
function mouseMoveToTarget(x, y) {
return new test_driver.Actions().pointerMove(x, y).send();
}

View file

@ -53,6 +53,8 @@ html::view-transition-new(shared) {
<div id=unrelated></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
function mouseMoveToTarget(x, y) {
return new test_driver.Actions().pointerMove(x, y).send();
}

View file

@ -13,6 +13,8 @@ iframe { width: 500px; height: 500px }
</style>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
addEventListener("message", takeScreenshot);
</script>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<title>View transitions: inline child with filter (ref)</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:vmpstr@chromium.org">
<style>
body { margin : 0; }
#target {
width: 100px;
height: 100px;
background-color: grey;
overflow-clip-margin: 40px;
contain: paint;
view-transition-name: target;
}
#child {
position: relative;
left: 100px;
top: 100px;
color: lightgreen;
background-color: darkgreen;
filter: blur(30px);
}
</style>
<div id="target">
<span id="child">INLINEBOX</span>
</div>

View file

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html class=reftest-wait>
<title>View transitions: inline child with filter</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:vmpstr@chromium.org">
<link rel="match" href="inline-child-with-filter-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
body { margin : 0; }
#target {
width: 100px;
height: 100px;
background-color: grey;
overflow-clip-margin: 40px;
contain: paint;
view-transition-name: target;
}
#child {
position: relative;
left: 100px;
top: 100px;
color: lightgreen;
background-color: darkgreen;
filter: blur(30px);
}
html::view-transition-container(root) { animation-duration: 300s; }
html::view-transition-old(target) {
animation: unset;
opacity: 1;
}
html::view-transition-new(target) {
animation: unset;
opacity: 0;
}
</style>
<div id="target">
<span id="child">INLINEBOX</span>
</div>
<script>
async function runTest() {
let transition = document.startViewTransition(async () => {
document.getElementById("target").remove();
});
transition.ready.then(() => requestAnimationFrame(takeScreenshot));
}
onclick = requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>Shared transitions: ensure input is discarded when rendering is suppressed</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -58,6 +58,7 @@ async function runTest(resolve, reject) {
}
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
// Dispatch an event before starting the test to finish init logic in
// synthetic input dispatch.

View file

@ -73,6 +73,8 @@ html::view-transition { background: lightpink; }
<div id=three class="shared rl">T</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
one.remove();

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>SET: Blend modes are set up only in paired transitions</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:vmpstr@chromium.org">
@ -25,6 +25,7 @@ div {
<script>
async_test(t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
let transition = document.startViewTransition(() => {
first.classList.toggle("tagone");
second.classList.toggle("tagtwo");

View file

@ -36,6 +36,8 @@ html::view-transition { background: lightpink; }
</style>
<div id=target class=box><div class=inner_overflow>X</div></div>
<script>
failIfNot(document.startViewTransition, "Reference missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -38,6 +38,8 @@ html::view-transition { background: lightpink; }
</style>
<div id=target class=box><div class=inner_overflow>X</div></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
let t = document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -35,6 +35,8 @@ html::view-transition { background: lightpink; }
</style>
<div id=e1 class=box></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
let t = document.startViewTransition(() => {
e1.classList.add("dst");

View file

@ -49,6 +49,8 @@ html::view-transition { background: lightpink; }
<div id=e2 class=box>two</div>
<div id=e3 class=box>three</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
let t = document.startViewTransition(() => {
e1.classList.add("dst");

View file

@ -32,6 +32,8 @@ html::view-transition { background: lightpink; }
<div id=e2 class=box></div>
<div id=e3 class=box></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
let t = document.startViewTransition(() => {
e1.classList.add("dst");

View file

@ -38,6 +38,8 @@ html::view-transition-new(root) { animation-duration: 0s; opacity: 1 }
<div id=e1 class=box></div>
<div id=shared></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
let t = document.startViewTransition(() => {
e1.classList.add("dst");

View file

@ -66,6 +66,8 @@ html::view-transition { background: lightpink; }
<div class=rl><div id=three class=shared>T</div></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
s1.style = "view-transition-name: s1";
s2.style = "view-transition-name: s2";

View file

@ -70,6 +70,8 @@ html::view-transition { background: lightpink; }
<div id=three class="rl shared">T</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
s1.style = "view-transition-name: s1";
s2.style = "view-transition-name: s2";

View file

@ -46,6 +46,8 @@
<div></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
// Ensure a root snapshot captured in the absence of scrollbars is displayed at
// full size when rendered in the incoming viewport which is inset by
// scrollbars. The content must not be scaled-to-fit.

View file

@ -55,6 +55,8 @@ html::view-transition { background: lightpink; }
<div id=target2 class=box></div>
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -46,6 +46,8 @@ html::view-transition { background: lightpink; }
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
source.style = "view-transition-name: shared";
document.startViewTransition(() => {

View file

@ -65,6 +65,8 @@ html::view-transition { background: lightpink; }
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -58,6 +58,8 @@ html::view-transition { background: lightpink; }
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -82,6 +82,8 @@ html::view-transition { background: lightpink; }
</svg>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -71,6 +71,8 @@ html::view-transition { background: lightpink; }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -56,6 +56,8 @@ html::view-transition { background: lightpink; }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -56,6 +56,8 @@ html::view-transition { background: lightpink; }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -49,6 +49,8 @@ html::view-transition { background: lightpink; }
<div id=target class="shared src"><div class=inner></div></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
let t = document.startViewTransition(() => {
target.classList.remove("src");

View file

@ -45,6 +45,8 @@ html::view-transition { background: lightpink; }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -40,6 +40,8 @@ html::view-transition { background: lightpink; }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -52,6 +52,8 @@ html::view-transition { background: lightpink; }
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
hidden.style.viewTransitionName = "hidden";
before.style.viewTransitionName = "before";

View file

@ -56,6 +56,8 @@ html::view-transition-old(root) { animation: unset; opacity: 0; }
<div id=two class=shared></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
target.remove();

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: transition skipped if no containment on new element after animation started</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -25,6 +25,7 @@ html::view-transition-group(target) {
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition();
await transition.domUpdated;

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: transition skipped if no containment on new element</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -21,6 +21,7 @@ div {
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition(() => {
first.style.contain = "none";

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: transition skipped if no containment on old element</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -20,6 +20,7 @@ div {
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition(() => {
first.style.contain = "paint";

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>Shared transitions: author styles ignored during prepare</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -33,6 +33,7 @@ function validate_background(pseudoString) {
}
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise((resolve, reject) => {
document.startViewTransition(() => {
resolve();

View file

@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta name="timeout" content="long">
<html class=reftest-wait>
<html>
<title>Shared transitions: CSS Animations are paused while render-blocked</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -34,6 +34,7 @@ div {
let renderBlocked = true;
promise_test(() => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
requestAnimationFrame(() => {
document.startViewTransition(() => {

View file

@ -1,6 +1,6 @@
<!DOCTYPE html>
<meta name="timeout" content="long">
<html class=reftest-wait>
<html>
<title>Shared transitions: rAF is not issued while render-blocked</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -24,6 +24,7 @@ div {
let renderBlocked = true;
promise_test(() => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
requestAnimationFrame(() => {
document.startViewTransition(() => {

View file

@ -43,6 +43,8 @@ This text should appear unmodified, since the root isn't captured.
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -36,6 +36,8 @@ This text should appear unmodified, since the root isn't captured.
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -58,6 +58,8 @@ html::view-transition-new(target) {
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -60,6 +60,8 @@ html::view-transition-old(target) {
<div id=hidden class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -33,6 +33,8 @@ html::view-transition { background: lightpink; }
</style>
<div id=e1 class=box></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
e1.classList.add("dst");

View file

@ -49,6 +49,8 @@ html::view-transition { background: lightpink; }
<div id=e2 class=box>two</div>
<div id=e3 class=box>three</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
e1.classList.add("dst");

View file

@ -33,6 +33,8 @@ html::view-transition { background: lightpink; }
<div id=e2 class=box>two</div>
<div id=e3 class=box>three</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
e1.classList.add("dst");

View file

@ -38,6 +38,8 @@ html::view-transition-new(root) { animation: unset; opacity: 0 }
<div id=e1 class=box></div>
<div id=shared></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
e1.classList.add("dst");

View file

@ -73,6 +73,8 @@ html::view-transition { background: lightpink; }
<div class=rl><div id=three class=shared>T</div></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
one.remove();

View file

@ -73,6 +73,8 @@ html::view-transition { background: lightpink; }
<div id=three class="shared rl">T</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
one.remove();

View file

@ -43,6 +43,8 @@
<div></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
// Ensure a root snapshot captured on a page with scrollbars uses the full
// viewport size (including scrollbars). Areas obscured by scrollbars should be
// filled with background and content; the snapshot should not be scaled-to-fit.

View file

@ -55,6 +55,8 @@ html::view-transition { background: lightpink; }
<div id=target2 class=box></div>
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -45,6 +45,8 @@ html::view-transition { background: lightpink; }
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
empty.style.viewTransitionName = "shared";
document.startViewTransition(() => {

View file

@ -65,6 +65,8 @@ html::view-transition { background: lightpink; }
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -58,6 +58,8 @@ html::view-transition { background: lightpink; }
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -83,6 +83,8 @@ html::view-transition { background: lightpink; }
</svg>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -72,6 +72,8 @@ html::view-transition { background: lightpink; }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -55,6 +55,8 @@ html::view-transition { background: lightpink; }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -45,6 +45,8 @@ html::view-transition { background: lightpink; }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -40,6 +40,8 @@ html::view-transition { background: lightpink; }
</div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() =>
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));

View file

@ -57,6 +57,8 @@ html::view-transition-old(root) { animation: unset; opacity: 1; }
<div id=two class=shared></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
one.remove();

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: computed style on pseudo-element stays in sync with the DOM element</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -21,6 +21,7 @@ div {
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition();
await transition.domUpdated;

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>Shared transitions: check pseudo element's display property</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:vmpstr@chromium.org">
@ -24,6 +24,7 @@ div {
<script>
promise_test(() => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition(() => {
assert_equals(getComputedStyle(document.documentElement, ":view-transition").position, "fixed", ":view-transition");
@ -54,6 +55,7 @@ promise_test(() => {
}, "position property of pseudo elements");
promise_test(() => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition(() => {
assert_equals(getComputedStyle(document.documentElement, ":view-transition").position, "fixed");

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>Shared transitions: promise resolution ordering</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:vmpstr@chromium.org">
@ -24,6 +24,7 @@ div {
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise((resolve, reject) => {
let dom_change_ran = false;
let transition = document.startViewTransition(() => {

View file

@ -43,6 +43,8 @@ html::view-transition-image-pair(root) { visibility: hidden; }
<div id=e1 class=box></div>
<div id=shared></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
e1.classList.add("dst");

View file

@ -50,6 +50,8 @@ html::view-transition-old(*) {
<div id=first></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
await waitForAtLeastOneFrame();

View file

@ -47,6 +47,8 @@ html::view-transition-group(root) {
<div id=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
function flipClass() {
document.documentElement.classList.add("test");
requestAnimationFrame(takeScreenshot);

View file

@ -37,6 +37,8 @@ html::view-transition-old(*) { animation: unset; opacity: 1; }
<div class=hidden></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
document.documentElement.style.viewTransitionName = "none";

View file

@ -27,6 +27,8 @@ html::view-transition-old(*) { animation: unset; opacity: 0; }
<div id=box></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
document.documentElement.style.viewTransitionName = "none";

View file

@ -27,6 +27,8 @@ html::view-transition-old(*) { animation: unset; opacity: 1; }
<div id=box></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
document.documentElement.style.viewTransitionName = "none";

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<title>View transitions: set current time (reference)</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:vmpstr@chromium.org">
<style>
.target {
width: 100px;
height: 100px;
contain: layout;
background: blue;
opacity: 0.5;
}
</style>
<div class=target></div>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html class=reftest-wait>
<title>View transitions: set current time</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:vmpstr@chromium.org">
<script src="/common/reftest-wait.js"></script>
<style>
@keyframes move {
from {
transform: translate(500px);
}
}
#target {
width: 100px;
height: 100px;
contain: layout;
background: blue;
view-transition-name: target;
position: relative;
left: 100px;
animation-name: move;
animation-duration: 1s;
animation-timing-function: linear;
animation-play-state: paused;
}
</style>
<div id=target></div>
<script>
function runReference() {
document.getAnimations().forEach((animation) => {
animation.currentTime = 500;
});
takeScreenshot();
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runReference));
</script>

View file

@ -0,0 +1,61 @@
<!DOCTYPE html>
<html class=reftest-wait>
<title>View transitions: set current time</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:vmpstr@chromium.org">
<link rel="match" href="set-current-time-transform-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
:root { view-transition-name: unset; }
#target {
width: 100px;
height: 100px;
contain: layout;
background: blue;
view-transition-name: target;
position: relative;
}
.left {
left: 0;
}
.right {
left: 100px;
}
html::view-transition-group(*) {
animation: unset;
}
html::view-transition-old(*) {
animation: unset;
opacity: 0;
}
@keyframes move {
from {
transform: translate(500px);
}
}
html::view-transition-new(target) {
animation-name: move;
animation-duration: 1s;
animation-timing-function: linear;
animation-play-state: paused;
}
</style>
<div id=target class=left></div>
<script>
async function runTest() {
let transition = document.startViewTransition(() => target.classList.replace("left", "right"));
transition.ready.then(() => {
requestAnimationFrame(() => requestAnimationFrame(() => {
document.getAnimations().forEach((animation) => {
animation.currentTime = 500;
});
requestAnimationFrame(takeScreenshot);
}));
});
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>

View file

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html class=reftest-wait>
<title>View transitions: set current time</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:vmpstr@chromium.org">
<link rel="match" href="set-current-time-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
:root { view-transition-name: unset; }
.target {
width: 100px;
height: 100px;
contain: layout;
background: blue;
view-transition-name: target;
}
html::view-transition-group(*) {
animation: unset;
}
html::view-transition-old(*) {
animation: unset;
}
html::view-transition-new(target) {
animation-duration: 1s;
animation-timing-function: linear;
animation-play-state: paused;
}
</style>
<div id=target></div>
<script>
async function runTest() {
let transition = document.startViewTransition(() => target.classList.add("target"));
transition.ready.then(() => {
requestAnimationFrame(() => requestAnimationFrame(() => {
document.getAnimations().forEach((animation) => {
animation.currentTime = 500;
});
requestAnimationFrame(takeScreenshot);
}));
});
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>

View file

@ -34,6 +34,8 @@ html::view-transition-new(root) { animation: unset; opacity: 0 }
</style>
<div id=shared></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
async function runTest() {
document.startViewTransition(() => {
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot));

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: ensure correct style inheritance for pseudo tree</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -30,6 +30,7 @@
<script>
promise_test(() => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition();
transition.ready.then(() => {

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: skipTransition() invoked before a synchronous updateDOM callback is invoked</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -20,6 +20,7 @@ div {
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition(() => {
first.style.viewTransitionName = "target";

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: skipTransition() after animations have started running should resolve finished promise</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -25,6 +25,7 @@ div {
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition();
await transition.ready;

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: transition skipped in animation phase</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -25,6 +25,7 @@ div {
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition(() => {
let foo = bar;

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: validates that view-transition-name: unset or initial are ignored</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -35,6 +35,7 @@
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
let transition = document.startViewTransition();
await transition.domUpdated;

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: ensures view-transition-name is tracked on element added by script</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -22,6 +22,7 @@
</body>
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise((resolve, reject) => {
// Remove and add an uncontained element. Even though this element doesn't
// create a stacking context its verified during the transition.

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class=reftest-wait>
<html>
<title>View transitions: ensures view-transition-name is not tracked on element removed by script</title>
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
<link rel="author" href="mailto:khushalsagar@chromium.org">
@ -22,6 +22,7 @@
</body>
<script>
promise_test(async t => {
assert_implements(document.startViewTransition, "Missing document.startViewTransition");
return new Promise(async (resolve, reject) => {
// Remove an uncontained element. Because this element is not visited when
// discovering named elements, the transition is not skipped.

View file

@ -32,6 +32,8 @@ html::view-transition-old(*) {
<div id=first></div>
<div id=second></div>
<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
function setAnimation() {
document.documentElement.animate({ transform: ['translate(100px)', 'translate(100px)'] }, { duration: 10000, pseudoElement: '::view-transition-group(first)'});
document.documentElement.animate({ transform: ['translate(150px)', 'translate(150px)'] }, { duration: 10000, pseudoElement: '::view-transition-group(second)'});