| <script src="../../resources/js-test-pre.js"></script> |
| internals.clearMemoryCache(); |
| internals.invalidateFontCache(); |
| window.jsTestIsAsync = true; |
| var font = new FontFace("WebFont", "url('../../resources/Ahem.ttf') format('truetype')"); |
| shouldBeEqualToString("font.status", "unloaded"); |
| var set1 = new FontFaceSet([font]); |
| var set2 = new FontFaceSet([font]); |
| shouldBeEqualToString("set1.status", "loaded"); |
| shouldBeEqualToString("set2.status", "loaded"); |
| shouldBeEqualToString("font.status", "loading"); |
| shouldBeEqualToString("set1.status", "loading"); |
| shouldBeEqualToString("set2.status", "loading"); |
| set1.ready.then(function() { |
| testFailed("Promise should not be rejected."); |
| set1.ready.then(function() { |
| testFailed("Promise should not be rejected."); |
| <script src="../../resources/js-test-post.js"></script> |