Summary

Harness status: OK

Found 4 tests

Details

ResultTest NameMessage
PassInserting an @import rule through insertRule on a constructed stylesheet throws an exception
Asserts run
Pass
assert_throws_dom("SyntaxError", function "() => { (new CSSStyleSheet).insertRule(import_text) }")
    at Test.<anonymous> ( /css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:21:3)
Fail@import rules should not trigger any loads.promise_test: Unhandled rejection with value: object "[object Event]"
Error
    at get_stack (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:4617:21)
    at new AssertionError (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:4610:22)
    at assert (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:4594:19)
    at Test.<anonymous> (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:764:29)
    at Test.step (https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:2684:25)
    at https://xn--n8j6ds53lwwkrqhv28a.wpt.live/resources/testharness.js:2731:35
Asserts run
Pass
assert_throws_dom("SyntaxError", function "() => { sheet.insertRule(import_text) }")
    at Test.<anonymous> ( /css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:30:5)
Pass@import rules are not parsed in CSSStyleSheet.replace
Asserts run
Pass
assert_equals("rgb(0, 0, 0)", "rgb(0, 0, 0)")
    at Test.<anonymous> ( /css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:57:3)
Pass
assert_equals(1, 1)
    at  /css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:60:5
Pass
assert_equals(".green { color: green; }", ".green { color: green; }")
    at  /css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:61:5
Pass
assert_equals("rgb(0, 128, 0)", "rgb(0, 128, 0)")
    at  /css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:62:5
Pass@import rules are not parsed in CSSStyleSheet.replaceSync
Asserts run
Pass
assert_equals("rgb(0, 0, 0)", "rgb(0, 0, 0)")
    at Test.<anonymous> ( /css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:75:3)
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:78:3)
Pass
assert_equals(".green { color: green; }", ".green { color: green; }")
    at Test.<anonymous> ( /css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:79:3)
Pass
assert_equals("rgb(0, 128, 0)", "rgb(0, 128, 0)")
    at Test.<anonymous> ( /css/cssom/CSSStyleSheet-constructable-disallow-import.tentative.html:80:3)