OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 @font-face { |
| 6 font-family: "Foo Bar"; |
| 7 } |
| 8 </style> |
| 9 <script> |
| 10 rule = document.styleSheets[0].cssRules[0]; |
| 11 |
| 12 test(function() { |
| 13 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"'); |
| 14 rule.style.setProperty('font-family', rule.style.getPropertyValue('font-family
')); |
| 15 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"'); |
| 16 rule.style.fontFamily = rule.style.fontFamily; |
| 17 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"'); |
| 18 rule.style['font-family'] = rule.style['font-family']; |
| 19 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"'); |
| 20 }, 'Should be parsed using font-face descriptor parsing rules and accepted.'); |
| 21 |
| 22 test(function() { |
| 23 rule.style.setProperty('font-family', "'Test', serif"); |
| 24 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"'); |
| 25 rule.style.setProperty('font-family', "Verdana, Arial, Helvetica"); |
| 26 assert_equals(rule.style.getPropertyValue('font-family'), '"Foo Bar"'); |
| 27 }, 'Should be parsed using font-face descriptor parsing rules and rejected.'); |
| 28 |
| 29 </script> |
OLD | NEW |