Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / canvas / philip / tests / 2d.text-custom-font-load-crash.html
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.testRunner)
16     testRunner.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.testRunner)
29         testRunner.notifyDone();
30 }), 500);
31
32 });
33 </script>