OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 <style> | 4 <style> |
5 @font-face { | 5 @font-face { |
6 font-family: 'Ahem'; | 6 font-family: 'Ahem'; |
7 src: url(../../resources/Ahem.ttf); | 7 src: url(../../resources/Ahem.ttf); |
8 font-style: italic; | 8 font-style: italic; |
9 font-weight: 300; | 9 font-weight: 300; |
10 unicode-range: U+0-3FF; | 10 unicode-range: U+0-3FF; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 modifiedFace.variant = 'small-caps'; | 65 modifiedFace.variant = 'small-caps'; |
66 modifiedFace.featureSettings = "'dlig' 1, 'liga' 0"; | 66 modifiedFace.featureSettings = "'dlig' 1, 'liga' 0"; |
67 shouldBeEqualToString('modifiedFace.family', 'modified'); | 67 shouldBeEqualToString('modifiedFace.family', 'modified'); |
68 shouldBeEqualToString('modifiedFace.style', 'italic'); | 68 shouldBeEqualToString('modifiedFace.style', 'italic'); |
69 shouldBeEqualToString('modifiedFace.weight', '900'); | 69 shouldBeEqualToString('modifiedFace.weight', '900'); |
70 shouldBeEqualToString('modifiedFace.unicodeRange', 'U+0-3FF'); | 70 shouldBeEqualToString('modifiedFace.unicodeRange', 'U+0-3FF'); |
71 shouldBeEqualToString('modifiedFace.variant', 'small-caps'); | 71 shouldBeEqualToString('modifiedFace.variant', 'small-caps'); |
72 shouldBeEqualToString('modifiedFace.featureSettings', "'dlig' 1, 'liga' 0"); | 72 shouldBeEqualToString('modifiedFace.featureSettings', "'dlig' 1, 'liga' 0"); |
73 | 73 |
74 debug(''); | 74 debug(''); |
| 75 serifFace = new FontFace('serif', 'local(baz)'); |
| 76 shouldBeEqualToString('serifFace.family', ''); |
| 77 |
| 78 debug(''); |
75 face = new FontFace('test', 'local(foo)'); | 79 face = new FontFace('test', 'local(foo)'); |
76 shouldThrow("face.style = ''"); | 80 shouldThrow("face.style = ''"); |
77 shouldThrow("face.weight = 'a'"); | 81 shouldThrow("face.weight = 'a'"); |
78 shouldThrow("face.unicodeRange = 'U+'"); | 82 shouldThrow("face.unicodeRange = 'U+'"); |
79 shouldThrow("face.variant = '???'"); | 83 shouldThrow("face.variant = '???'"); |
80 shouldThrow("face.featureSettings = null"); | 84 shouldThrow("face.featureSettings = null"); |
81 promise1 = face.loaded; | 85 promise1 = face.loaded; |
82 promise2 = face.load(); | 86 promise2 = face.load(); |
83 promise3 = face.loaded; | 87 promise3 = face.loaded; |
84 shouldBeTrue('promise1 === promise2'); | 88 shouldBeTrue('promise1 === promise2'); |
(...skipping 10 matching lines...) Expand all Loading... |
95 if (document.fonts) | 99 if (document.fonts) |
96 runTests(); | 100 runTests(); |
97 else { | 101 else { |
98 testFailed('document.fonts does not exist'); | 102 testFailed('document.fonts does not exist'); |
99 } | 103 } |
100 </script> | 104 </script> |
101 </head> | 105 </head> |
102 <body> | 106 <body> |
103 </body> | 107 </body> |
104 </html> | 108 </html> |
OLD | NEW |