| <script src="../../resources/js-test-pre.js"></script> |
| src: url(../../resources/Ahem.ttf); |
| description('Test that onloadingdone is fired after style recalculation.'); |
| window.jsTestIsAsync = true; |
| document.fonts.onloadingdone = function() { |
| testDiv = document.getElementById('test'); |
| shouldBeEqualToString('window.getComputedStyle(testDiv, 0).width', '48px'); |
| document.fonts.notifyWhenFontsReady(function() { |
| debug('notifyWhenFontsReady() callback'); |
| shouldBeEqualToString('window.getComputedStyle(testDiv, 0).width', '48px'); |
| testFailed('document.fonts does not exist'); |
| <script src="../../resources/js-test-post.js"></script> |