OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style></style> |
| 3 <script> |
| 4 if (window.testRunner) |
| 5 testRunner.waitUntilDone(); |
| 6 |
| 7 function addFontFaceRule() { |
| 8 let font = 'cachable-slow-ahem-loading.cgi?delay=50'; |
| 9 document.styleSheets[0].insertRule( |
| 10 '@font-face { font-family: ahem; src: url(' + font + '); }', |
| 11 document.styleSheets[0].cssRules.length); |
| 12 } |
| 13 |
| 14 addFontFaceRule(); |
| 15 |
| 16 document.fonts.ready.then(() => { |
| 17 addFontFaceRule(); |
| 18 document.fonts.onloadingdone = function() { |
| 19 testRunner.notifyDone(); |
| 20 }; |
| 21 }); |
| 22 </script> |
| 23 <p> |
| 24 This tests that web font is displayed correctly after revalidation of font resou
rce. |
| 25 |
| 26 You should see a black square below. |
| 27 </p> |
| 28 <div style="font-family: ahem">test</span> |
OLD | NEW |