blob: 398693e6122508b0c9571254c249152c21625c21 [file] [log] [blame]
<html>
<head>
<script src="../../resources/js-test.js"></script>
<style>
@font-face {
font-family: Unused;
src: url("data:font/ttf,unused-font");
}
</style>
<script>
description("Tests that unused font with a data: URL is not loaded. " +
"No console warning for font load error is expected.");
window.jsTestIsAsync = true;
function getDocumentFontFaces() {
var faces = [];
document.fonts.forEach(function(face) { faces.push(face); });
return faces;
}
function doTest() {
faces = getDocumentFontFaces();
shouldBeEqualToNumber('faces.length', 1);
shouldBeEqualToString('faces[0].status', 'unloaded');
finishJSTest();
}
</script>
</head>
<body onload="doTest()">
</body>
</html>