Make it easier to set breakpoints while testing CanvasAssertions.numLinesDrawn.
authorRobert Konigsberg <konigsberg@gmail.com>
Sun, 15 Sep 2013 04:41:49 +0000 (00:41 -0400)
committerRobert Konigsberg <konigsberg@gmail.com>
Sun, 15 Sep 2013 04:41:49 +0000 (00:41 -0400)
auto_tests/tests/CanvasAssertions.js

index 929ba4f..62a3f49 100644 (file)
@@ -185,8 +185,10 @@ CanvasAssertions.numLinesDrawn = function(proxy, color) {
   var num_lines = 0;
   for (var i = 0; i < proxy.calls__.length; i++) {
     var call = proxy.calls__[i];
-    if (call.name == "lineTo" && call.properties.strokeStyle == color) {
-      num_lines++;
+    if (call.name == "lineTo") {
+      if (call.properties.strokeStyle == color) {
+        num_lines++;
+      }
     }
   }
   return num_lines;