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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-empty-image-pattern.html

Issue 2678493002: 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/canvas-empty-image-pattern.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-empty-image-pattern.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-empty-image-pattern.html
index 943905018fb50cbfea04207a5d287676b7bc0057..bc20d9784398d9f630e3b56b4b8f5a4cccdd279e 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-empty-image-pattern.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-empty-image-pattern.html
@@ -1,15 +1,11 @@
-<!DOCTYPE HTML>
-<title>Canvas test: filling a pattern with an empty image should not crash and should return a null pattern.</title>
-<div id="console"></div>
-<canvas id="canvas" class="output" width="100" height="100"><p class="fallback">FAIL (fallback content)</p></canvas>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<canvas id="canvas" width="100" height="100"></canvas>
-var canvas = document.getElementById("canvas").getContext("2d");
-var pattern = canvas.createPattern(new Image, "repeat")
-if (pattern)
- document.getElementById("console").innerHTML = "TEST FAILED";
-else
- document.getElementById("console").innerHTML = "TEST PASSED";
+<script>
+test(function(t) {
+ var ctx = document.getElementById("canvas").getContext("2d");
+ var pattern = ctx.createPattern(new Image, "repeat")
+ assert_equals(pattern, null);
+}, 'Test if filling a pattern with an empty image does not crash and returns a null pattern.');
</script>

Powered by Google App Engine
This is Rietveld 408576698