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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/resize-while-save-active.html

Issue 2701053003: 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/resize-while-save-active.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/resize-while-save-active.html b/third_party/WebKit/LayoutTests/fast/canvas/resize-while-save-active.html
index bcd1e9bdd44d84f6f452908dd5d5825d80563dc6..f431951af7813a2fa799f05bd2fde191767b050b 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/resize-while-save-active.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/resize-while-save-active.html
@@ -1,14 +1,9 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-</head>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<body>
<canvas id="mycanvas" width="512" height="512"></canvas>
<script>
-if (window.testRunner)
- testRunner.dumpAsText()
-onload = function()
-{
+function runTest() {
var canvas = document.getElementById('mycanvas');
var ctx = canvas.getContext('2d');
ctx.fillStyle = "rgb(255,165,0)";
@@ -17,8 +12,13 @@ onload = function()
canvas.width = 256;
ctx.fillStyle = "rgb(255,165,0)";
ctx.fillRect(0, 0, 256, 512);
- document.body.appendChild(document.createElement("p")).appendChild(document.createTextNode("If we got this far without an assertion, this test passed."));
-};
+}
+
+async_test(t => {
+ window.onload = function() {
+ t.step(runTest);
+ t.done();
+ }
+}, 'Verify that canvas resize after save does not crash.');
</script>
</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698