3 test("innerWidth()", function() {
6 var $div = jQuery("#nothiddendiv");
10 border: "2px solid #fff",
14 equals($div.innerWidth(), 30, "Test with margin and border");
15 $div.css("padding", "20px");
16 equals($div.innerWidth(), 70, "Test with margin, border and padding");
18 equals($div.innerWidth(), 70, "Test hidden div");
21 $div.css({ display: "", border: "", padding: "", width: "", height: "" });
24 test("innerHeight()", function() {
27 var $div = jQuery("#nothiddendiv");
31 border: "2px solid #fff",
35 equals($div.innerHeight(), 30, "Test with margin and border");
36 $div.css("padding", "20px");
37 equals($div.innerHeight(), 70, "Test with margin, border and padding");
39 equals($div.innerHeight(), 70, "Test hidden div");
42 $div.css({ display: "", border: "", padding: "", width: "", height: "" });
45 test("outerWidth()", function() {
48 var $div = jQuery("#nothiddendiv");
49 $div.css("width", 30);
51 equals($div.outerWidth(), 30, "Test with only width set");
52 $div.css("padding", "20px");
53 equals($div.outerWidth(), 70, "Test with padding");
54 $div.css("border", "2px solid #fff");
55 equals($div.outerWidth(), 74, "Test with padding and border");
56 $div.css("margin", "10px");
57 equals($div.outerWidth(), 74, "Test with padding, border and margin without margin option");
58 $div.css("position", "absolute");
59 equals($div.outerWidth(true), 94, "Test with padding, border and margin with margin option");
61 equals($div.outerWidth(true), 94, "Test hidden div with padding, border and margin with margin option");
64 $div.css({ position: "", display: "", border: "", padding: "", width: "", height: "" });
67 test("outerHeight()", function() {
70 var $div = jQuery("#nothiddendiv");
71 $div.css("height", 30);
73 equals($div.outerHeight(), 30, "Test with only width set");
74 $div.css("padding", "20px");
75 equals($div.outerHeight(), 70, "Test with padding");
76 $div.css("border", "2px solid #fff");
77 equals($div.outerHeight(), 74, "Test with padding and border");
78 $div.css("margin", "10px");
79 equals($div.outerHeight(), 74, "Test with padding, border and margin without margin option");
80 equals($div.outerHeight(true), 94, "Test with padding, border and margin with margin option");
82 equals($div.outerHeight(true), 94, "Test hidden div with padding, border and margin with margin option");
85 $div.css({ display: "", border: "", padding: "", width: "", height: "" });