From: Robert Konigsberg Date: Tue, 4 Jun 2013 21:38:25 +0000 (-0400) Subject: Reduce the width of testGridLinePattern from 480px to 120px, making the test run... X-Git-Tag: v1.0.0~26 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=1dc23fac4c126b2b3742801b2d82137044498ebf;p=dygraphs.git Reduce the width of testGridLinePattern from 480px to 120px, making the test run in 150ms instead of ~8000ms. --- diff --git a/auto_tests/tests/grid_per_axis.js b/auto_tests/tests/grid_per_axis.js index e5c960f..9731514 100644 --- a/auto_tests/tests/grid_per_axis.js +++ b/auto_tests/tests/grid_per_axis.js @@ -251,7 +251,7 @@ GridPerAxisTestCase.prototype.testPerAxisGridWidth = function() { }; GridPerAxisTestCase.prototype.testGridLinePattern = function() { var opts = { - width : 480, + width : 120, height : 320, errorBars : false, drawXGrid : false, @@ -291,7 +291,7 @@ GridPerAxisTestCase.prototype.testGridLinePattern = function() { } var x, y; // Step through all gridlines of the axis - for ( var i = 0; i < yGridlines.length; i++) { + for (var i = 0; i < yGridlines.length; i++) { y = halfDown(g.toDomYCoord(yGridlines[i], 0)); // Step through the pixels of the line and test the pattern. for (x = halfUp(g.plotter_.area.x); x < g.plotter_.area.w; x++) { @@ -304,11 +304,11 @@ GridPerAxisTestCase.prototype.testGridLinePattern = function() { var pattern = (Math.floor((x) / 10)) % 2; switch (pattern) { case 0: // fill - assertEquals("Unexpected filled grid-pattern color found at pixel: x: " + x + "y: " + assertEquals("Unexpected filled grid-pattern color found at pixel: x: " + x + " y: " + y, [ 0, 0, 255 ], drawnPixel); break; case 1: // no fill - assertEquals("Unexpected empty grid-pattern color found at pixel: x: " + x + "y: " + assertEquals("Unexpected empty grid-pattern color found at pixel: x: " + x + " y: " + y, [ 0, 0, 0 ], drawnPixel); break; }