Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / fontface-single-font-family.html
blob63136dfa84eced5272b5da511d01b74465cebc1c
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <style>
5 @font-face {
6 font-family: 'Ahem', serif;
7 src: url(../../resources/Ahem.ttf);
9 @font-face {
10 font-family: 'Ahem2';
11 src: url('../../resources/WebKitWeightWatcher100.ttf');
13 @font-face {
14 font-family: 'Ahem3', Arial;
16 </style>
17 <script>
18 description('Test that @font-face has a single font-family-name.');
20 function runTests() {
21 shouldBe('document.styleSheets[1].cssRules.length', '3');
22 shouldBeEqualToString('document.styleSheets[1].cssRules[0].style.fontFamily', "");
23 shouldBeEqualToString('document.styleSheets[1].cssRules[1].style.fontFamily', "Ahem2");
24 shouldBeEqualToString('document.styleSheets[1].cssRules[2].style.fontFamily', "");
27 if (document.fonts)
28 runTests();
29 else {
30 testFailed('document.fonts does not exist');
32 </script>
33 </head>
34 <body>
35 </body>
36 </html>