]> source.dussan.org Git - jquery.git/commitdiff
Bug 7931; Added unit tests for scrollTop/Left.
authorXavi <xavi.rmz@gmail.com>
Mon, 10 Jan 2011 01:39:23 +0000 (20:39 -0500)
committerXavi <xavi.rmz@gmail.com>
Mon, 10 Jan 2011 01:39:23 +0000 (20:39 -0500)
test/unit/offset.js

index 20bd70799c49f7c18338ce8269ca9207fb20b2a1..69bf6d5d0c77652b725ab620efe3a3582cb48426 100644 (file)
@@ -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" );
 });