aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavi <xavi.rmz@gmail.com>2011-01-09 20:39:23 -0500
committerXavi <xavi.rmz@gmail.com>2011-01-09 20:39:23 -0500
commitbed64e65cc658409961a7127b715643390919e6c (patch)
tree722e1a1de204f9f326ce20b49d4766ea579c3c6a
parent8d28f41f669168ebd436599f8b187c783fec4ba9 (diff)
downloadjquery-bed64e65cc658409961a7127b715643390919e6c.tar.gz
jquery-bed64e65cc658409961a7127b715643390919e6c.zip
Bug 7931; Added unit tests for scrollTop/Left.
-rw-r--r--test/unit/offset.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/offset.js b/test/unit/offset.js
index 20bd70799..69bf6d5d0 100644
--- a/test/unit/offset.js
+++ b/test/unit/offset.js
@@ -333,7 +333,7 @@ testoffset("table", function( jQuery ) {
});
testoffset("scroll", function( jQuery, win ) {
- expect(20);
+ expect(22);
var ie = jQuery.browser.msie && parseInt( jQuery.browser.version, 10 ) < 8;
@@ -383,6 +383,8 @@ testoffset("scroll", function( jQuery, win ) {
// Tests scrollTop/Left with empty jquery objects
notEqual( jQuery().scrollTop(100), null, "jQuery().scrollTop(100) testing setter on empty jquery object" );
notEqual( jQuery().scrollLeft(100), null, "jQuery().scrollLeft(100) testing setter on empty jquery object" );
+ notEqual( jQuery().scrollTop(null), null, "jQuery().scrollTop(null) testing setter on empty jquery object" );
+ notEqual( jQuery().scrollLeft(null), null, "jQuery().scrollLeft(null) testing setter on empty jquery object" );
strictEqual( jQuery().scrollTop(), null, "jQuery().scrollTop(100) testing setter on empty jquery object" );
strictEqual( jQuery().scrollLeft(), null, "jQuery().scrollLeft(100) testing setter on empty jquery object" );
});