3 <script src=
"../../resources/js-test.js"></script>
7 src: url(../../resources/Ahem.ttf);
11 description('Checks that adding CSS in callback of fonts.loadFont() does not cause a crash.');
13 window
.jsTestIsAsync
= true;
16 var cssText
= "@font-face { font-family: 'Courier New'; src: local('Courier New') }";
17 var cssNode
= document
.createElement('style');
18 cssNode
.type
= 'text/css';
19 var head
= document
.getElementsByTagName('head')[0];
20 head
.appendChild(cssNode
);
21 var cssTextNode
= document
.createTextNode(cssText
);
22 cssNode
.appendChild(cssTextNode
);
27 document
.fonts
.load("12px ahem").then(addCss
);
29 testFailed('document.fonts does not exist');