Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
CSSStyleDeclaration.getPropertyPriority() should return the empty str…
…ing for invalid CSS properties https://bugs.webkit.org/show_bug.cgi?id=227257 <rdar://problem/79622278> Reviewed by Darin Adler. Follow-up to r279125 to improve test coverage for usage of USVString in CSSStyleDeclaration. * fast/css/CSSStyleDeclaration-setProperty-unicode-expected.txt: Added. * fast/css/CSSStyleDeclaration-setProperty-unicode.html: Added. Canonical link: https://commits.webkit.org/239072@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Tests use of USVString in CSSStyleDeclaration. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS declaration.getPropertyValue('animation-name') is "abc�def�ghi" | ||
PASS declaration.cssText.includes(REPLACED) is true | ||
PASS declaration.removeProperty('animation-name') is "abc�def�ghi" | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<script src="../../resources/js-test.js"></script> | ||
<script> | ||
const CONTAINS_UNPAIRED_SURROGATES = 'abc\uDC00def\uD800ghi'; | ||
const REPLACED = 'abc\uFFFDdef\uFFFDghi'; | ||
|
||
description("Tests use of USVString in CSSStyleDeclaration."); | ||
|
||
var declaration = document.styleSheets[0].cssRules[0].style; | ||
declaration.setProperty("animation-name", CONTAINS_UNPAIRED_SURROGATES); | ||
shouldBeEqualToString("declaration.getPropertyValue('animation-name')", REPLACED); | ||
shouldBeTrue("declaration.cssText.includes(REPLACED)"); | ||
shouldBeEqualToString("declaration.removeProperty('animation-name')", REPLACED); | ||
</script> | ||
</body> | ||
</html> |