Skip to content

Commit 7d1c9cd

Browse files
committed
Accordion: Rewrote the resize method test; fails in IE8, probably related to :visible issue
1 parent cf2b0ca commit 7d1c9cd

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

tests/unit/accordion/accordion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
<style>
4141
#main { font-size: 10pt; font-family: 'trebuchet ms', verdana, arial; }
42-
#navigation * { margin: 0; padding: 0; font-size: 12px; }
42+
#list1 *, #navigation * { margin: 0; padding: 0; font-size: 12px; }
4343
</style>
4444
</head>
4545
<body>

tests/unit/accordion/accordion_methods.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ test("activate, jQuery or DOM element", function() {
114114
});
115115

116116
test("resize", function() {
117-
var expected = $('#list1').accordion();
117+
var expected = $('#list1').accordion({
118+
fillSpace: true
119+
});
118120

119121
var sizes = [];
120122
expected.find(".ui-accordion-content").each(function() {
@@ -128,10 +130,15 @@ test("resize", function() {
128130
expected.find(".ui-accordion-content").each(function() {
129131
sizes2.push($(this).outerHeight());
130132
});
131-
same(sizes, sizes2);
133+
same(sizes, [38, 38, 38]);
132134

133-
expected.find(".ui-accordion-content:first").height(500)
134-
var sizes3 = [];
135+
expected.parent().height(500);
136+
expected.accordion("resize");
137+
var sizes2 = [];
138+
expected.find(".ui-accordion-content").each(function() {
139+
sizes2.push($(this).outerHeight());
140+
});
141+
same(sizes2, [446, 446, 446]);
135142
});
136143

137144
})(jQuery);

0 commit comments

Comments
 (0)