mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision b'4435c35d9085ed2be61e64d0093b8e1b0e7a877b'
This commit is contained in:
parent
901b76297d
commit
4031d79cea
383 changed files with 8858 additions and 2734 deletions
|
@ -23,6 +23,7 @@ div {
|
|||
}
|
||||
#hidden {
|
||||
background: red;
|
||||
view-transition-name: hidden;
|
||||
}
|
||||
|
||||
html::view-transition-group(hidden) { animation-duration: 300s; }
|
||||
|
|
|
@ -34,7 +34,7 @@ html::view-transition-image-pair(hidden) { opacity: 0; }
|
|||
html::view-transition-group(before) { animation-duration: 0s; }
|
||||
html::view-transition-image-pair(before) { filter: invert(1); }
|
||||
html::view-transition-new(before) { animation-duration: 0s; }
|
||||
html::view-transition-old(*) { animation-duration: 0s; }
|
||||
html::view-transition-old(before) { animation-duration: 0s; }
|
||||
|
||||
html::view-transition-group(after) { animation-duration: 0s; }
|
||||
html::view-transition-image-pair(after) { filter: invert(1); }
|
||||
|
@ -55,13 +55,12 @@ html::view-transition { background: lightpink; }
|
|||
async function runTest() {
|
||||
hidden.style.viewTransitionName = "hidden";
|
||||
before.style.viewTransitionName = "before";
|
||||
document.startViewTransition(() => {
|
||||
let transition = document.startViewTransition(() => {
|
||||
before.remove();
|
||||
hidden.style.viewTransitionName = "";
|
||||
after.style.viewTransitionName = "after";
|
||||
|
||||
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot))
|
||||
});
|
||||
transition.ready.then(() => requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));
|
||||
}
|
||||
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
|
||||
</script>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
::view-transition-group(*) {
|
||||
background-color: inherit;
|
||||
color: blue;
|
||||
animation-duration: 0.321s;
|
||||
}
|
||||
|
||||
::view-transition-image-pair(*) {
|
||||
|
@ -36,12 +37,16 @@ promise_test(() => {
|
|||
|
||||
assert_equals(getComputedStyle(document.documentElement, ":view-transition-group(root)").backgroundColor, "rgb(255, 0, 0)", "group");
|
||||
assert_equals(getComputedStyle(document.documentElement, ":view-transition-group(root)").color, "rgb(0, 0, 255)", "group");
|
||||
assert_equals(getComputedStyle(document.documentElement, ":view-transition-group(root)").animationDuration, "0.321s", "group");
|
||||
|
||||
assert_equals(getComputedStyle(document.documentElement, ":view-transition-image-pair(root)").color, "rgb(0, 0, 255)", "wrapper");
|
||||
assert_equals(getComputedStyle(document.documentElement, ":view-transition-image-pair(root)").overflowX, "clip", "wrapper");
|
||||
assert_equals(getComputedStyle(document.documentElement, ":view-transition-image-pair(root)").animationDuration, "0.321s", "wrapper");
|
||||
|
||||
assert_equals(getComputedStyle(document.documentElement, ":view-transition-old(root)").overflowX, "clip", "outgoing");
|
||||
assert_equals(getComputedStyle(document.documentElement, ":view-transition-old(root)").animationDuration, "0.321s", "outgoing");
|
||||
assert_equals(getComputedStyle(document.documentElement, ":view-transition-new(root)").overflowX, "clip", "incoming");
|
||||
assert_equals(getComputedStyle(document.documentElement, ":view-transition-new(root)").animationDuration, "0.321s", "incoming");
|
||||
});
|
||||
await transition.finished;
|
||||
resolve();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue