3 <script src=
"../../js-test-resources/js-test.js"></script>
6 font-family: 'TestFont';
7 src: url(slow-ahem-loading.cgi);
11 description('Test for FontFaceSet.status attribute');
13 window
.jsTestIsAsync
= true;
16 shouldBeFalse("document.fonts.check('10px TestFont')");
17 shouldBeEqualToString("document.fonts.status", "loaded");
18 document
.fonts
.load('10px TestFont').then(onsuccess
);
19 shouldBeEqualToString("document.fonts.status", "loading");
22 function onsuccess() {
23 shouldBeTrue("document.fonts.check('10px TestFont')");
24 document
.fonts
.ready
.then(onFontsReady
);
27 function onFontsReady() {
28 shouldBeEqualToString("document.fonts.status", "loaded");
35 testFailed('document.fonts does not exist');