Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: third_party/WebKit/LayoutTests/fast/css/font-face-family-setting.html

Issue 2390373002: Fix setting properties on CSSFontFaceRule (Closed)
Patch Set: Patch for landing Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/font-face-family-setting.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/font-face-family-setting.html b/third_party/WebKit/LayoutTests/fast/css/font-face-family-setting.html
new file mode 100644
index 0000000000000000000000000000000000000000..e60e0be2716a1bf7e53657979cf983cd48faec2e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/font-face-family-setting.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+@font-face {
+ font-family: "Foo Bar";
+}
+</style>
+<script>
+rule = document.styleSheets[0].cssRules[0];
+
+test(function() {
+ assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
+ rule.style.setProperty('font-family', rule.style.getPropertyValue('font-family'));
+ assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
+ rule.style.fontFamily = rule.style.fontFamily;
+ assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
+ rule.style['font-family'] = rule.style['font-family'];
+ assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
+}, 'Should be parsed using font-face descriptor parsing rules and accepted.');
+
+test(function() {
+ rule.style.setProperty('font-family', "'Test', serif");
+ assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
+ rule.style.setProperty('font-family', "Verdana, Arial, Helvetica");
+ assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"');
+}, 'Should be parsed using font-face descriptor parsing rules and rejected.');
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698