Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test to make sure CSSFontPaletteValuesRule's attributes are readonly
https://bugs.webkit.org/show_bug.cgi?id=230791
<rdar://problem/83530165>

Reviewed by Simon Fraser.

The spec enforces this in w3c/csswg-drafts@9ddf938. This is already the case in WebKit.

This is being upstreamed in web-platform-tests/wpt#30964.

* web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html:

Canonical link: https://commits.webkit.org/242202@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
litherum committed Sep 27, 2021
1 parent fb59388 commit 2260417
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions LayoutTests/imported/w3c/ChangeLog
@@ -1,3 +1,17 @@
2021-09-27 Myles C. Maxfield <mmaxfield@apple.com>

Add test to make sure CSSFontPaletteValuesRule's attributes are readonly
https://bugs.webkit.org/show_bug.cgi?id=230791
<rdar://problem/83530165>

Reviewed by Simon Fraser.

The spec enforces this in w3c/csswg-drafts@9ddf938. This is already the case in WebKit.

This is being upstreamed in https://github.com/web-platform-tests/wpt/pull/30964.

* web-platform-tests/css/css-fonts/parsing/font-palette-values-invalid.html:

2021-09-27 Myles C. Maxfield <mmaxfield@apple.com>

Add support for CSSFontPaletteValuesRule.name
Expand Down
Expand Up @@ -115,6 +115,20 @@
let rule = rules[0];
assert_equals(text.indexOf("font-family"), -1);
assert_equals(rule.fontFamily, "");
rule.fontFamily = "SomeFontFamily";
assert_equals(rule.fontFamily, "");
assert_equals(rule.basePalette, "");
rule.basePalette = "7";
assert_equals(rule.basePalette, "");
assert_throws_js(TypeError, function() {
rule.clear();
});
assert_throws_js(TypeError, function() {
rule.delete(4);
});
assert_throws_js(TypeError, function() {
rule.set(4, "0 #123");
});
});

test(function() {
Expand Down

0 comments on commit 2260417

Please sign in to comment.