| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| @font-face { |
| font-family: "WebFont"; |
| font-weight: 400; |
| src: url("../../resources/Ahem.otf"); |
| } |
| @font-face { |
| font-family: "WebFont"; |
| font-weight: 500; |
| src: local("asdfasdf"), url("../../resources/Ahem.ttf"); |
| } |
| </style> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <div id="target" style="font: 48px 'WebFont', 'Helvetica';">Hello</div> |
| <script> |
| window.jsTestIsAsync = true; |
| description("This test makes sure the ready promise is resolved even when we interrogate an @font-face block to see if it can be used as an interstitial font."); |
| let target = document.getElementById("target"); |
| target.offsetWidth; |
| document.fonts.ready.then(function() { |
| finishJSTest(); |
| }); |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |