blob: e0b2faa0d11322b65fa76ec554fe0c876fb93bd5 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>@font-face {
font-family: tcu-font;
src: url(support/tcu-font.woff)
}
.test {
font-size: 5em;
font-family: tcu-font;
</style>
<script>
if (window.testRunner) {
window.testRunner.waitUntilDone();
}
// Wait for the font to load before taking a snapshot.
// TODO: This is very flaky, but we don't really have any other way to wait
// for a font to load. Because of this flakiness, we do not
// automatically run this test.
window.setTimeout(function () {
// First do a layout so that Cobalt knows the font is being used and that
// it should start loading it.
window.testRunner.DoNonMeasuredLayout();
// Then, after waiting for the font to load for half of a second, go ahead
// and take a snapshot.
window.setTimeout(function () {
window.testRunner.notifyDone();
}, 500);
}, 1);
</script>
</head>
<body>
<div class="test">
aA
</div>
</body>
</html>