| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| @font-face { |
| font-family: "WebFont"; |
| font-weight: 100; |
| src: url("../../resources/Ahem_CJK.ttf") format("truetype"); |
| } |
| @font-face { |
| font-family: "WebFont"; |
| font-weight: 300; |
| src: url("../../resources/Ahem.otf") format("opentype"); |
| } |
| </style> |
| </head> |
| <body> |
| <script> |
| if (window.testRunner) |
| testRunner.waitUntilDone(); |
| |
| var promises = []; |
| |
| document.fonts.forEach(function(f) { |
| promises.push(f.loaded); |
| }); |
| |
| Promise.all(promises).then(function() { |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }); |
| </script> |
| This test makes sure that chaining font downloads works as expected. Specifically, Ahem.otf should be downloaded, but then we should realize that it doesn't support the character below, so we should download Ahem_CJK.ttf and use it because it supports the character. |
| <div style="font: 300 100px 'WebFont';">横</div> |
| </body> |
| </html> |