blob: 63136dfa84eced5272b5da511d01b74465cebc1c [file] [log] [blame]
<html>
<head>
<script src="../../resources/js-test.js"></script>
<style>
@font-face {
font-family: 'Ahem', serif;
src: url(../../resources/Ahem.ttf);
}
@font-face {
font-family: 'Ahem2';
src: url('../../resources/WebKitWeightWatcher100.ttf');
}
@font-face {
font-family: 'Ahem3', Arial;
}
</style>
<script>
description('Test that @font-face has a single font-family-name.');
function runTests() {
shouldBe('document.styleSheets[1].cssRules.length', '3');
shouldBeEqualToString('document.styleSheets[1].cssRules[0].style.fontFamily', "");
shouldBeEqualToString('document.styleSheets[1].cssRules[1].style.fontFamily', "Ahem2");
shouldBeEqualToString('document.styleSheets[1].cssRules[2].style.fontFamily', "");
}
if (document.fonts)
runTests();
else {
testFailed('document.fonts does not exist');
}
</script>
</head>
<body>
</body>
</html>