Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/canvas/invalid-set-font-crash.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/canvas/invalid-set-font-crash.html b/third_party/WebKit/LayoutTests/fast/canvas/invalid-set-font-crash.html |
| index 5bfc9702046d518f16309bd91f3889dd8ef9de05..f7ea8dd05fe098ae2a4562cf7f1530559666b22f 100644 |
| --- a/third_party/WebKit/LayoutTests/fast/canvas/invalid-set-font-crash.html |
| +++ b/third_party/WebKit/LayoutTests/fast/canvas/invalid-set-font-crash.html |
| @@ -1,19 +1,18 @@ |
| -<html> |
| -<head> |
| - <script type="text/javascript"> |
| - if (window.testRunner) |
| - testRunner.dumpAsText(); |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| - function init() |
| - { |
| - var ctx = document.getElementById("canvas").getContext("2d"); |
| - ctx.font = "font-family: Helvetica; font-size: 48pt; font-color: #000000"; |
| - ctx.fillText("Hello world", 10, 200); |
| - } |
| - </script> |
| -</head> |
| -<body onload="init()"> |
| - <p>This test should not crash.</p> |
| - <canvas id="canvas" height="300" width="300"></canvas> |
| -</body> |
| -</html> |
| +<script> |
| +function runTest() |
| +{ |
| + var ctx = document.createElement("canvas").getContext("2d"); |
| + ctx.font = "font-family: Helvetica; font-size: 48pt; font-color: #000000"; |
| + ctx.fillText("Hello world", 10, 200); |
| +} |
| + |
| +async_test(t => { |
| + window.onload = function() { |
|
Justin Novosad
2017/02/24 21:25:55
inconsistent indent
zakerinasab
2017/02/27 15:40:01
Done.
|
| + t.step(runTest); |
| + t.done(); |
| + } |
| +}, 'Verify that setting the font does not crash.'); |
| +</script> |