diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-fonts/parsing')
3 files changed, 77 insertions, 2 deletions
diff --git a/testing/web-platform/tests/css/css-fonts/parsing/WEB_FEATURES.yml b/testing/web-platform/tests/css/css-fonts/parsing/WEB_FEATURES.yml index 6a24d269b4..a3bc09cb1f 100644 --- a/testing/web-platform/tests/css/css-fonts/parsing/WEB_FEATURES.yml +++ b/testing/web-platform/tests/css/css-fonts/parsing/WEB_FEATURES.yml @@ -8,7 +8,21 @@ features: - font-palette-values-* - name: font-synthesis files: - - font-synthesis-* + - font-synthesis-computed.html + - font-synthesis-invalid.html + - font-synthesis-valid.html +- name: font-synthesis-position + files: + - font-synthesis-position* +- name: font-synthesis-small-caps + files: + - font-synthesis-small-caps* +- name: font-synthesis-style + files: + - font-synthesis-style* +- name: font-synthesis-weight + files: + - font-synthesis-weight* - name: font-variant-alternates files: - font-variant-alternates-* diff --git a/testing/web-platform/tests/css/css-fonts/parsing/font-palette-values-invalid.html b/testing/web-platform/tests/css/css-fonts/parsing/font-palette-values-invalid.html index 2056055f34..b93a48fb37 100644 --- a/testing/web-platform/tests/css/css-fonts/parsing/font-palette-values-invalid.html +++ b/testing/web-platform/tests/css/css-fonts/parsing/font-palette-values-invalid.html @@ -115,13 +115,33 @@ @font-palette-values --A { override-colors: 0 canvas; } + +/* 19 */ +@font-palette-values --A { + override-colors: 0 currentcolor; +} + +/* 20 */ +@font-palette-values --A { + override-colors: 0 light-dark(white, black); +} + +/* 21 */ +@font-palette-values --A { + override-colors: 0 color-mix(in lch, red, canvas); +} + +/* 22 */ +@font-palette-values --A { + override-colors: 0 light-dark(white, currentcolor); +} </style> </head> <body> <script> let rules = document.getElementById("style").sheet.cssRules; test(function() { - assert_equals(rules.length, 19); + assert_equals(rules.length, 23); }); test(function() { @@ -283,6 +303,34 @@ test(function() { assert_equals(rule.basePalette, ""); assert_equals(rule.overrideColors, ""); }); + +test(function() { + let text = rules[19].cssText; + let rule = rules[19]; + assert_equals(text.indexOf("override-colors"), -1); + assert_equals(rule.overrideColors, ""); +}); + +test(function() { + let text = rules[20].cssText; + let rule = rules[20]; + assert_equals(text.indexOf("override-colors"), -1); + assert_equals(rule.overrideColors, ""); +}); + +test(function() { + let text = rules[21].cssText; + let rule = rules[21]; + assert_equals(text.indexOf("override-colors"), -1); + assert_equals(rule.overrideColors, ""); +}); + +test(function() { + let text = rules[22].cssText; + let rule = rules[22]; + assert_equals(text.indexOf("override-colors"), -1); + assert_equals(rule.overrideColors, ""); +}); </script> </body> </html> diff --git a/testing/web-platform/tests/css/css-fonts/parsing/font-palette-values-valid.html b/testing/web-platform/tests/css/css-fonts/parsing/font-palette-values-valid.html index 3c0c0626f5..99fceff234 100644 --- a/testing/web-platform/tests/css/css-fonts/parsing/font-palette-values-valid.html +++ b/testing/web-platform/tests/css/css-fonts/parsing/font-palette-values-valid.html @@ -103,6 +103,11 @@ @font-palette-values --P { font-family: foo, bar, baz; } + +/* 17 */ +@font-palette-values --Q { + override-colors: 0 color-mix(in lch, red, blue); +} </style> </head> <body> @@ -385,6 +390,14 @@ test(function() { assert_equals(rule.basePalette, ""); assert_equals(rule.overrideColors, ""); }); + +test(function() { + let rule = rules[17]; + assert_equals(rule.name, "--Q"); + assert_equals(rule.fontFamily, ""); + assert_equals(rule.basePalette, ""); + assert_equals(rule.overrideColors, "0 color-mix(in lch, red, blue)"); +}); </script> </body> </html> |