Status: FAIL | Duration: 13ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/cssom/adoptedstylesheets-adopt-link.tentative.html
<!doctype html> <meta charset="utf-8"> <title>adoptedStyleSheets adopt link tag</title> <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10013"> <link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> <link rel="stylesheet" href="./resources/adoptedstylesheet-adopt-link.css" id="linkSheet"> <p>Test passes if there is a filled green square.</p> <my-element id="host"></my-element> <script> customElements.define('my-element', class extends HTMLElement { connectedCallback() { this.attachShadow({mode:'open'}).append(document.createElement('div')); const sheet = new CSSStyleSheet(); sheet.replaceSync(` div { display: block; width: 100px; height: 100px; background: red; } `); this.shadowRoot.adoptedStyleSheets = [sheet, linkSheet.sheet]; } }); </script>
/css/reference/ref-filled-green-100px-square-only.html
<!DOCTYPE html> <link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> <p>Test passes if there is a filled green square.</p> <div style="width:100px; height:100px; background:green;"></div>