mirror of
https://github.com/servo/servo.git
synced 2025-08-13 09:25:32 +01:00
Update web-platform-tests to revision b'b7c1d80f991820c17aaae0477052c30d7f699eba'
This commit is contained in:
parent
189236862a
commit
274846e69e
217 changed files with 7520 additions and 2797 deletions
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<title>View transitions: ensure :only-child is supported on view-transition</title>
|
||||
<link rel="help" href="https://github.com/WICG/view-transitions">
|
||||
<link rel="author" href="mailto:khushalsagar@chromium.org">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<style>
|
||||
::view-transition {
|
||||
background-color: red;
|
||||
}
|
||||
::view-transition:only-child {
|
||||
background-color: blue;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
promise_test(() => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let transition = document.startViewTransition();
|
||||
transition.ready.then(() => {
|
||||
let style = getComputedStyle(
|
||||
document.documentElement, ":view-transition");
|
||||
if (style.backgroundColor == "rgb(255, 0, 0)")
|
||||
resolve();
|
||||
else
|
||||
reject(style.backgroundColor);
|
||||
});
|
||||
});
|
||||
}, ":only-child is not supported on view-transition");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue