Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / fontfaceset-loadingdone.html
blob56b9545c0d30453cbd286954e90a04eca0033839
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <style>
5 body {
6 font-family: serif;
8 @font-face {
9 font-family: 'ahem';
10 src: url(../../resources/Ahem.ttf);
12 #test {
13 position: absolute
15 #test span {
16 font-family: ahem;
18 </style>
19 <script>
20 description('Test that onloadingdone is fired after style recalculation.');
22 window.jsTestIsAsync = true;
24 function runTests() {
25 document.fonts.onloadingdone = function() {
26 debug('loadingdone');
27 testDiv = document.getElementById('test');
28 shouldBeEqualToString('window.getComputedStyle(testDiv, 0).width', '48px');
31 document.fonts.ready.then(function() {
32 debug('ready promise fulfilled');
33 shouldBeEqualToString('window.getComputedStyle(testDiv, 0).width', '48px');
34 finishJSTest();
35 });
38 if (document.fonts)
39 runTests();
40 else {
41 testFailed('document.fonts does not exist');
42 finishJSTest();
44 </script>
45 </head>
46 <body>
47 <div id=test>
48 <a href="#">
49 <span>aaa</span>
50 </a>
51 </div>
52 </body>
53 </html>