X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fdimensions.js;h=8255bf325095aacbc3dddce2a62bc67b28d5a762;hb=3394d32ea75cffb8c8c386d607823cae878b9145;hp=92cf17b7d876c4cdc80660c135259fea46a76931;hpb=795e880bba1f7f949df58748f7fd92e50296a8f4;p=jquery.git diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js index 92cf17b..8255bf3 100644 --- a/test/unit/dimensions.js +++ b/test/unit/dimensions.js @@ -103,7 +103,7 @@ test("height() with function args", function() { }); test("innerWidth()", function() { - expect(3); + expect(4); var $div = jQuery("#nothiddendiv"); // set styles @@ -121,10 +121,15 @@ test("innerWidth()", function() { // reset styles $div.css({ display: "", border: "", padding: "", width: "", height: "" }); + + var div = jQuery( "
" ); + + // Temporarily require 0 for backwards compat - should be auto + equals( div.innerWidth(), 0, "Make sure that disconnected nodes are handled." ); }); test("innerHeight()", function() { - expect(3); + expect(4); var $div = jQuery("#nothiddendiv"); // set styles @@ -142,10 +147,15 @@ test("innerHeight()", function() { // reset styles $div.css({ display: "", border: "", padding: "", width: "", height: "" }); + + var div = jQuery( "
" ); + + // Temporarily require 0 for backwards compat - should be auto + equals( div.innerHeight(), 0, "Make sure that disconnected nodes are handled." ); }); test("outerWidth()", function() { - expect(6); + expect(7); var $div = jQuery("#nothiddendiv"); $div.css("width", 30); @@ -164,10 +174,15 @@ test("outerWidth()", function() { // reset styles $div.css({ position: "", display: "", border: "", padding: "", width: "", height: "" }); + + var div = jQuery( "
" ); + + // Temporarily require 0 for backwards compat - should be auto + equals( div.outerWidth(), 0, "Make sure that disconnected nodes are handled." ); }); test("outerHeight()", function() { - expect(6); + expect(7); var $div = jQuery("#nothiddendiv"); $div.css("height", 30); @@ -185,4 +200,9 @@ test("outerHeight()", function() { // reset styles $div.css({ display: "", border: "", padding: "", width: "", height: "" }); + + var div = jQuery( "
" ); + + // Temporarily require 0 for backwards compat - should be auto + equals( div.outerHeight(), 0, "Make sure that disconnected nodes are handled." ); });