Tests: Import some css/css-properties-values-api WPT tests

Casual import of 4 WPT tests related to `CSS.registerProperty`
This commit is contained in:
norbiros
2025-07-21 13:14:07 +02:00
committed by Sam Atkins
parent 90c0decd95
commit ab574deb93
Notes: github-actions[bot] 2025-07-22 09:59:12 +00:00
9 changed files with 881 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
Harness status: OK
Found 6 tests
5 Pass
1 Fail
Pass registerProperty requires a Dictionary type
Pass registerProperty requires a name matching <custom-property-name>
Pass registerProperty only allows omitting initialValue if syntax is '*'
Pass registerProperty fails for an already registered property
Pass registerProperty requires inherits
Fail Registering a property should not cause a transition

View File

@@ -0,0 +1,14 @@
Harness status: OK
Found 8 tests
2 Pass
6 Fail
Fail Registered properties are correctly inherited (or not) depending on the inherits flag.
Fail Explicitly inheriting from a parent with an invalid value results in initial value.
Pass Explicitly inheriting from a parent with no value results in initial value.
Pass Explicitly inheriting from a parent with a value results in that value.
Fail Reference to undefined variable results in inherited value
Fail Reference to syntax-incompatible variable results in inherited value
Fail Font-relative units are absolutized before before inheritance
Fail Calc expressions are resolved before inheritance

View File

@@ -0,0 +1,11 @@
Harness status: OK
Found 5 tests
2 Pass
3 Fail
Fail A var() cycle between two registered properties is handled correctly.
Fail A var() cycle between a registered properties and an unregistered property is handled correctly.
Fail A var() cycle between a two unregistered properties is handled correctly.
Pass A var() cycle between a syntax:'*' property and an unregistered property is handled correctly.
Pass Custom properties with universal syntax become guaranteed-invalid when invalid at computed-value time

View File

@@ -0,0 +1,22 @@
Harness status: OK
Found 16 tests
7 Pass
9 Fail
Fail var() references work with registered properties
Fail References to registered var()-properties work in registered lists
Fail References to mixed registered and unregistered var()-properties work in registered lists
Fail Registered lists may be concatenated
Fail Font-relative units are absolutized when substituting
Fail Calc expressions are resolved when substituting
Fail Lists with relative units are absolutized when substituting
Fail Values are absolutized when substituting into properties with universal syntax
Fail Invalid values for registered properties are serialized as the empty string
Pass Valid fallback does not invalidate var()-reference [<length>, 10px]
Pass Valid fallback does not invalidate var()-reference [<length> | <color>, red]
Pass Valid fallback does not invalidate var()-reference [<length> | none, none]
Pass Invalid fallback doesn't invalidate var()-reference [<length>, red]
Pass Invalid fallback doesn't invalidate var()-reference [<length> | none, nolength]
Pass Invalid fallback doesn't invalidate var()-reference [<length>, var(--novar)]
Pass Empty universal custom property can be substituted with var()