From: Robert Konigsberg Date: Mon, 27 Jun 2011 22:38:53 +0000 (-0400) Subject: Bad test! Use pixel counts, don't rely on stupid anchor tags. X-Git-Tag: v1.0.0~457^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=a307700238038a375a5fcc4ca2553685debb4e6f;p=dygraphs.git Bad test! Use pixel counts, don't rely on stupid anchor tags. --- diff --git a/auto_tests/tests/scrolling_div.js b/auto_tests/tests/scrolling_div.js index a97874b..527f046 100644 --- a/auto_tests/tests/scrolling_div.js +++ b/auto_tests/tests/scrolling_div.js @@ -17,11 +17,10 @@ var LOREM_IPSUM = "laborum.

"; document.body.innerHTML = - "
" + - "
" + + "
" + + "
" + "
" + LOREM_IPSUM + "
" + "
" + LOREM_IPSUM + "
" + - "" + "
"; var data = [ @@ -59,7 +58,7 @@ ScrollingDivTestCase.prototype.tearDown = function() { */ ScrollingDivTestCase.prototype.testUnscrolledDiv = function() { - window.location.href="#TOP"; + document.getElementById('scroller').scrollTop = 0; var clickOn4_40 = { clientX: 244, @@ -80,7 +79,7 @@ ScrollingDivTestCase.prototype.testUnscrolledDiv = function() { * This tests that when the nested div is scrolled, things work normally. */ ScrollingDivTestCase.prototype.testScrolledDiv = function() { - window.location.href="#BOTTOM"; + document.getElementById('scroller').scrollTop = 117; var clickOn4_40 = { clientX: 244,