]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Rewrote the resize method test; fails in IE8, probably related to :visible...
authorjzaefferer <joern.zaefferer@gmail.com>
Sat, 3 Apr 2010 15:21:31 +0000 (17:21 +0200)
committerjzaefferer <joern.zaefferer@gmail.com>
Sat, 3 Apr 2010 15:21:31 +0000 (17:21 +0200)
tests/unit/accordion/accordion.html
tests/unit/accordion/accordion_methods.js

index 2b4ae20457667c0f829b9fe5ade018eaf3a62836..b54db7c339bcfe41d980a83f310ff77b5480967b 100644 (file)
@@ -39,7 +39,7 @@
        
        <style>
                #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>
 </head>
 <body>
index 37807964a8e26e2ed56cc213df8378ae34687309..22b19a75a0a76fa47effb426812a4fd2e6961e8b 100644 (file)
@@ -114,7 +114,9 @@ test("activate, jQuery or DOM element", function() {
 });
 
 test("resize", function() {
-       var expected = $('#list1').accordion();
+       var expected = $('#list1').accordion({
+               fillSpace: true
+       });
        
        var sizes = [];
        expected.find(".ui-accordion-content").each(function() {
@@ -128,10 +130,15 @@ test("resize", function() {
        expected.find(".ui-accordion-content").each(function() {
                sizes2.push($(this).outerHeight());
        });
-       same(sizes, sizes2);
+       same(sizes, [38, 38, 38]);
        
-       expected.find(".ui-accordion-content:first").height(500)
-       var sizes3 = [];
+       expected.parent().height(500);
+       expected.accordion("resize");
+       var sizes2 = [];
+       expected.find(".ui-accordion-content").each(function() {
+               sizes2.push($(this).outerHeight());
+       });
+       same(sizes2, [446, 446, 446]);
 });
 
 })(jQuery);