From bed64e65cc658409961a7127b715643390919e6c Mon Sep 17 00:00:00 2001 From: Xavi Date: Sun, 9 Jan 2011 20:39:23 -0500 Subject: [PATCH] Bug 7931; Added unit tests for scrollTop/Left. --- test/unit/offset.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unit/offset.js b/test/unit/offset.js index 20bd7079..69bf6d5d 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" ); });