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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-to-canvas.html

Issue 2693043012: 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-to-canvas-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-to-canvas.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-to-canvas.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-to-canvas.html
index 806152778b30f83e07f18354d0c98a3acbe5737b..fb7cce8825975c4e5c56a45c583f6bf760b6e129 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-to-canvas.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-to-canvas.html
@@ -1,9 +1,23 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-</head>
-<body>
-<script src="script-tests/canvas-to-canvas.js"></script>
-</body>
-</html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+
+<script>
+test(function(t) {
+
+ var canvas = document.createElement('canvas');
+ var ctx = canvas.getContext('2d');
+
+ ctx.lineWidth = 10;
+ ctx.beginPath();
+ ctx.strokeStyle = 'green';
+ ctx.strokeRect(0, 0, 100, 100);
+
+ var ctx2 = document.createElement('canvas').getContext('2d');
+
+ ctx2.fillStyle = 'red';
+ ctx2.fillRect(0, 0, 100, 100);
+ ctx2.drawImage(canvas, 0, 0);
+ assert_array_equals(ctx2.getImageData(0, 0, 1, 1).data.slice(0,3), [0, 128, 0]);
+
+}, "Test to ensure that canvas-to-canvas drawImage after a stroked rect works correctly.");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-to-canvas-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698