3 <script src=
"../../resources/js-test.js"></script>
7 src: url('../../resources/Ahem.ttf');
8 unicode-range: U+
41-
5A; /* 'A'-'Z' */
12 src: url('../../resources/Ahem.otf');
13 unicode-range: U+
49; /* 'I' */
17 src: url('../../resources/Ahem.woff');
18 unicode-range: U+
41-
5A; /* 'A'-'Z' */
22 src: url('../../resources/Ahem.woff2');
23 unicode-range: U+
49; /* 'I' */
27 src: url('../../resources/Ahem.ttf');
28 /* no unicode-range */
32 src: url('../../resources/Ahem.otf');
33 unicode-range: U+
00-FF;
37 description('Tests that only necessary fonts are loaded when font faces have overlapping unicode ranges.');
39 window
.jsTestIsAsync
= true;
41 function getDocumentFontFaces() {
43 document
.fonts
.forEach(function(face
) { faces
.push(face
); });
47 document
.fonts
.ready
.then(function() {
48 faces
= getDocumentFontFaces();
49 shouldBe('faces.length', '6');
50 shouldBeEqualToString('faces[0].status', 'unloaded');
51 shouldBeEqualToString('faces[1].status', 'loaded');
52 shouldBeEqualToString('faces[2].status', 'loaded');
53 shouldBeEqualToString('faces[3].status', 'unloaded');
54 shouldBeEqualToString('faces[4].status', 'unloaded');
55 shouldBeEqualToString('faces[5].status', 'loaded');
61 <p style=
"font-family: Test1">I
</p>
62 <p style=
"font-family: Test2">J
</p>
63 <p style=
"font-family: Test3">K
</p>