CSSStyleSheet-constructable.html
Details
- Test
/css/cssom/CSSStyleSheet-constructable.html- Harness
- OK
Subtests
| Status | Subtest |
|---|---|
| PASS | document.adoptedStyleSheets should initially have length 0. |
| FAIL | new CSSStyleSheet produces empty CSSStyleSheet assert_equals: expected 2 but got 0 |
| PASS | title can be set in the CSSStyleSheet constructor |
| FAIL | CSSStyleSheet.replace produces Promise<CSSStyleSheet> assert_equals: expected 2 but got 0 |
| FAIL | Constructed style sheets can be applied on document assert_equals: expected "rgb(0, 0, 0)" but got "rgb(255, 255, 255)" |
| FAIL | Constructed style sheets can be applied on shadow root assert_equals: expected "rgb(0, 0, 0)" but got "rgb(255, 255, 255)" |
| FAIL | Re-attaching shadow host with adopted stylesheets work assert_equals: Style applies connected expected "rgb(0, 128, 0)" but got "rgb(255, 255, 255)" |
| FAIL | Attaching a shadow root that already has adopted stylesheets work assert_equals: Style applies when connected expected "rgb(255, 0, 0)" but got "rgb(0, 0, 0)" |
| FAIL | Re-attaching shadow host and updating attributes work assert_equals: Style applies after adding style expected "rgb(255, 0, 0)" but got "rgb(0, 0, 0)" |
| PASS | Changes to constructed stylesheets through CSSOM is reflected |
| FAIL | Constructed stylesheet can be used and modified in multiple TreeScopes assert_equals: expected "rgb(255, 0, 0)" but got "rgb(0, 0, 0)" |
| FAIL | Stylesheets constructed on the main Document cannot be used in iframes assert_throws_dom: function "() => { iframe.contentDocument.adoptedStyleSheets = [redStyleSheet]; }" did not throw |
| FAIL | Stylesheet constructed on iframe cannot be used in the main Document assert_equals: expected "rgb(0, 0, 0)" but got "" |
| FAIL | Adding non-constructed stylesheet to AdoptedStyleSheets is not allowed when the owner document of the stylesheet is in the same document tree as the AdoptedStyleSheets assert_throws_dom: function "() => { document.adoptedStyleSheets = [nonConstructedStyleSheet]; }" did not throw |
| FAIL | Adding non-constructed stylesheet to AdoptedStyleSheets is not allowed when the owner document of the stylesheet and the AdoptedStyleSheets are in different document trees iframeDiv.classList.add is not a function |
| PASS | CSSStyleSheet.replaceSync replaces stylesheet text synchronously |
| FAIL | CSSStyleSheet.replaceSync correctly updates the style of its adopters synchronously assert_equals: expected "rgb(255, 0, 0)" but got "rgb(0, 0, 0)" |
| FAIL | Adopted sheets are ordered after non-adopted sheets in the shadow root assert_equals: expected "rgb(255, 0, 0)" but got "rgb(0, 0, 0)" |
| FAIL | Adopted sheets are ordered after non-adopted sheets in the document assert_equals: non-adopted styles should be ordered before adopted styles expected "rgb(255, 0, 0)" but got "rgb(255, 255, 255)" |
| PASS | Inserting an @import rule through insertRule on a constructed stylesheet throws an exception |
| FAIL | CSSStyleSheet.replaceSync should not trigger any loads from @import rules assert_equals: There should be only one entry for the import URL expected 1 but got 0 |
| FAIL | CSSStyleSheet.replace allows, but ignores, import rule inside assert_equals: expected "rgb(0, 0, 0)" but got "rgb(255, 0, 0)" |
| FAIL | CSSStyleSheet.replace ignores @import rule but still loads other rules assert_equals: expected "rgb(0, 0, 0)" but got "rgb(255, 0, 0)" |
| PASS | CSSStyleSheet.replaceSync allows, but ignores, import rule inside |
| PASS | CSSStyleSheet.replace does not reject on failed imports |
| PASS | Cloning a shadow host will not clone shadow root, and also adoptedStyleSheets |
| FAIL | Importing a shadow host will not copy shadow root, and also adoptedStyleSheets iframe.contentDocument.importNode is not a function |
| FAIL | Adopting a shadow host will empty adoptedStyleSheets if adopting to a different document assert_equals: expected "rgb(255, 0, 0)" but got "rgb(0, 0, 0)" |
| FAIL | Adopting a shadow host's ancestor will empty adoptedStyleSheets if adopting to a different document assert_equals: expected "rgb(255, 0, 0)" but got "rgb(0, 0, 0)" |
| PASS | Forcing a style update after adding an adopted stylesheet on a disconnected shadow root should not crash. |
| PASS | Modifying an adopted stylesheet on a disconnected shadow root should not crash. |
| PASS | Constructing a sheet with the default base URL uses the constructor document's base URL for CSS rules |