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> |