From: Robert Konigsberg Date: Sun, 15 Sep 2013 04:41:49 +0000 (-0400) Subject: Make it easier to set breakpoints while testing CanvasAssertions.numLinesDrawn. X-Git-Tag: v1.1.0~82^2~5 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=32c4d92b20add8400502e8d7b1337f2170fc987c;p=dygraphs.git Make it easier to set breakpoints while testing CanvasAssertions.numLinesDrawn. --- diff --git a/auto_tests/tests/CanvasAssertions.js b/auto_tests/tests/CanvasAssertions.js index 929ba4f..62a3f49 100644 --- a/auto_tests/tests/CanvasAssertions.js +++ b/auto_tests/tests/CanvasAssertions.js @@ -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;