OLD | NEW |
---|---|
1 <html> | 1 <script src="../../resources/testharness.js"></script> |
2 <head> | 2 <script src="../../resources/testharnessreport.js"></script> |
3 <script type="text/javascript"> | |
4 if (window.testRunner) | |
5 testRunner.dumpAsText(); | |
6 | 3 |
7 function init() | 4 <script> |
8 { | 5 function runTest() |
9 var ctx = document.getElementById("canvas").getContext("2d"); | 6 { |
10 ctx.font = "font-family: Helvetica; font-size: 48pt; font-color: #000000 "; | 7 var ctx = document.createElement("canvas").getContext("2d"); |
11 ctx.fillText("Hello world", 10, 200); | 8 ctx.font = "font-family: Helvetica; font-size: 48pt; font-color: #000000"; |
12 } | 9 ctx.fillText("Hello world", 10, 200); |
13 </script> | 10 } |
14 </head> | 11 |
15 <body onload="init()"> | 12 async_test(t => { |
16 <p>This test should not crash.</p> | 13 window.onload = function() { |
Justin Novosad
2017/02/24 21:25:55
inconsistent indent
zakerinasab
2017/02/27 15:40:01
Done.
| |
17 <canvas id="canvas" height="300" width="300"></canvas> | 14 t.step(runTest); |
18 </body> | 15 t.done(); |
19 </html> | 16 } |
17 }, 'Verify that setting the font does not crash.'); | |
18 </script> | |
OLD | NEW |