From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../tests/css/css-shadow-parts/META.yml | 3 + .../tests/css/css-shadow-parts/all-hosts.html | 36 +++++++++ .../both-part-and-exportparts.html | 32 ++++++++ .../chaining-invalid-selector.html | 41 +++++++++++ .../css/css-shadow-parts/complex-matching.html | 30 ++++++++ .../css/css-shadow-parts/complex-non-matching.html | 30 ++++++++ .../tests/css/css-shadow-parts/different-host.html | 30 ++++++++ .../tests/css/css-shadow-parts/double-forward.html | 34 +++++++++ .../css/css-shadow-parts/exportparts-multiple.html | 76 +++++++++++++++++++ .../tests/css/css-shadow-parts/host-part-001.html | 43 +++++++++++ .../css/css-shadow-parts/host-stylesheet.html | 32 ++++++++ .../tests/css/css-shadow-parts/idlharness.html | 21 ++++++ .../tests/css/css-shadow-parts/inner-host.html | 42 +++++++++++ .../interaction-with-nested-pseudo-class-ref.html | 2 + .../interaction-with-nested-pseudo-class.html | 23 ++++++ .../interaction-with-placeholder-ref.html | 18 +++++ .../interaction-with-placeholder.html | 29 ++++++++ .../interaction-with-pseudo-elements.html | 86 ++++++++++++++++++++++ .../invalidation-change-exportparts-forward.html | 34 +++++++++ .../invalidation-change-part-name-forward.html | 34 +++++++++ ...lidation-change-part-name-idl-domtokenlist.html | 33 +++++++++ .../invalidation-change-part-name-idl-setter.html | 32 ++++++++ .../invalidation-change-part-name.html | 32 ++++++++ .../invalidation-complex-selector-forward.html | 34 +++++++++ .../invalidation-complex-selector.html | 32 ++++++++ .../css-shadow-parts/invalidation-part-pseudo.html | 50 +++++++++++++ .../tests/css/css-shadow-parts/multiple-parts.html | 44 +++++++++++ .../css/css-shadow-parts/part-mutation-pseudo.html | 27 +++++++ .../tests/css/css-shadow-parts/part-name-idl.html | 53 +++++++++++++ .../css-shadow-parts/part-nested-pseudo-ref.html | 9 +++ .../css/css-shadow-parts/part-nested-pseudo.html | 17 +++++ .../css-shadow-parts/precedence-part-vs-part.html | 35 +++++++++ .../tests/css/css-shadow-parts/serialization.html | 29 ++++++++ .../css-shadow-parts/simple-forward-shorthand.html | 32 ++++++++ .../tests/css/css-shadow-parts/simple-forward.html | 32 ++++++++ .../simple-important-important.html | 30 ++++++++ .../css-shadow-parts/simple-important-inline.html | 29 ++++++++ .../css/css-shadow-parts/simple-important.html | 30 ++++++++ .../tests/css/css-shadow-parts/simple-inline.html | 29 ++++++++ .../tests/css/css-shadow-parts/simple.html | 30 ++++++++ .../tests/css/css-shadow-parts/style-sharing.html | 23 ++++++ .../css/css-shadow-parts/support/shadow-helper.js | 33 +++++++++ 42 files changed, 1371 insertions(+) create mode 100644 testing/web-platform/tests/css/css-shadow-parts/META.yml create mode 100644 testing/web-platform/tests/css/css-shadow-parts/all-hosts.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/both-part-and-exportparts.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/chaining-invalid-selector.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/complex-matching.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/complex-non-matching.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/different-host.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/double-forward.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/exportparts-multiple.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/host-part-001.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/host-stylesheet.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/idlharness.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/inner-host.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/interaction-with-nested-pseudo-class-ref.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/interaction-with-nested-pseudo-class.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/interaction-with-placeholder-ref.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/interaction-with-placeholder.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/interaction-with-pseudo-elements.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/invalidation-change-exportparts-forward.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-forward.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-idl-domtokenlist.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-idl-setter.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/invalidation-complex-selector-forward.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/invalidation-complex-selector.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/invalidation-part-pseudo.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/multiple-parts.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/part-mutation-pseudo.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/part-name-idl.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/part-nested-pseudo-ref.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/part-nested-pseudo.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/precedence-part-vs-part.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/serialization.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/simple-forward-shorthand.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/simple-forward.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/simple-important-important.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/simple-important-inline.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/simple-important.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/simple-inline.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/simple.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/style-sharing.html create mode 100644 testing/web-platform/tests/css/css-shadow-parts/support/shadow-helper.js (limited to 'testing/web-platform/tests/css/css-shadow-parts') diff --git a/testing/web-platform/tests/css/css-shadow-parts/META.yml b/testing/web-platform/tests/css/css-shadow-parts/META.yml new file mode 100644 index 0000000000..6cce42664a --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/META.yml @@ -0,0 +1,3 @@ +spec: https://drafts.csswg.org/css-shadow-parts/ +suggested_reviewers: + - tabatkins diff --git a/testing/web-platform/tests/css/css-shadow-parts/all-hosts.html b/testing/web-platform/tests/css/css-shadow-parts/all-hosts.html new file mode 100644 index 0000000000..218535dcba --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/all-hosts.html @@ -0,0 +1,36 @@ + + + + CSS Shadow Parts - All Hosts + + + + + + + + + + + + The following text should be green: + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/both-part-and-exportparts.html b/testing/web-platform/tests/css/css-shadow-parts/both-part-and-exportparts.html new file mode 100644 index 0000000000..6cd945c6c0 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/both-part-and-exportparts.html @@ -0,0 +1,32 @@ + +CSS Shadow Parts - ::part() rules when element has both @part and @exportparts + + + + + +
+ diff --git a/testing/web-platform/tests/css/css-shadow-parts/chaining-invalid-selector.html b/testing/web-platform/tests/css/css-shadow-parts/chaining-invalid-selector.html new file mode 100644 index 0000000000..cb34a7b460 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/chaining-invalid-selector.html @@ -0,0 +1,41 @@ + + + + CSS Shadow Parts - Chaining Invalid Selector + + + + + + + + + +
+ It's invalid to use 2 pseudoelements in a selector but if somehow it becomes valid, + it should not expose the internal structure of the shadow tree. +
+ + + + + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/complex-matching.html b/testing/web-platform/tests/css/css-shadow-parts/complex-matching.html new file mode 100644 index 0000000000..f8f063d850 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/complex-matching.html @@ -0,0 +1,30 @@ + + + + CSS Shadow Parts - Complex Matching + + + + + + + + + + + + The following text should be green: +
+ + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/complex-non-matching.html b/testing/web-platform/tests/css/css-shadow-parts/complex-non-matching.html new file mode 100644 index 0000000000..6e5bc69c5d --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/complex-non-matching.html @@ -0,0 +1,30 @@ + + + + CSS Shadow Parts - Complex Non-matching + + + + + + + + + + + + The following text should be green: +
+ + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/different-host.html b/testing/web-platform/tests/css/css-shadow-parts/different-host.html new file mode 100644 index 0000000000..7fe9744af9 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/different-host.html @@ -0,0 +1,30 @@ + + + + CSS Shadow Parts - Different Host + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/double-forward.html b/testing/web-platform/tests/css/css-shadow-parts/double-forward.html new file mode 100644 index 0000000000..d23ec775ff --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/double-forward.html @@ -0,0 +1,34 @@ + + + + CSS Shadow Parts - Double forward + + + + + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/exportparts-multiple.html b/testing/web-platform/tests/css/css-shadow-parts/exportparts-multiple.html new file mode 100644 index 0000000000..a6773a8fb6 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/exportparts-multiple.html @@ -0,0 +1,76 @@ + +CSS Shadow Parts - Exporting multiple shadow parts + + + + + + + +
+ diff --git a/testing/web-platform/tests/css/css-shadow-parts/host-part-001.html b/testing/web-platform/tests/css/css-shadow-parts/host-part-001.html new file mode 100644 index 0000000000..9004141534 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/host-part-001.html @@ -0,0 +1,43 @@ + +CSS Shadow Parts - :host::part() + + + + + + + + +
+ diff --git a/testing/web-platform/tests/css/css-shadow-parts/host-stylesheet.html b/testing/web-platform/tests/css/css-shadow-parts/host-stylesheet.html new file mode 100644 index 0000000000..2e65c4b1b5 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/host-stylesheet.html @@ -0,0 +1,32 @@ + + + + CSS Shadow Parts - Host Stylesheet + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/idlharness.html b/testing/web-platform/tests/css/css-shadow-parts/idlharness.html new file mode 100644 index 0000000000..182943ac69 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/idlharness.html @@ -0,0 +1,21 @@ + +CSS Shadow Parts IDL tests + + + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/inner-host.html b/testing/web-platform/tests/css/css-shadow-parts/inner-host.html new file mode 100644 index 0000000000..2dfd4b0510 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/inner-host.html @@ -0,0 +1,42 @@ + + + + CSS Shadow Parts - Inner Host + + + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/interaction-with-nested-pseudo-class-ref.html b/testing/web-platform/tests/css/css-shadow-parts/interaction-with-nested-pseudo-class-ref.html new file mode 100644 index 0000000000..e3b99d43a6 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/interaction-with-nested-pseudo-class-ref.html @@ -0,0 +1,2 @@ + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/interaction-with-nested-pseudo-class.html b/testing/web-platform/tests/css/css-shadow-parts/interaction-with-nested-pseudo-class.html new file mode 100644 index 0000000000..1061e4b0e3 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/interaction-with-nested-pseudo-class.html @@ -0,0 +1,23 @@ + + +CSS Shadow Parts - Nested Pseudo Classes + + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-shadow-parts/interaction-with-placeholder-ref.html b/testing/web-platform/tests/css/css-shadow-parts/interaction-with-placeholder-ref.html new file mode 100644 index 0000000000..11943c229a --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/interaction-with-placeholder-ref.html @@ -0,0 +1,18 @@ + + + + CSS Shadow Parts - Interaction with placeholder + + + + + + +
+ The following text should be green: + +
+ + diff --git a/testing/web-platform/tests/css/css-shadow-parts/interaction-with-placeholder.html b/testing/web-platform/tests/css/css-shadow-parts/interaction-with-placeholder.html new file mode 100644 index 0000000000..a064789f06 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/interaction-with-placeholder.html @@ -0,0 +1,29 @@ + + + + CSS Shadow Parts - Interaction with placeholder + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/interaction-with-pseudo-elements.html b/testing/web-platform/tests/css/css-shadow-parts/interaction-with-pseudo-elements.html new file mode 100644 index 0000000000..776ab2eb69 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/interaction-with-pseudo-elements.html @@ -0,0 +1,86 @@ + + + + CSS Shadow Parts - Interaction with pseudo-elements + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-exportparts-forward.html b/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-exportparts-forward.html new file mode 100644 index 0000000000..1e319deb63 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-exportparts-forward.html @@ -0,0 +1,34 @@ + + + + CSS Shadow Parts - Invalidation change exportparts forward + + + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-forward.html b/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-forward.html new file mode 100644 index 0000000000..f8da6d1f54 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-forward.html @@ -0,0 +1,34 @@ + + + + CSS Shadow Parts - Invalidation change part name forward + + + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-idl-domtokenlist.html b/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-idl-domtokenlist.html new file mode 100644 index 0000000000..2f9fffb86e --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-idl-domtokenlist.html @@ -0,0 +1,33 @@ + + + + CSS Shadow Parts - Invalidation Change Part Name IDL DOMTokenList + + + + + + + + + + + + + The following text should be green: +
+ + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-idl-setter.html b/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-idl-setter.html new file mode 100644 index 0000000000..0ed46f53bc --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name-idl-setter.html @@ -0,0 +1,32 @@ + + + + CSS Shadow Parts - Invalidation Change Part Name IDL Setter + + + + + + + + + + + + + The following text should be green: +
+ + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name.html b/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name.html new file mode 100644 index 0000000000..47630d956f --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/invalidation-change-part-name.html @@ -0,0 +1,32 @@ + + + + CSS Shadow Parts - Invalidation Change Part Name + + + + + + + + + + + + The following text should be green: +
+ + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/invalidation-complex-selector-forward.html b/testing/web-platform/tests/css/css-shadow-parts/invalidation-complex-selector-forward.html new file mode 100644 index 0000000000..7c732b9bdf --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/invalidation-complex-selector-forward.html @@ -0,0 +1,34 @@ + + + + CSS Shadow Parts - Invalidation complex selector forward + + + + + + + + + + + + + + The following text should be green: +
+ + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/invalidation-complex-selector.html b/testing/web-platform/tests/css/css-shadow-parts/invalidation-complex-selector.html new file mode 100644 index 0000000000..5b1fd80079 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/invalidation-complex-selector.html @@ -0,0 +1,32 @@ + + + + CSS Shadow Parts - Invalidation Complex Selector + + + + + + + + + + + + The following text should be green: +
+ + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/invalidation-part-pseudo.html b/testing/web-platform/tests/css/css-shadow-parts/invalidation-part-pseudo.html new file mode 100644 index 0000000000..fca4a964dc --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/invalidation-part-pseudo.html @@ -0,0 +1,50 @@ + +CSS Shadow Parts - Pseudo class and exported parts + + + + + + + + + + +
+ diff --git a/testing/web-platform/tests/css/css-shadow-parts/multiple-parts.html b/testing/web-platform/tests/css/css-shadow-parts/multiple-parts.html new file mode 100644 index 0000000000..de02a26e16 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/multiple-parts.html @@ -0,0 +1,44 @@ + + + + CSS Shadow Parts - Multiple parts + + + + + + + + + + + + The following text should match its stated colour: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/part-mutation-pseudo.html b/testing/web-platform/tests/css/css-shadow-parts/part-mutation-pseudo.html new file mode 100644 index 0000000000..d0e0072d51 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/part-mutation-pseudo.html @@ -0,0 +1,27 @@ + + +CSS Shadow Parts - Invalidation Change Part Name on pseudo + + + + + + + + + +The following text should be green: +
+ diff --git a/testing/web-platform/tests/css/css-shadow-parts/part-name-idl.html b/testing/web-platform/tests/css/css-shadow-parts/part-name-idl.html new file mode 100644 index 0000000000..fc3282a6e9 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/part-name-idl.html @@ -0,0 +1,53 @@ + + + + CSS Shadow Parts - Part Name IDL + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/part-nested-pseudo-ref.html b/testing/web-platform/tests/css/css-shadow-parts/part-nested-pseudo-ref.html new file mode 100644 index 0000000000..8eee65a270 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/part-nested-pseudo-ref.html @@ -0,0 +1,9 @@ + +CSS Test Reference + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/part-nested-pseudo.html b/testing/web-platform/tests/css/css-shadow-parts/part-nested-pseudo.html new file mode 100644 index 0000000000..f1753de775 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/part-nested-pseudo.html @@ -0,0 +1,17 @@ + +::part() doesn't incorrectly match pseudo-elements of the part + + + + +
+ diff --git a/testing/web-platform/tests/css/css-shadow-parts/precedence-part-vs-part.html b/testing/web-platform/tests/css/css-shadow-parts/precedence-part-vs-part.html new file mode 100644 index 0000000000..9905cf8b5e --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/precedence-part-vs-part.html @@ -0,0 +1,35 @@ + + + + CSS Shadow Parts - Precedence part vs part + + + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/serialization.html b/testing/web-platform/tests/css/css-shadow-parts/serialization.html new file mode 100644 index 0000000000..50ad3df53a --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/serialization.html @@ -0,0 +1,29 @@ + + + + CSS Shadow Parts - Serialization + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/simple-forward-shorthand.html b/testing/web-platform/tests/css/css-shadow-parts/simple-forward-shorthand.html new file mode 100644 index 0000000000..0142967dfd --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/simple-forward-shorthand.html @@ -0,0 +1,32 @@ + + + + CSS Shadow Parts - Simple forward shorthand + + + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/simple-forward.html b/testing/web-platform/tests/css/css-shadow-parts/simple-forward.html new file mode 100644 index 0000000000..a1a19aee4e --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/simple-forward.html @@ -0,0 +1,32 @@ + + + + CSS Shadow Parts - Simple forward + + + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/simple-important-important.html b/testing/web-platform/tests/css/css-shadow-parts/simple-important-important.html new file mode 100644 index 0000000000..43ec1bbae3 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/simple-important-important.html @@ -0,0 +1,30 @@ + + + + CSS Shadow Parts - Simple Important Important + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/simple-important-inline.html b/testing/web-platform/tests/css/css-shadow-parts/simple-important-inline.html new file mode 100644 index 0000000000..61b83dd4be --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/simple-important-inline.html @@ -0,0 +1,29 @@ + + + + CSS Shadow Parts - Simple Important Inline + + + + + + + + + + + + The following text should be red: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/simple-important.html b/testing/web-platform/tests/css/css-shadow-parts/simple-important.html new file mode 100644 index 0000000000..e3240bd390 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/simple-important.html @@ -0,0 +1,30 @@ + + + + CSS Shadow Parts - Simple Important + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/simple-inline.html b/testing/web-platform/tests/css/css-shadow-parts/simple-inline.html new file mode 100644 index 0000000000..f2c3638d1e --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/simple-inline.html @@ -0,0 +1,29 @@ + + + + CSS Shadow Parts - Simple Inline + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/simple.html b/testing/web-platform/tests/css/css-shadow-parts/simple.html new file mode 100644 index 0000000000..a7f17d9670 --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/simple.html @@ -0,0 +1,30 @@ + + + + CSS Shadow Parts - Simple + + + + + + + + + + + + The following text should be green: + + + + diff --git a/testing/web-platform/tests/css/css-shadow-parts/style-sharing.html b/testing/web-platform/tests/css/css-shadow-parts/style-sharing.html new file mode 100644 index 0000000000..4af1260b5e --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/style-sharing.html @@ -0,0 +1,23 @@ + +CSS Shadow Parts test: Parts don't incorrectly share style with other elements + + + + + + +
+ diff --git a/testing/web-platform/tests/css/css-shadow-parts/support/shadow-helper.js b/testing/web-platform/tests/css/css-shadow-parts/support/shadow-helper.js new file mode 100644 index 0000000000..94accd6b1f --- /dev/null +++ b/testing/web-platform/tests/css/css-shadow-parts/support/shadow-helper.js @@ -0,0 +1,33 @@ +// Takes a root element and a list of ids of shadow host elements. Each id refers to a shadow host +// inside the previous id's shadow tree. +function getElementByShadowIds(root, ids) { + for (var i = 0; ;i++) { + var host = root.getElementById(ids[i]); + if (host == null) { + throw "No element found: i=" + i + " id=" + ids[i] + ". Root was " + root; + } + if (i == ids.length - 1) { + return host; + } + root = host.shadowRoot; + if (root == null) { + throw "No shadowRoot found: i=" + i + " id=" + ids[i] + ". Host was " + host; + } + } +} + +// Installs a mininal custom element based on this template. +function installCustomElement(element_name, template_id) { + ceClass = class extends HTMLElement { + constructor() { + super(); + var template = document + .getElementById(template_id) + .content; + this + .attachShadow({mode: 'open'}) + .appendChild(template.cloneNode(true)); + } + }; + window.customElements.define(element_name, ceClass); +} -- cgit v1.2.3