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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-blending-helpers.js

Issue 2673013003: 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-blending-helpers.js
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-blending-helpers.js b/third_party/WebKit/LayoutTests/fast/canvas/canvas-blending-helpers.js
index af2885c0eabb3e45db0367402371b1b9bc5ef8f3..c0825df6f090bb98559b1c8cb8457bc62a327c4d 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-blending-helpers.js
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-blending-helpers.js
@@ -301,8 +301,12 @@ function nonSeparateBlendColors(backdrop, source, blendModeIndex) {
return [Math.round(255 * expectedColor[0]), Math.round(255 * expectedColor[1]), Math.round(255 * expectedColor[2]), 255];
}
-function checkBlendModeResult(i, context, sigma) {
- var actualColor = context.getImageData(0, 0, 1, 1).data;
+function checkBlendModeResult(i, context, sigma, x, y) {
+ if (x === undefined)
+ x = 0;
+ if (y === undefined)
+ y = 0;
+ var actualColor = context.getImageData(x, y, 1, 1).data;
var expectedColor = blendColors([129 / 255, 1, 129 / 255, 1], [1, 129 / 255, 129 / 255, 1], i);
assert_approx_equals(actualColor[0], expectedColor[0], sigma);
assert_approx_equals(actualColor[1], expectedColor[1], sigma);

Powered by Google App Engine
This is Rietveld 408576698