| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="/js-test-resources/js-test.js"></script> | 2 <script src="/js-test-resources/js-test.js"></script> |
| 3 <style> | 3 <style> |
| 4 @font-face { | 4 @font-face { |
| 5 font-family: ahem; | 5 font-family: ahem; |
| 6 src: url(http://localhost:8080/css/resources/cors-ahem.php); | 6 src: url(http://localhost:8080/css/resources/cors-ahem.php); |
| 7 } | 7 } |
| 8 </style> | 8 </style> |
| 9 | 9 |
| 10 <div style="font-family: ahem;">This fetches ahem font.<div> | 10 <div style="font-family: ahem;">This fetches ahem font.<div> |
| 11 | 11 |
| 12 <script> | 12 <script> |
| 13 if (window.testRunner) | 13 if (window.testRunner) |
| 14 testRunner.waitUntilDone(); | 14 testRunner.waitUntilDone(); |
| 15 | 15 |
| 16 var entry; | 16 var entry; |
| 17 if (location.hash == '#check') { | 17 if (location.hash == '#check') { |
| 18 document.fonts.ready().then(function() { | 18 document.fonts.ready.then(function() { |
| 19 setTimeout(function() { | 19 setTimeout(function() { |
| 20 entry = performance.getEntriesByName('http://localhost:8080/css/reso
urces/cors-ahem.php')[0]; | 20 entry = performance.getEntriesByName('http://localhost:8080/css/reso
urces/cors-ahem.php')[0]; |
| 21 shouldBeTrue('entry.domainLookupStart > 0'); | 21 shouldBeTrue('entry.domainLookupStart > 0'); |
| 22 if (window.testRunner) | 22 if (window.testRunner) |
| 23 testRunner.notifyDone(); | 23 testRunner.notifyDone(); |
| 24 }, 10); | 24 }, 10); |
| 25 }); | 25 }); |
| 26 } else { | 26 } else { |
| 27 document.fonts.ready().then(function() { | 27 document.fonts.ready.then(function() { |
| 28 setTimeout(function() { | 28 setTimeout(function() { |
| 29 location.hash = 'check'; | 29 location.hash = 'check'; |
| 30 location.reload(); | 30 location.reload(); |
| 31 }, 10); | 31 }, 10); |
| 32 }); | 32 }); |
| 33 } | 33 } |
| 34 </script> | 34 </script> |
| OLD | NEW |