mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Update web-platform-tests to revision b'4a4653e088039aec186d6dc1d488120d77695c3a'
This commit is contained in:
parent
470a50ab60
commit
6337336fab
1043 changed files with 19705 additions and 6973 deletions
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -66,6 +66,8 @@ html::view-transition { background: pink }
|
|||
</div>
|
||||
|
||||
<script>
|
||||
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
|
||||
|
||||
async function runTest() {
|
||||
document.startViewTransition(() => {
|
||||
content.remove();
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@ iframe { width: 500px; height: 500px }
|
|||
</style>
|
||||
|
||||
<script>
|
||||
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
|
||||
|
||||
addEventListener("message", takeScreenshot);
|
||||
</script>
|
||||
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -50,6 +50,8 @@ html::view-transition-old(*) {
|
|||
<div id=first></div>
|
||||
|
||||
<script>
|
||||
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
|
||||
|
||||
async function runTest() {
|
||||
await waitForAtLeastOneFrame();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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));
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)'});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue