Accordion: Rewrote the resize method test; fails in IE8, probably related to :visible issue

This commit is contained in:
jzaefferer 2010-04-03 17:21:31 +02:00
parent cf2b0ca0d8
commit 7d1c9cd348
2 changed files with 12 additions and 5 deletions

View File

@ -39,7 +39,7 @@
<style> <style>
#main { font-size: 10pt; font-family: 'trebuchet ms', verdana, arial; } #main { font-size: 10pt; font-family: 'trebuchet ms', verdana, arial; }
#navigation * { margin: 0; padding: 0; font-size: 12px; } #list1 *, #navigation * { margin: 0; padding: 0; font-size: 12px; }
</style> </style>
</head> </head>
<body> <body>

View File

@ -114,7 +114,9 @@ test("activate, jQuery or DOM element", function() {
}); });
test("resize", function() { test("resize", function() {
var expected = $('#list1').accordion(); var expected = $('#list1').accordion({
fillSpace: true
});
var sizes = []; var sizes = [];
expected.find(".ui-accordion-content").each(function() { expected.find(".ui-accordion-content").each(function() {
@ -128,10 +130,15 @@ test("resize", function() {
expected.find(".ui-accordion-content").each(function() { expected.find(".ui-accordion-content").each(function() {
sizes2.push($(this).outerHeight()); sizes2.push($(this).outerHeight());
}); });
same(sizes, sizes2); same(sizes, [38, 38, 38]);
expected.find(".ui-accordion-content:first").height(500) expected.parent().height(500);
var sizes3 = []; expected.accordion("resize");
var sizes2 = [];
expected.find(".ui-accordion-content").each(function() {
sizes2.push($(this).outerHeight());
});
same(sizes2, [446, 446, 446]);
}); });
})(jQuery); })(jQuery);