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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-with-illegal-args.js

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
Index: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-with-illegal-args.js
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-with-illegal-args.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-with-illegal-args.js
deleted file mode 100644
index 1b4694766dbf791894c4bf84c84a44035271eb66..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-with-illegal-args.js
+++ /dev/null
@@ -1,129 +0,0 @@
-description("Series of tests to ensure correct behaviour of calling canvas methods with illegal arguments (Infintiy and NaN)");
-
-var ctx;
-
-debug("Test scale.");
-ctx = document.createElement('canvas').getContext('2d');
-
-ctx.scale(NaN, 1);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(50, 50, 1, 1);
-var imgdata = imageData.data;
-shouldBe("imgdata[0]", "0");
-shouldBe("imgdata[1]", "128");
-shouldBe("imgdata[2]", "0");
-
-ctx = document.createElement('canvas').getContext('2d');
-
-ctx.scale(1, NaN);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(50, 50, 1, 1);
-var imgdata = imageData.data;
-shouldBe("imgdata[0]", "0");
-shouldBe("imgdata[1]", "128");
-shouldBe("imgdata[2]", "0");
-
-ctx = document.createElement('canvas').getContext('2d');
-
-ctx.scale(Infinity, 1);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(50, 50, 1, 1);
-var imgdata = imageData.data;
-shouldBe("imgdata[0]", "0");
-shouldBe("imgdata[1]", "128");
-shouldBe("imgdata[2]", "0");
-
-ctx = document.createElement('canvas').getContext('2d');
-
-ctx.scale(1, Infinity);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(50, 50, 1, 1);
-var imgdata = imageData.data;
-shouldBe("imgdata[0]", "0");
-shouldBe("imgdata[1]", "128");
-shouldBe("imgdata[2]", "0");
-
-
-
-debug("Test translate.");
-ctx = document.createElement('canvas').getContext('2d');
-
-ctx.translate(NaN, 1);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(50, 50, 1, 1);
-var imgdata = imageData.data;
-shouldBe("imgdata[0]", "0");
-shouldBe("imgdata[1]", "128");
-shouldBe("imgdata[2]", "0");
-
-ctx = document.createElement('canvas').getContext('2d');
-
-ctx.translate(1, NaN);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(50, 50, 1, 1);
-var imgdata = imageData.data;
-shouldBe("imgdata[0]", "0");
-shouldBe("imgdata[1]", "128");
-shouldBe("imgdata[2]", "0");
-
-ctx = document.createElement('canvas').getContext('2d');
-
-ctx.translate(Infinity, 1);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(50, 50, 1, 1);
-var imgdata = imageData.data;
-shouldBe("imgdata[0]", "0");
-shouldBe("imgdata[1]", "128");
-shouldBe("imgdata[2]", "0");
-
-ctx = document.createElement('canvas').getContext('2d');
-
-ctx.translate(1, Infinity);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(50, 50, 1, 1);
-var imgdata = imageData.data;
-shouldBe("imgdata[0]", "0");
-shouldBe("imgdata[1]", "128");
-shouldBe("imgdata[2]", "0");
-
-
-debug("Test rotate.");
-ctx = document.createElement('canvas').getContext('2d');
-
-ctx.rotate(NaN);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(50, 50, 1, 1);
-var imgdata = imageData.data;
-shouldBe("imgdata[0]", "0");
-shouldBe("imgdata[1]", "128");
-shouldBe("imgdata[2]", "0");
-
-ctx = document.createElement('canvas').getContext('2d');
-
-ctx.rotate(Infinity);
-ctx.fillStyle = 'green';
-ctx.fillRect(0, 0, 100, 100);
-
-var imageData = ctx.getImageData(50, 50, 1, 1);
-var imgdata = imageData.data;
-shouldBe("imgdata[0]", "0");
-shouldBe("imgdata[1]", "128");
-shouldBe("imgdata[2]", "0");

Powered by Google App Engine
This is Rietveld 408576698