| <!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> |