blob: 63136dfa84eced5272b5da511d01b74465cebc1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<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>
|