Commit 6fbb4b43 authored by Mike Sherov's avatar Mike Sherov Committed by Rick Waldron waldron.rick@gmail.com

Update dimensions unit tests from changes in #11604

parent 6e066a4d
...@@ -17,12 +17,12 @@ function testWidth( val ) { ...@@ -17,12 +17,12 @@ function testWidth( val ) {
$div.hide(); $div.hide();
equal($div.width(), 30, "Test hidden div"); equal($div.width(), 30, "Test hidden div");
$div.show(); $div.show();
$div.width( val(-1) ); // handle negative numbers by ignoring #1599 $div.width( val(-1) ); // handle negative numbers by setting to 0 #11604
equal($div.width(), 30, "Test negative width ignored"); equal($div.width(), 0, "Test negative width normalized to 0");
$div.css("padding", "20px"); $div.css("padding", "20px");
equal($div.width(), 30, "Test padding specified with pixels"); equal($div.width(), 0, "Test padding specified with pixels");
$div.css("border", "2px solid #fff"); $div.css("border", "2px solid #fff");
equal($div.width(), 30, "Test border specified with pixels"); equal($div.width(), 0, "Test border specified with pixels");
$div.css({ display: "", border: "", padding: "" }); $div.css({ display: "", border: "", padding: "" });
...@@ -71,12 +71,12 @@ function testHeight( val ) { ...@@ -71,12 +71,12 @@ function testHeight( val ) {
$div.hide(); $div.hide();
equal($div.height(), 30, "Test hidden div"); equal($div.height(), 30, "Test hidden div");
$div.show(); $div.show();
$div.height( val(-1) ); // handle negative numbers by ignoring #1599 $div.height( val(-1) ); // handle negative numbers by setting to 0 #11604
equal($div.height(), 30, "Test negative height ignored"); equal($div.height(), 0, "Test negative height normalized to 0");
$div.css("padding", "20px"); $div.css("padding", "20px");
equal($div.height(), 30, "Test padding specified with pixels"); equal($div.height(), 0, "Test padding specified with pixels");
$div.css("border", "2px solid #fff"); $div.css("border", "2px solid #fff");
equal($div.height(), 30, "Test border specified with pixels"); equal($div.height(), 0, "Test border specified with pixels");
$div.css({ display: "", border: "", padding: "", height: "1px" }); $div.css({ display: "", border: "", padding: "", height: "1px" });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment