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

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: Addressing comments 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..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>

Powered by Google App Engine
This is Rietveld 408576698