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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-zero-length-lineCap.html

Issue 1883693002: Zero-length path with round/square lineCap should paint circle on Canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaseline outdated philip tests to match IE9 and Firefox Created 4 years, 8 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/canvas-zero-length-lineCap.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-zero-length-lineCap.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-zero-length-lineCap.html
new file mode 100644
index 0000000000000000000000000000000000000000..4f79c53e8c00e315ef452e9b4a05446ea3c55d9e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-zero-length-lineCap.html
@@ -0,0 +1,24 @@
+<canvas id="mycanvas" width="150" height="100"></canvas>
+<script type = 'text/javascript'>
+if (window.testRunner) {
+ testRunner.dumpAsTextWithPixelResults();
+}
+
+var canvas = document.getElementById('mycanvas');
+var ctx = canvas.getContext('2d');
+
+ctx.lineWidth = 20;
+
+// Checking whether straight lines with empty length have proper line caps
+ctx.lineCap = 'round';
+ctx.beginPath();
+ctx.moveTo(50, 50);
+ctx.lineTo(50, 50);
+ctx.stroke();
+
+ctx.lineCap = 'square';
+ctx.beginPath();
+ctx.moveTo(100, 50);
+ctx.lineTo(100, 50);
+ctx.stroke();
+</script>

Powered by Google App Engine
This is Rietveld 408576698