Skip to content
Permalink
Browse files

Accordion: Improve unit test to get consistent results on mobile devices

  • Loading branch information...
jzaefferer committed Feb 26, 2011
1 parent 3d3b5dd commit 9ac6bde8a91f5f41c30fceeee6b98f9ca4bb8a91
@@ -57,7 +57,7 @@
<script src="../swarminject.js"></script>
<style>
#qunit-fixture { font-size: 10pt; font-family: "trebuchet ms", verdana, arial; }
#list, #list1 *, #navigation, #navigation * { margin: 0; padding: 0; font-size: 12px; }
#list, #list1 *, #navigation, #navigation * { margin: 0; padding: 0; font-size: 12px; line-height: 15px; }
</style>
</head>
<body>
@@ -59,7 +59,7 @@
<script src="../swarminject.js"></script>
<style>
#qunit-fixture { font-size: 10pt; font-family: "trebuchet ms", verdana, arial; }
#list, #list1 *, #navigation, #navigation * { margin: 0; padding: 0; font-size: 12px; }
#list, #list1 *, #navigation, #navigation * { margin: 0; padding: 0; font-size: 12px; line-height: 15px; }
</style>
</head>
<body>
@@ -104,7 +104,7 @@ test("{ autoHeight: false }", function() {
accordion.find(".ui-accordion-content").each(function() {
sizes.push($(this).height());
});
ok( sizes[0] >= 70 && sizes[0] <= 90, "was " + sizes[0] );
ok( sizes[0] >= 70 && sizes[0] <= 105, "was " + sizes[0] );
ok( sizes[1] >= 98 && sizes[1] <= 126, "was " + sizes[1] );
ok( sizes[2] >= 42 && sizes[2] <= 54, "was " + sizes[2] );
});
@@ -183,7 +183,7 @@ test( "{ heightStyle: 'content' }", function() {
var sizes = ac.find( ".ui-accordion-content" ).map(function() {
return $( this ).height();
}).get();
ok( sizes[ 0 ] >= 70 && sizes[ 0 ] <= 90, "was " + sizes[ 0 ] );
ok( sizes[ 0 ] >= 70 && sizes[ 0 ] <= 105, "was " + sizes[ 0 ] );
ok( sizes[ 1 ] >= 98 && sizes[ 1 ] <= 126, "was " + sizes[ 1 ] );
ok( sizes[ 2 ] >= 42 && sizes[ 2 ] <= 54, "was " + sizes[ 2 ] );
});

0 comments on commit 9ac6bde

Please sign in to comment.
You can’t perform that action at this time.