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: TestFont1; | 6 font-family: TestFont1; |
7 src: local('Courier New'); | 7 src: local('Courier New'); |
8 } | 8 } |
9 | 9 |
10 @font-face { | 10 @font-face { |
11 font-family: TestFont2; | 11 font-family: TestFont2; |
12 src: url(../../resources/Ahem.ttf); | 12 src: url(../../resources/Ahem.ttf); |
13 unicode-range: u+61-7a; /* 'a'-'z' */ | 13 unicode-range: u+61-7a; /* 'a'-'z' */ |
14 } | 14 } |
15 | 15 |
16 @font-face { | 16 @font-face { |
17 font-family: TestFont3; | 17 font-family: TestFont3; |
18 src: url(data:application/x-truetype-font,) format(truetype); | 18 src: url(data:application/x-truetype-font,) format("truetype"); |
19 } | 19 } |
20 | 20 |
21 @font-face { | 21 @font-face { |
22 font-family: TestFont4; | 22 font-family: TestFont4; |
23 src: url(data:application/xml,) format(svg); | 23 src: url(data:application/xml,) format("svg"); |
24 } | 24 } |
25 </style> | 25 </style> |
26 <script> | 26 <script> |
27 description('Test load events for fonts.loadFont() with multiple font families.'
); | 27 description('Test load events for fonts.loadFont() with multiple font families.'
); |
28 | 28 |
29 window.jsTestIsAsync = true; | 29 window.jsTestIsAsync = true; |
30 | 30 |
31 function runTests() { | 31 function runTests() { |
32 document.fonts.addEventListener('loading', onLoading); | 32 document.fonts.addEventListener('loading', onLoading); |
33 document.fonts.addEventListener('loadingdone', onLoadingDone); | 33 document.fonts.addEventListener('loadingdone', onLoadingDone); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 runTests(); | 81 runTests(); |
82 else { | 82 else { |
83 testFailed('document.fonts does not exist'); | 83 testFailed('document.fonts does not exist'); |
84 finishJSTest(); | 84 finishJSTest(); |
85 } | 85 } |
86 </script> | 86 </script> |
87 </head> | 87 </head> |
88 <body> | 88 <body> |
89 </body> | 89 </body> |
90 </html> | 90 </html> |
OLD | NEW |