5 src: url(../../resources/Ahem.ttf);
10 window
.testRunner
.waitUntilDone();
12 function getDocumentFontFaces() {
14 document
.fonts
.forEach(function(face
) { faces
.push(face
); });
19 var face
= getDocumentFontFaces()[0];
21 document
.getElementById("t").style
.fontFamily
= "myahem";
22 document
.body
.offsetTop
; // force recalc and start loading font.
24 var newStyle
= document
.createElement("style");
25 newStyle
.innerHTML
= "#dummy { color: red; }";
26 var referenceNode
= document
.getElementById("sheet");
27 referenceNode
.parentNode
.insertBefore(newStyle
, referenceNode
);
29 face
.loaded
.then(finish
);
33 if (window
.testRunner
)
34 window
.testRunner
.notifyDone();
38 // FIXME: we need a better way of waiting for chromium events to happen
39 setTimeout(runTest
, 1);
42 <p>You should see a black rectangle below.
</p>
43 <div id=
"t">FAIL
</div>