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

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

Issue 1381973002: Disable canvas line dashing when dash sequence is all zeros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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-lineDash.js
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-lineDash.js b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-lineDash.js
index 885bb4afb6b1bf4d9d2e9a7eedcd06de69dcee7d..0614b31da343b33111c33595bd52592875d165b8 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-lineDash.js
+++ b/third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-lineDash.js
@@ -104,3 +104,11 @@ pixelShouldBe(105, 40, [0, 255, 0, 255]);
pixelShouldBe(90, 35, [0, 0, 0, 0]);
pixelShouldBe(90, 25, [0, 255, 0, 255]);
+// Verify that all zero dash sequence results in no dashing
+ctx.setLineDash([0, 0]);
Stephen White 2015/10/01 15:46:02 Please add a [null, null] case as well, since it's
Justin Novosad 2015/10/01 16:06:42 Done.
+ctx.lineDashOffset = 0;
+ctx.strokeRect(130.5, 10.5, 30, 30);
+pixelShouldBe(130, 10, [0, 255, 0, 255]);
+pixelShouldBe(130, 15, [0, 255, 0, 255]);
+pixelShouldBe(130, 25, [0, 255, 0, 255]);
+pixelShouldBe(130, 35, [0, 255, 0, 255]);

Powered by Google App Engine
This is Rietveld 408576698