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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-setTransform.js

Issue 2693193003: 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/script-tests/canvas-setTransform.js
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-setTransform.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-setTransform.js
deleted file mode 100644
index e2768bc3d848969a7b03086c686a817ff79717aa..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-setTransform.js
+++ /dev/null
@@ -1,97 +0,0 @@
-description("Series of tests to ensure correct behaviour of canvas.setTransform()");
-var ctx = document.createElement('canvas').getContext('2d');
-
-debug("Reset the CTM to the initial matrix");
-ctx.beginPath();
-ctx.scale(0.5, 0.5);
-ctx.setTransform(1, 0, 0, 1, 0, 0);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(1, 1, 98, 98);
-var imgdata = imageData.data;
-shouldBe("imgdata[4]", "0");
-shouldBe("imgdata[5]", "128");
-shouldBe("imgdata[6]", "0");
-
-debug("setTransform should not affect the current path");
-ctx.beginPath();
-ctx.rect(0,0,100,100);
-ctx.save();
-ctx.setTransform(0.5, 0, 0, 0.5, 10, 10);
-ctx.fillStyle = 'red';
-ctx.fillRect(0, 0, 100, 100);
-ctx.restore();
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-imageData = ctx.getImageData(1, 1, 98, 98);
-imgdata = imageData.data;
-shouldBe("imgdata[4]", "0");
-shouldBe("imgdata[5]", "128");
-shouldBe("imgdata[6]", "0");
-
-debug("setTransform should not affect the CTM outside of save() and restore()");
-ctx.beginPath();
-ctx.fillStyle = 'green';
-ctx.save();
-ctx.setTransform(0.5, 0, 0, 0.5, 0, 0);
-ctx.fillStyle = 'red';
-ctx.fillRect(0, 0, 100, 100);
-ctx.restore();
-ctx.fillRect(0, 0, 100, 100);
-
-imageData = ctx.getImageData(1, 1, 98, 98);
-imgdata = imageData.data;
-shouldBe("imgdata[4]", "0");
-shouldBe("imgdata[5]", "128");
-shouldBe("imgdata[6]", "0");
-
-
-debug("stop drawing on not-invertible CTM");
-ctx.beginPath();
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-ctx.setTransform(0, 0, 0, 0, 0, 0);
-ctx.fillStyle = 'red';
-ctx.fillRect(0, 0, 100, 100);
-
-imageData = ctx.getImageData(1, 1, 98, 98);
-imgdata = imageData.data;
-shouldBe("imgdata[4]", "0");
-shouldBe("imgdata[5]", "128");
-shouldBe("imgdata[6]", "0");
-
-debug("setTransform with a not-invertible matrix should only stop the drawing up to the next restore()");
-ctx.beginPath();
-ctx.resetTransform();
-ctx.save();
-ctx.setTransform(0, 0, 0, 0, 0, 0);
-ctx.fillStyle = 'red';
-ctx.fillRect(0, 0, 100, 100);
-ctx.restore();
-ctx.fillStyle = 'blue';
-ctx.fillRect(0, 0, 100, 100);
-
-imageData = ctx.getImageData(1, 1, 98, 98);
-imgdata = imageData.data;
-shouldBe("imgdata[4]", "0");
-shouldBe("imgdata[5]", "0");
-shouldBe("imgdata[6]", "255");
-
-debug("setTransform should set transform although CTM is not-invertible");
-ctx.beginPath();
-ctx.fillStyle = 'red';
-ctx.fillRect(0, 0, 100, 100);
-ctx.setTransform(0, 0, 0, 0, 0, 0);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-ctx.setTransform(1, 0, 0, 1, 0, 0);
-ctx.fillStyle = 'blue';
-ctx.fillRect(0, 0, 100, 100);
-
-imageData = ctx.getImageData(1, 1, 98, 98);
-imgdata = imageData.data;
-shouldBe("imgdata[4]", "0");
-shouldBe("imgdata[5]", "0");
-shouldBe("imgdata[6]", "255");

Powered by Google App Engine
This is Rietveld 408576698