Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1095)

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/invalid-set-font-crash.html

Issue 2703803002: Use testharness.js instead of js-test.js in LayoutTests/fast/canvas tests. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698