OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="/js-test-resources/js-test.js"></script> | |
3 <style> | |
4 @font-face { | |
5 font-family: ahem; | |
6 src: url(http://localhost:8080/css/resources/cors-ahem.php); | |
7 } | |
8 </style> | |
9 | |
10 <div style="font-family: ahem;">This fetches ahem font.<div> | |
11 | |
12 <script> | |
13 var entry; | |
14 if (location.hash == '#check') { | |
15 document.fonts.ready().then(function() { | |
16 entry = performance.getEntriesByName('http://localhost:8080/css/resource s/cors-ahem.php')[0]; | |
17 shouldBeTrue('entry.domainLookupStart > 0'); | |
18 if (window.testRunner) | |
19 testRunner.notifyDone(); | |
20 }); | |
21 } else { | |
22 if (window.testRunner) | |
23 testRunner.waitUntilDone(); | |
Nate Chapin
2014/05/10 02:16:40
I'd put this at the top of the <script> tag, it's
bashi
2014/05/10 02:41:07
Done.
| |
24 | |
25 document.fonts.ready().then(function() { | |
26 location.hash = 'check'; | |
27 location.reload(); | |
28 }); | |
29 } | |
30 </script> | |
OLD | NEW |