3 test("innerWidth()", function() {
6 var $div = $("#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 = $("#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 = $("#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 equals($div.outerWidth(true), 94, "Test with padding, border and margin with margin option");
60 equals($div.outerWidth(true), 94, "Test hidden div with padding, border and margin with margin option");
63 $div.css({ display: "", border: "", padding: "", width: "", height: "" });
66 test("outerHeight()", function() {
69 var $div = $("#nothiddendiv");
70 $div.css("height", 30);
72 equals($div.outerHeight(), 30, "Test with only width set");
73 $div.css("padding", "20px");
74 equals($div.outerHeight(), 70, "Test with padding");
75 $div.css("border", "2px solid #fff");
76 equals($div.outerHeight(), 74, "Test with padding and border");
77 $div.css("margin", "10px");
78 equals($div.outerHeight(), 74, "Test with padding, border and margin without margin option");
79 equals($div.outerHeight(true), 94, "Test with padding, border and margin with margin option");
81 equals($div.outerHeight(true), 94, "Test hidden div with padding, border and margin with margin option");
84 $div.css({ display: "", border: "", padding: "", width: "", height: "" });