diff options
author | enne@chromium.org <enne@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2014-03-28 20:23:28 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2014-03-28 20:23:28 +0000 |
commit | 340e002a5bb45c8474f74c94180f5330da404c5f (patch) | |
tree | 9b281ae8b7655c9faf9bde61d386f77b64149257 /third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-fillText-invalid-maxWidth.js | |
parent | 8f037e71f858a1bb67b9fc36b6af56de93d720c6 (diff) | |
download | chromium_src-340e002a5bb45c8474f74c94180f5330da404c5f.zip chromium_src-340e002a5bb45c8474f74c94180f5330da404c5f.tar.gz chromium_src-340e002a5bb45c8474f74c94180f5330da404c5f.tar.bz2 |
Remove carriage returns from LayoutTests (02)
Split up from https://codereview.chromium.org/211393005/
Generated via:
git grep -I -l $'\r' | grep -v gif$ | grep -v mhtml | head -n 100
TBR=eseidel@chromium.org
BUG=357373
Review URL: https://codereview.chromium.org/217053008
git-svn-id: svn://svn.chromium.org/blink/trunk@170361 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-fillText-invalid-maxWidth.js')
-rw-r--r-- | third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-fillText-invalid-maxWidth.js | 92 |
1 files changed, 46 insertions, 46 deletions
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 index 69bf7dd..d75449a 100644 --- 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 @@ -1,46 +1,46 @@ -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");
- }
-}
-
+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"); + } +} + |