3 <script src=
"../../resources/js-test.js"></script>
11 src: url(../../resources/Ahem.ttf);
14 font-family: TestFont;
24 description('Tests that adding/removing a FontFace to/from FontFaceSet trigger font update.');
26 window
.jsTestIsAsync
= true;
29 ahemFace
= new FontFace('TestFont', 'url(../../resources/Ahem.ttf)', {});
30 ahemFace
.load().then(verify
);
34 testElement
= document
.getElementById('test');
35 arialElement
= document
.getElementById('arial');
36 ahemElement
= document
.getElementById('ahem');
38 shouldBe('testElement.offsetWidth', 'arialElement.offsetWidth');
39 document
.fonts
.add(ahemFace
);
40 shouldBe('testElement.offsetWidth', 'ahemElement.offsetWidth');
41 document
.fonts
.delete(ahemFace
);
42 shouldBe('testElement.offsetWidth', 'arialElement.offsetWidth');
43 document
.fonts
.add(ahemFace
);
44 shouldBe('testElement.offsetWidth', 'ahemElement.offsetWidth');
45 document
.fonts
.clear();
46 shouldBe('testElement.offsetWidth', 'arialElement.offsetWidth');
52 <body onload=
"runTest()">
53 <span id=
"test">abcdefg
</span>
54 <span id=
"arial">abcdefg
</span>
55 <span id=
"ahem">abcdefg
</span>