2 <script src=
"/js-test-resources/js-test.js"></script>
4 <div id=
"target">Hello webfont
</div>
8 testRunner
.waitUntilDone();
10 var waitMillisBeforeFetching
= 300;
12 var fontFace
= new FontFace('ahem', "url('../../../../misc/resources/acid3/font.ttf')");
13 document
.fonts
.add(fontFace
);
15 new Promise(function(resolve
) {
16 setTimeout(resolve
, waitMillisBeforeFetching
);
18 var target
= document
.getElementById('target');
19 target
.style
['font-family'] = 'ahem';
20 return fontFace
.loaded
;
22 var name
= document
.location
.origin
+ '/misc/resources/acid3/font.ttf';
23 entry
= window
.performance
.getEntriesByName(name
)[0];
24 shouldBeTrue('entry.startTime >= waitMillisBeforeFetching');
25 if (window
.testRunner
)
26 testRunner
.notifyDone();