testing/web-platform/tests/css/css-text/parsing/text-spacing-valid.html
author Florian Quèze <florian@queze.net>
Tue, 08 Jul 2025 20:48:53 +0000 (10 hours ago)
changeset 795809 b01190f141a12f4b506acb1f4476561c4b0f2407
parent 693694 4c40e63ee33115e08d1b3273c4a5762974847f17
permissions -rw-r--r--
Bug 1960567 - remove the last C++ and scriptable APIs to accumulate data to legacy telemetry histograms, r=chutten. Differential Revision: https://phabricator.services.mozilla.com/D255582
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Text Module Test: parsing text-spacing with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-spacing-property">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("text-spacing", "normal");
test_valid_value("text-spacing", "none");
test_valid_value("text-spacing", "auto");

// `text-autospace`.
test_valid_value("text-spacing", "no-autospace");

// `text-spacing-trim`.
test_valid_value("text-spacing", "trim-start");
test_valid_value("text-spacing", "space-all");

// `text-autospace` and `text-spacing-trim`.
test_valid_value("text-spacing", "normal normal", "normal");
test_valid_value("text-spacing", "normal trim-start", "trim-start");
test_valid_value("text-spacing", "no-autospace normal", "no-autospace");
test_valid_value("text-spacing", "no-autospace space-all", "none");
test_valid_value("text-spacing", "no-autospace trim-start", "trim-start no-autospace");
// Test the reversed order.
test_valid_value("text-spacing", "trim-start normal ", "trim-start");
test_valid_value("text-spacing", "normal no-autospace", "no-autospace");
test_valid_value("text-spacing", "space-all no-autospace", "none");
test_valid_value("text-spacing", "trim-start no-autospace", "trim-start no-autospace");
</script>
</body>
</html>