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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-fillText-invalid-maxWidth.js

Issue 2676493005: 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-fillText-invalid-maxWidth.js
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-fillText-invalid-maxWidth.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-fillText-invalid-maxWidth.js
deleted file mode 100644
index d75449ae4cc9e68276a462d81cf44d5233cdfcdd..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-fillText-invalid-maxWidth.js
+++ /dev/null
@@ -1,46 +0,0 @@
-descriptionQuiet("Series of tests to ensure that fillText() does not display any text when maxWidth is invalid.");
-
-var canvas = document.createElement('canvas');
-var ctx = canvas.getContext('2d');
-var canvasWidth = 100;
-var canvasHeight = 50;
-canvas.setWidth = canvasWidth;
-canvas.setHeight = canvasHeight;
-
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, canvasWidth, canvasHeight);
-ctx.font = '35px Arial, sans-serif';
-
-debug("Test canvas.fillText() with maxWidth zero");
-ctx.fillStyle = '#f00';
-ctx.fillText("fail fail fail fail fail", 5, 35, 0);
-
-var imageData = ctx.getImageData(0, 0, canvasWidth, canvasHeight);
-var w = imageData.width, h = imageData.height, d = imageData.data;
-for (var i = 0; i < h; ++i) {
- for (var j = 0; j < w; ++j) {
- if (d[4 * (w * i + j) + 0] != 0) shouldBe("d[4 * (w * i + j) + 0]", "0");
- if (d[4 * (w * i + j) + 1] != 255) shouldBe("d[4 * (w * i + j) + 1]", "255");
- if (d[4 * (w * i + j) + 2] != 0) shouldBe("d[4 * (w * i + j) + 2]", "0");
- if (d[4 * (w * i + j) + 3] != 255) shouldBe("d[4 * (w * i + j) + 3]", "255");
- }
-}
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, canvasWidth, canvasHeight);
-debug("Test canvas.fillText() with maxWidth -1");
-ctx.fillStyle = '#f00';
-ctx.fillText("fail fail fail fail fail", 5, 35, -1);
-
-var imageData = ctx.getImageData(0, 0, canvasWidth, canvasHeight);
-var w = imageData.width, h = imageData.height, d = imageData.data;
-for (var i = 0; i < h; ++i) {
- for (var j = 0; j < w; ++j) {
- if (d[4 * (w * i + j) + 0] != 0) shouldBe("d[4 * (w * i + j) + 0]", "0");
- if (d[4 * (w * i + j) + 1] != 255) shouldBe("d[4 * (w * i + j) + 1]", "255");
- if (d[4 * (w * i + j) + 2] != 0) shouldBe("d[4 * (w * i + j) + 2]", "0");
- if (d[4 * (w * i + j) + 3] != 255) shouldBe("d[4 * (w * i + j) + 3]", "255");
- }
-}
-

Powered by Google App Engine
This is Rietveld 408576698