| Index: LayoutTests/fast/css/font-face-unicode-range-overlap-load.html
|
| diff --git a/LayoutTests/fast/css/font-face-unicode-range-overlap-load.html b/LayoutTests/fast/css/font-face-unicode-range-overlap-load.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..322137be381e18618f32d50cb49f67b1af8ac40a
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/css/font-face-unicode-range-overlap-load.html
|
| @@ -0,0 +1,52 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<style>
|
| +@font-face {
|
| + font-family: Test1;
|
| + src: url('../../resources/Ahem.ttf');
|
| + unicode-range: U+41-5A; /* 'A'-'Z' */
|
| +}
|
| +@font-face {
|
| + font-family: Test1;
|
| + src: url('../../resources/Ahem.otf');
|
| + unicode-range: U+49; /* 'I' */
|
| +}
|
| +@font-face {
|
| + font-family: Test2;
|
| + src: url('../../resources/Ahem.woff');
|
| + unicode-range: U+41-5A; /* 'A'-'Z' */
|
| +}
|
| +@font-face {
|
| + font-family: Test2;
|
| + src: url('../../resources/Ahem.woff2');
|
| + unicode-range: U+49; /* 'I' */
|
| +}
|
| +</style>
|
| +<script>
|
| +description('Tests that only necessary fonts are loaded when font faces have overlapping unicode ranges.');
|
| +
|
| +window.jsTestIsAsync = true;
|
| +
|
| +function getDocumentFontFaces() {
|
| + var faces = [];
|
| + document.fonts.forEach(function(face) { faces.push(face); });
|
| + return faces;
|
| +}
|
| +
|
| +document.fonts.ready().then(function() {
|
| + faces = getDocumentFontFaces();
|
| + shouldBe('faces.length', '4');
|
| + shouldBeEqualToString('faces[0].status', 'unloaded');
|
| + shouldBeEqualToString('faces[1].status', 'loaded');
|
| + shouldBeEqualToString('faces[2].status', 'loaded');
|
| + shouldBeEqualToString('faces[3].status', 'unloaded');
|
| + finishJSTest();
|
| +});
|
| +</script>
|
| +</head>
|
| +<body>
|
| + <p style="font-family: Test1">I</p>
|
| + <p style="font-family: Test2">J</p>
|
| +</body>
|
| +</html>
|
|
|