| Index: LayoutTests/fast/css/resource-timing-for-unloaded-font.html
|
| diff --git a/LayoutTests/fast/css/resource-timing-for-unloaded-font.html b/LayoutTests/fast/css/resource-timing-for-unloaded-font.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1e63a5c0710848347f0ef7638098820195c9632b
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/css/resource-timing-for-unloaded-font.html
|
| @@ -0,0 +1,34 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<style>
|
| +@font-face {
|
| + font-family: foo;
|
| + src: url(file:///no-such-font.ttf);
|
| +}
|
| +</style>
|
| +
|
| +<script>
|
| +description('Unloaded web fonts should not report Resource Timing');
|
| +
|
| +window.jsTestIsAsync = true;
|
| +
|
| +function getDocumentFontFaces() {
|
| + var faces = [];
|
| + document.fonts.forEach(function(face) { faces.push(face); });
|
| + return faces;
|
| +}
|
| +
|
| +function verify() {
|
| + shouldBeEqualToString('getDocumentFontFaces()[0].status', 'unloaded');
|
| + entries = performance.getEntriesByName('file:///no-such-font.ttf');
|
| + shouldBe('entries.length', '0');
|
| + finishJSTest();
|
| +}
|
| +
|
| +if (location.hash == '#check') {
|
| + setTimeout(verify, 10);
|
| +} else {
|
| + location.hash = 'check';
|
| + location.reload();
|
| +}
|
| +</script>
|
|
|