OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../resources/js-test.js"></script> |
| 4 <style> |
| 5 @font-face { |
| 6 font-family: 'Ahem', serif; |
| 7 src: url(../../resources/Ahem.ttf); |
| 8 } |
| 9 @font-face { |
| 10 font-family: 'Ahem2'; |
| 11 src: url('../../resources/WebKitWeightWatcher100.ttf'); |
| 12 } |
| 13 @font-face { |
| 14 font-family: 'Ahem3', Arial; |
| 15 } |
| 16 </style> |
| 17 <script> |
| 18 description('Test that @font-face has a single font-family-name.'); |
| 19 |
| 20 function runTests() { |
| 21 shouldBe('document.styleSheets[1].cssRules.length', '3'); |
| 22 shouldBeEqualToString('document.styleSheets[1].cssRules[0].style.fontFamily'
, ""); |
| 23 shouldBeEqualToString('document.styleSheets[1].cssRules[1].style.fontFamily'
, "Ahem2"); |
| 24 shouldBeEqualToString('document.styleSheets[1].cssRules[2].style.fontFamily'
, ""); |
| 25 } |
| 26 |
| 27 if (document.fonts) |
| 28 runTests(); |
| 29 else { |
| 30 testFailed('document.fonts does not exist'); |
| 31 } |
| 32 </script> |
| 33 </head> |
| 34 <body> |
| 35 </body> |
| 36 </html> |
OLD | NEW |