1 <!DOCTYPE html> 2 <div>Test passes if it does not crash.</div> 3 <script src="../tests.js"></script> 4 <style> 5 @font-face { 6 font-family: CanvasTest; 7 src: url("does_not_exist.ttf"); 8 } 9 </style> 10 <applet> 11 <canvas id="c"> 12 </applet> 13 <ul id="d"></ul> 14 <script> 15 if (window.layoutTestController) 16 layoutTestController.dumpAsText(); 17 18 _addTest(function(canvas, ctx) { 19 20 ctx.fillRect(0, 0, 100, 50); 21 ctx.font = '1px CanvasTest'; 22 ctx.fillText('AA', 0, 50); 23 deferTest(); 24 25 setTimeout(wrapFunction(function () { 26 ctx.fillText('AA', 0, 50); 27 28 if (window.layoutTestController) 29 layoutTestController.notifyDone(); 30 }), 500); 31 32 }); 33 </script> 34