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> |