diff options
author | David Murdoch <musicisair@yahoo.com> | 2011-05-13 21:57:16 +0000 |
---|---|---|
committer | David Murdoch <musicisair@yahoo.com> | 2011-05-13 21:57:16 +0000 |
commit | cf96d225325961a24d43bbfdfcf0023bb87e3101 (patch) | |
tree | 494929574b22a57fe8355eb8e84639802293ae86 /tests/unit/position | |
parent | 939b6989c71683638415361e2f5410307b4211dc (diff) | |
download | jquery-ui-cf96d225325961a24d43bbfdfcf0023bb87e3101.tar.gz jquery-ui-cf96d225325961a24d43bbfdfcf0023bb87e3101.zip |
position now passes all tests! 0/
Diffstat (limited to 'tests/unit/position')
-rw-r--r-- | tests/unit/position/position_core.js | 3 | ||||
-rw-r--r-- | tests/unit/position/position_core_within.js | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/tests/unit/position/position_core.js b/tests/unit/position/position_core.js index 613fffa02..73b7026e6 100644 --- a/tests/unit/position/position_core.js +++ b/tests/unit/position/position_core.js @@ -314,7 +314,7 @@ test( "collision: fit, with offset", function() { test( "collision: fit, window scrolled", function() { if ( scrollTopSupport() ) { var win = $( window ); - win.scrollTop( 300 ).scrollLeft( 200 ); + $( window ).scrollTop( 300 ).scrollLeft( 200 ); collisionTest({ collision: "fit", at: "left-100 top-100" @@ -323,6 +323,7 @@ test( "collision: fit, window scrolled", function() { collision: "fit", at: "right+100 bottom+100" }, { top: 300 + win.height() - 10, left: 200 + win.width() - 10 }, "right bottom" ); + win.scrollTop( 0 ).scrollLeft( 0 ); } }); diff --git a/tests/unit/position/position_core_within.js b/tests/unit/position/position_core_within.js index 98a2f5943..2f912c6b9 100644 --- a/tests/unit/position/position_core_within.js +++ b/tests/unit/position/position_core_within.js @@ -384,7 +384,7 @@ test( "within: collision: fit, with offset", function() { }, { top: addTop + 0, left: addLeft + 0 }, "left top, negative offset" ); }); -test( "within: collision: fit, window scrolled", function() { +test( "within: collision: fit, within scrolled", function() { if ( scrollTopSupport() ) { $("#within-container").css({"width": "1000px", "height": "800px", "top": "20px", "left": "20px", "position": "relative"}); @@ -396,15 +396,13 @@ test( "within: collision: fit, window scrolled", function() { collisionTest({ collision: "fit", at: "left-100 top-100" - }, { top: addTop + 300, left: addLeft + 150 }, "top left" ); + }, { top: addTop, left: addLeft }, "top left" ); collisionTest2({ collision: "fit", at: "right+100 bottom+100" - }, { top: addTop + 300 + win.height() + 10, left: addLeft + 150 + win.width() + 10 }, "right bottom" ); + }, { top: addTop + win.height() - 10, left: addLeft + win.width() - 10 }, "right bottom" ); win.scrollTop( 0 ).scrollLeft( 0 ); - } - }); test( "within: collision: flip, no offset", function() { |