summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-text/parsing
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /testing/web-platform/tests/css/css-text/parsing
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-text/parsing')
-rw-r--r--testing/web-platform/tests/css/css-text/parsing/letter-spacing-computed.html6
-rw-r--r--testing/web-platform/tests/css/css-text/parsing/letter-spacing-invalid.html5
-rw-r--r--testing/web-platform/tests/css/css-text/parsing/letter-spacing-valid.html11
-rw-r--r--testing/web-platform/tests/css/css-text/parsing/webkit-text-stroke-computed.html25
-rw-r--r--testing/web-platform/tests/css/css-text/parsing/word-spacing-computed.html7
-rw-r--r--testing/web-platform/tests/css/css-text/parsing/word-spacing-invalid.html4
-rw-r--r--testing/web-platform/tests/css/css-text/parsing/word-spacing-valid.html10
7 files changed, 57 insertions, 11 deletions
diff --git a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-computed.html b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-computed.html
index 45417d1b4a..a7ef1390c1 100644
--- a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-computed.html
+++ b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-computed.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>CSS Text: getComputedStyle().letterSpacing</title>
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-letter-spacing">
-<meta name="assert" content="letter-spacing computed value is an absolute length.">
+<meta name="assert" content="letter-spacing computed value is an absolute length and/or percentage.">
<meta name="assert" content="'normal' computes to zero, but the resolved value of 0px is 'normal', so that's the value that is observed.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
@@ -24,6 +24,10 @@ test_computed_value("letter-spacing", "0px", "normal");
test_computed_value("letter-spacing", "10px");
test_computed_value("letter-spacing", "-20px");
test_computed_value("letter-spacing", "calc(10px - 0.5em)", "-10px");
+test_computed_value("letter-spacing", "110%");
+test_computed_value("letter-spacing", "-5%");
+test_computed_value("letter-spacing", "calc(10% - 20%)", "-10%");
+test_computed_value("letter-spacing", "calc(10px - (5% + 10%)", "calc(-15% + 10px)");
</script>
</body>
</html>
diff --git a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-invalid.html b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-invalid.html
index e9ad4e56a5..e32b98c6d7 100644
--- a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-invalid.html
+++ b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-invalid.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>CSS Text Module Test: parsing letter-spacing with invalid values</title>
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-letter-spacing">
-<meta name="assert" content="letter-spacing supports only the grammar 'normal | <length>'.">
+<meta name="assert" content="letter-spacing supports only the grammar 'normal | <length-percentage>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
@@ -13,10 +13,9 @@
<script>
test_invalid_value("letter-spacing", "auto");
test_invalid_value("letter-spacing", "20");
-test_invalid_value("letter-spacing", "30%");
-test_invalid_value("letter-spacing", "calc(40% + 50px)");
test_invalid_value("letter-spacing", "normal 10px");
+test_invalid_value("letter-spacing", "10% 10px");
</script>
</body>
</html>
diff --git a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-valid.html b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-valid.html
index 740d1fc398..f20fa21de1 100644
--- a/testing/web-platform/tests/css/css-text/parsing/letter-spacing-valid.html
+++ b/testing/web-platform/tests/css/css-text/parsing/letter-spacing-valid.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>CSS Text Module Test: parsing letter-spacing with valid values</title>
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-letter-spacing">
-<meta name="assert" content="letter-spacing supports the full grammar 'normal | <length>'.">
+<meta name="assert" content="letter-spacing supports the full grammar 'normal | <length-percentage>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
@@ -12,10 +12,17 @@
<body>
<script>
test_valid_value("letter-spacing", "normal");
-
test_valid_value("letter-spacing", "0", "0px");
+
test_valid_value("letter-spacing", "-10px");
+test_valid_value("letter-spacing", "20px");
test_valid_value("letter-spacing", "calc(2em + 3ex)");
+
+// Level 4 adds percentages
+test_valid_value("letter-spacing", "120%");
+test_valid_value("letter-spacing", "-10%");
+test_valid_value("letter-spacing", "calc(2ch - 30%)", "calc(-30% + 2ch)");
+test_valid_value("letter-spacing", "calc(40% + 50px)");
</script>
</body>
</html>
diff --git a/testing/web-platform/tests/css/css-text/parsing/webkit-text-stroke-computed.html b/testing/web-platform/tests/css/css-text/parsing/webkit-text-stroke-computed.html
new file mode 100644
index 0000000000..0dadfe402a
--- /dev/null
+++ b/testing/web-platform/tests/css/css-text/parsing/webkit-text-stroke-computed.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS webkit-text-stroke Test: Computed webkit-text-stroke</title>
+<link rel="author" title="Takuya Kurimoto" href="mailto:takuya004869@gmail.com">
+<link rel="help" href="https://compat.spec.whatwg.org/#propdef--webkit-text-stroke">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<style>
+ #target {
+ color: lime;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("-webkit-text-stroke", "green", "0px rgb(0, 128, 0)");
+test_computed_value("-webkit-text-stroke", "3px", "3px rgb(0, 255, 0)");
+test_computed_value("-webkit-text-stroke", "1px red", "1px rgb(255, 0, 0)");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-text/parsing/word-spacing-computed.html b/testing/web-platform/tests/css/css-text/parsing/word-spacing-computed.html
index 192dec6f7a..7c3f989525 100644
--- a/testing/web-platform/tests/css/css-text/parsing/word-spacing-computed.html
+++ b/testing/web-platform/tests/css/css-text/parsing/word-spacing-computed.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>CSS Text: getComputedStyle().wordSpacing</title>
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-spacing">
-<meta name="assert" content="word-spacing computed value is an absolute length.">
+<meta name="assert" content="word-spacing computed value is an absolute length and/or percentage.">
<meta name="assert" content="'normal' computes to zero.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
@@ -19,10 +19,15 @@
<div id="target"></div>
<script>
test_computed_value("word-spacing", "normal", "0px");
+test_computed_value("word-spacing", "0", "0px");
test_computed_value("word-spacing", "10px");
test_computed_value("word-spacing", "-20px");
test_computed_value("word-spacing", "calc(10px - 0.5em)", "-10px");
+test_computed_value("word-spacing", "110%");
+test_computed_value("word-spacing", "-5%");
+test_computed_value("word-spacing", "calc(10% - 20%)", "-10%");
+test_computed_value("word-spacing", "calc(10px - (5% + 10%)", "calc(-15% + 10px)");
</script>
</body>
</html>
diff --git a/testing/web-platform/tests/css/css-text/parsing/word-spacing-invalid.html b/testing/web-platform/tests/css/css-text/parsing/word-spacing-invalid.html
index 3a1c4ca487..ae8e121b9d 100644
--- a/testing/web-platform/tests/css/css-text/parsing/word-spacing-invalid.html
+++ b/testing/web-platform/tests/css/css-text/parsing/word-spacing-invalid.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>CSS Text Module Test: parsing word-spacing with invalid values</title>
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-spacing">
-<meta name="assert" content="word-spacing supports only the grammar 'normal | <length>'.">
+<meta name="assert" content="word-spacing supports only the grammar 'normal | <length-percentage>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
@@ -12,9 +12,9 @@
<body>
<script>
test_invalid_value("word-spacing", "auto");
-test_invalid_value("word-spacing", "20%");
test_invalid_value("word-spacing", "normal 10px");
+test_invalid_value("word-spacing", "10% 10px");
</script>
</body>
</html>
diff --git a/testing/web-platform/tests/css/css-text/parsing/word-spacing-valid.html b/testing/web-platform/tests/css/css-text/parsing/word-spacing-valid.html
index 217b2488f5..640f697f70 100644
--- a/testing/web-platform/tests/css/css-text/parsing/word-spacing-valid.html
+++ b/testing/web-platform/tests/css/css-text/parsing/word-spacing-valid.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>CSS Text Module Test: parsing word-spacing with valid values</title>
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-word-spacing">
-<meta name="assert" content="word-spacing supports the full grammar 'normal | <length>'.">
+<meta name="assert" content="word-spacing supports the full grammar 'normal | <length-percentage>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
@@ -12,11 +12,17 @@
<body>
<script>
test_valid_value("word-spacing", "normal");
+test_valid_value("word-spacing", "0", "0px");
test_valid_value("word-spacing", "10px");
test_valid_value("word-spacing", "-20px");
test_valid_value("word-spacing", "calc(2em + 3ex)");
-test_valid_value("word-spacing", "0", "0px");
+
+// Level 4 adds percentages
+test_valid_value("word-spacing", "120%");
+test_valid_value("word-spacing", "-10%");
+test_valid_value("word-spacing", "calc(2ch - 30%)", "calc(-30% + 2ch)");
+test_valid_value("word-spacing", "calc(40% + 50px)");
</script>
</body>
</html>