Files
sousa-gecko/testing/web-platform/tests/css/css-content/parsing/content-valid.html
T
Rune Lillesveen 8f8a5e2925 Bug 2040796 [wpt PR 59983] - Escaped idents when serializing CSS counter names, a=testonly
Automatic update from web-platform-tests
Escaped idents when serializing CSS counter names

There was missing escaping for idents when serializing counter names in:

- The counter-set/reset/increment property values
- The content property value

Bug: 514429130
Change-Id: Ia21161017622af951fb6895bb995af396489f04e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7859556
Reviewed-by: Daniil Sakhapov <sakhapov@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1632982}

--

wpt-commits: cc6b06b2b383081ed75d6100d3bf379eac66aae7
wpt-pr: 59983
2026-05-22 14:16:27 +00:00

56 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Content Module Level 3: Valid parsing</title>
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
<link rel="help" href="https://drafts.csswg.org/css-content-3/#content-property">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
function test_valid_value_combinations(property, value, serialized) {
if (arguments.length < 3)
serialized = value;
test_valid_value(property, value, serialized);
test_valid_value(property, `${value} / "alt text"`, `${serialized} / "alt text"`);
}
test_valid_value("content", "none");
test_valid_value("content", "normal");
test_valid_value_combinations("content", "open-quote");
test_valid_value_combinations("content", "close-quote");
test_valid_value_combinations("content", "no-open-quote");
test_valid_value_combinations("content", "no-close-quote");
test_valid_value_combinations("content", "counter(counter-name)");
test_valid_value_combinations("content", "counter(counter-name, counter-style)");
test_valid_value_combinations("content", "counter(counter-name, dECiMaL)", "counter(counter-name)");
test_valid_value_combinations("content", "counter(counter-name, DECIMAL)", "counter(counter-name)");
test_valid_value_combinations("content", `counters(counter-name, ".")`);
test_valid_value_combinations("content", `counters(counter-name, ".", counter-style)`);
test_valid_value_combinations("content", `counters(counter-name, ".", dECiMaL)`, `counters(counter-name, ".")`);
test_valid_value_combinations("content", `counters(counter-name, ".", DECIMAL)`, `counters(counter-name, ".")`);
test_valid_value_combinations("content", `url("picture.svg")`);
test_valid_value_combinations("content", `"hello"`);
test_valid_value_combinations("content", `"hello" "world"`);
test_valid_value_combinations("content", `counter(counter-name) "potato"`);
test_valid_value_combinations("content", `counters(counter-name, ".") "potato"`);
test_valid_value_combinations("content", `"(" counters(counter-name, ".", counter-style) ")"`);
test_valid_value_combinations("content", `open-quote "hello" "world" close-quote`);
test_valid_value_combinations("content", `url("picture.svg") "hello"`);
test_valid_value_combinations("content", "counter(\\})");
test_valid_value_combinations("content", `counters(\\}, ".")`);
</script>
</body>
</html>