OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <script> | 6 <script> |
7 description('Call FontFaceSet::ready in a detached frame.'); | 7 description('Call FontFaceSet::ready in a detached frame.'); |
8 | 8 |
9 if (window.testRunner) | 9 if (window.testRunner) |
10 testRunner.dumpAsText(); | 10 testRunner.dumpAsText(); |
11 | 11 |
12 function runTests() { | 12 function runTests() { |
13 var frame = document.createElement('iframe'); | 13 var frame = document.createElement('iframe'); |
14 document.body.appendChild(frame); | 14 document.body.appendChild(frame); |
15 var doc = frame.contentDocument; | 15 var doc = frame.contentDocument; |
16 document.body.removeChild(frame); | 16 document.body.removeChild(frame); |
17 doc.fonts.ready(); | 17 doc.fonts.ready; |
18 } | 18 } |
19 | 19 |
20 if (document.fonts) { | 20 if (document.fonts) { |
21 runTests(); | 21 runTests(); |
22 } else { | 22 } else { |
23 testFailed('document.fonts does not exist'); | 23 testFailed('document.fonts does not exist'); |
24 } | 24 } |
25 </script> | 25 </script> |
26 </body> | 26 </body> |
27 </html> | 27 </html> |
OLD | NEW |