mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Add slot default display style test (#37189)
Add `<slot>` default display style testcase Testing: Add a new testcase for slot element default disply style. Fixes: Add slot default display style test for #37174 --------- Signed-off-by: kongbai1996 <1782765876@qq.com> Signed-off-by: Fuguo <1782765876@qq.com> Co-authored-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
parent
871630606f
commit
5de3b5d166
2 changed files with 25 additions and 0 deletions
7
tests/wpt/meta/MANIFEST.json
vendored
7
tests/wpt/meta/MANIFEST.json
vendored
|
@ -727275,6 +727275,13 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"slot-element-default-display.html": [
|
||||||
|
"825efaa1a97d898c9cb2b7db1c18b3213c8ed214",
|
||||||
|
[
|
||||||
|
null,
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"slot-element-focusable.tentative.html": [
|
"slot-element-focusable.tentative.html": [
|
||||||
"b6d2449e890b31a9fc50712422c0dbca5e3e33a0",
|
"b6d2449e890b31a9fc50712422c0dbca5e3e33a0",
|
||||||
[
|
[
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>CSS Test (Display): <slot> elements default display should be contents</title>
|
||||||
|
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
test(() => {
|
||||||
|
let host = document.body.appendChild(document.createElement("div"));
|
||||||
|
let slot = host.attachShadow({ mode: "open" }).appendChild(document.createElement("slot"));
|
||||||
|
let cs = getComputedStyle(slot);
|
||||||
|
assert_equals(cs.getPropertyValue("display"), "contents", "slot default display is not contents");
|
||||||
|
document.body.removeChild(host);
|
||||||
|
}, `slot element with default display should be contents`);
|
||||||
|
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue