Rewrite tests to use ES6 modules.
[dygraphs.git] / tests / dashed-canvas.html
index dc472fa..e12d998 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../dashed-canvas.js"></script>
+  <script src="../src/polyfills/dashed-canvas.js"></script>
 </head>
 <body>
 <p>You should see solid black and blue lines with a dashed red line in between
@@ -25,7 +25,8 @@ ctx.lineTo(580, 200);
 ctx.stroke();
 
 // Draw a dashed line segment.
-ctx.installPattern([10, 10]);
+// ctx.installPattern([10, 10]);
+ctx.setLineDash([10, 10]);
 ctx.strokeStyle = 'red';
 ctx.beginPath();
 ctx.moveTo(100, 50);
@@ -42,7 +43,8 @@ ctx2.moveTo(100, 50);
 ctx2.lineTo(600, 50);
 ctx2.stroke();
 
-ctx.uninstallPattern();
+// ctx.uninstallPattern();
+ctx.setLineDash([]);
 
 // Now that we've uninstalled the pattern, should be normal again.
 ctx.strokeStyle = 'blue';