| 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..58067b57b06d55caceebbfe554021eb8f9052ce5 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>
|
| +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() {
|
| + t.step(runTest);
|
| + t.done();
|
| }
|
| - </script>
|
| -</head>
|
| -<body onload="init()">
|
| - <p>This test should not crash.</p>
|
| - <canvas id="canvas" height="300" width="300"></canvas>
|
| -</body>
|
| -</html>
|
| +}, 'Verify that setting the font does not crash.');
|
| +</script>
|
|
|