Automatic update from web-platform-tests Move css-shadow-parts/ tests to css-shadow/part/ The css-shadow-parts spec is now part of css-shadow. Kept a separate directory to make it easier for the META.yml and feature mapping. Change-Id: I9d2572ad4f31d8dd7dd1aacf76209028c6a3d84a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7485890 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1570431} -- wpt-commits: 680e4cf3fcabe4a6de1deb7fc36eb84d8278eedd wpt-pr: 57245
30 lines
948 B
HTML
30 lines
948 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>CSS Shadow Parts - Serialization</title>
|
|
<link href="https://drafts.csswg.org/css-shadow/#part" rel="help">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
</head>
|
|
<body>
|
|
<style id="styleElement">
|
|
::part(\(foo) {}
|
|
::part( bar\ ) {}
|
|
::part( -foo bar ) {}
|
|
</style>
|
|
<script>
|
|
"use strict";
|
|
const rules = styleElement.sheet.cssRules;
|
|
test(function() {
|
|
assert_equals(rules[0].selectorText, "::part(\\(foo)");
|
|
}, "Escape start parenthesis in ::part name.");
|
|
test(function() {
|
|
assert_equals(rules[1].selectorText, "::part(bar\\ )");
|
|
}, "Escape start space in ::part name.");
|
|
test(function() {
|
|
assert_equals(rules[2].selectorText, "::part(-foo bar)");
|
|
}, "Collapse spaces in ::part names list.");
|
|
</script>
|
|
</body>
|
|
</html>
|