FAIL document.adoptedStyleSheets should initially have length 0. undefined is not an object (evaluating 'document.adoptedStyleSheets.length') FAIL new CSSStyleSheet produces empty CSSStyleSheet Illegal constructor FAIL title can be set in the CSSStyleSheet constructor Illegal constructor FAIL CSSStyleSheet.replace produces Promise Illegal constructor FAIL Constructed style sheets can be applied on document Illegal constructor FAIL Constructed style sheets can be applied on shadow root Illegal constructor FAIL Re-attaching shadow host with adopted stylesheets work Illegal constructor FAIL Attaching a shadow root that already has adopted stylesheets work Illegal constructor FAIL Re-attaching shadow host and updating attributes work Illegal constructor FAIL Changes to constructed stylesheets through CSSOM is reflected Illegal constructor FAIL Constructed stylesheet can be used and modified in multiple TreeScopes Illegal constructor FAIL Stylesheets constructed on the main Document cannot be used in iframes Illegal constructor FAIL Stylesheet constructed on iframe cannot be used in the main Document promise_test: Unhandled rejection with value: object "TypeError: Illegal constructor" 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 assert_throws_dom: function "() => { iframe.contentDocument.adoptedStyleSheets = [nonConstructedStyleSheet]; }" did not throw FAIL CSSStyleSheet.replaceSync replaces stylesheet text synchronously Illegal constructor FAIL CSSStyleSheet.replaceSync correctly updates the style of its adopters synchronously Illegal constructor FAIL Adopted sheets are ordered after non-adopted sheets in the shadow root Illegal constructor FAIL Adopted sheets are ordered after non-adopted sheets in the document Illegal constructor FAIL Inserting an @import rule through insertRule on a constructed stylesheet throws an exception assert_throws_dom: function "() => { (new CSSStyleSheet).insertRule(import_text) }" threw object "TypeError: Illegal constructor" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12 FAIL CSSStyleSheet.replaceSync should not trigger any loads from @import rules Illegal constructor FAIL CSSStyleSheet.replace allows, but ignores, import rule inside Illegal constructor FAIL CSSStyleSheet.replace ignores @import rule but still loads other rules Illegal constructor FAIL CSSStyleSheet.replaceSync allows, but ignores, import rule inside Illegal constructor FAIL CSSStyleSheet.replace does not reject on failed imports Illegal constructor FAIL Cloning a shadow host will not clone shadow root, and also adoptedStyleSheets Illegal constructor FAIL Importing a shadow host will not copy shadow root, and also adoptedStyleSheets Illegal constructor FAIL Adopting a shadow host will empty adoptedStyleSheets if adopting to a different document Illegal constructor FAIL Adopting a shadow host's ancestor will empty adoptedStyleSheets if adopting to a different document Illegal constructor FAIL Forcing a style update after adding an adopted stylesheet on a disconnected shadow root should not crash. Illegal constructor FAIL Modifying an adopted stylesheet on a disconnected shadow root should not crash. Illegal constructor FAIL Constructing a sheet with the default base URL uses the constructor document's base URL for CSS rules Illegal constructor