| <!DOCTYPE html> |
| <style></style> |
| <script> |
| if (window.testRunner) |
| testRunner.waitUntilDone(); |
| |
| function addFontFaceRule() { |
| let font = 'cachable-slow-ahem-loading.cgi?delay=50'; |
| document.styleSheets[0].insertRule( |
| '@font-face { font-family: ahem; src: url(' + font + '); }', |
| document.styleSheets[0].cssRules.length); |
| } |
| |
| addFontFaceRule(); |
| |
| document.fonts.ready.then(() => { |
| addFontFaceRule(); |
| document.fonts.onloadingdone = function() { |
| testRunner.notifyDone(); |
| }; |
| }); |
| </script> |
| <p> |
| This tests that web font is displayed correctly after revalidation of font resource. |
| |
| You should see a black square below. |
| </p> |
| <div style="font-family: ahem">test</span> |