X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fgrid_per_axis.js;h=8e2c41aa1d78f7b1e2cad37d44ede848a8125fae;hb=7f6a719056e1da51c5a27727ac5341d6664de428;hp=e5c960f8842e377366d8a722452bd8c5968f1862;hpb=2cc8bf0ac572a857ab01ebec3aa4977ddfec8fe9;p=dygraphs.git diff --git a/auto_tests/tests/grid_per_axis.js b/auto_tests/tests/grid_per_axis.js index e5c960f..8e2c41a 100644 --- a/auto_tests/tests/grid_per_axis.js +++ b/auto_tests/tests/grid_per_axis.js @@ -249,9 +249,10 @@ GridPerAxisTestCase.prototype.testPerAxisGridWidth = function() { emptyColor, Util.samplePixel(g.hidden_, x + 2, y).slice(0, 3)); } }; + GridPerAxisTestCase.prototype.testGridLinePattern = function() { var opts = { - width : 480, + width : 120, height : 320, errorBars : false, drawXGrid : false, @@ -291,7 +292,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 +305,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; }