mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision b'a3cb53d786edfd9106825e312866624150382075'
This commit is contained in:
parent
9acb9cc5cf
commit
40def0914a
549 changed files with 16001 additions and 1815 deletions
|
@ -0,0 +1,32 @@
|
|||
<!doctype html>
|
||||
<html class="reftest-wait">
|
||||
<title>dialog: close and re-add modal dialog during overlay transition</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay">
|
||||
<link rel="match" href="pass-dialog-ref.html">
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<dialog id="dialog1">PASS</dialog>
|
||||
<dialog id="dialog2">FAIL</dialog>
|
||||
<style>
|
||||
dialog::backdrop { background-color: black; }
|
||||
#dialog1 {
|
||||
transition-property: overlay, display;
|
||||
transition-duration: 100s;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const dialog1 = document.getElementById("dialog1");
|
||||
const dialog2 = document.getElementById("dialog2");
|
||||
|
||||
dialog1.showModal();
|
||||
dialog2.showModal();
|
||||
dialog1.close();
|
||||
requestAnimationFrame(() =>
|
||||
requestAnimationFrame(() => {
|
||||
// dialog1 no longer "in top layer" even if rendered in top-layer, should
|
||||
// be added as last top layer element.
|
||||
dialog1.showModal();
|
||||
takeScreenshot();
|
||||
})
|
||||
);
|
||||
</script>
|
|
@ -0,0 +1,37 @@
|
|||
<!doctype html>
|
||||
<title>dialog: overlay</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<dialog id="dialog"></dialog>
|
||||
<script>
|
||||
const dialog = document.getElementById("dialog");
|
||||
|
||||
test(() => {
|
||||
assert_equals(getComputedStyle(dialog).overlay, "none",
|
||||
"Computed overlay");
|
||||
// dialog::backdrop {} UA rule always sets overlay to 'auto' even if
|
||||
// ::backdrop pseudo is not generated. ::backdrop is only generated when the
|
||||
// dialog is in the top layer.
|
||||
assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "auto",
|
||||
"Computed overlay for ::backdrop");
|
||||
}, "dialog computed overlay initially 'none'");
|
||||
|
||||
test(() => {
|
||||
dialog.showModal();
|
||||
|
||||
assert_equals(getComputedStyle(dialog).overlay, "auto",
|
||||
"Computed overlay on open dialog");
|
||||
assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "auto",
|
||||
"Computed overlay for ::backdrop");
|
||||
|
||||
dialog.close();
|
||||
|
||||
assert_equals(getComputedStyle(dialog).overlay, "none",
|
||||
"Computed overlay on closed dialog");
|
||||
// ::backdrop is always overlay:auto. See comment above.
|
||||
assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "auto",
|
||||
"Computed overlay for ::backdrop");
|
||||
}, "Opening and closing a modal dialog changes computed overlay to 'auto' and back to 'none'");
|
||||
</script>
|
|
@ -0,0 +1,9 @@
|
|||
<!doctype html>
|
||||
<title>CSS Test Reference</title>
|
||||
<style>
|
||||
dialog::backdrop { background-color: black; }
|
||||
</style>
|
||||
<dialog id="dialog">PASS</dialog>
|
||||
<script>
|
||||
dialog.showModal();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue