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

This commit is contained in:
jzaefferer 2011-02-26 11:48:56 +01:00
parent 3d3b5dd1e7
commit 9ac6bde8a9
4 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@
<script src="../swarminject.js"></script> <script src="../swarminject.js"></script>
<style> <style>
#qunit-fixture { font-size: 10pt; font-family: "trebuchet ms", verdana, arial; } #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> </style>
</head> </head>
<body> <body>

View File

@ -59,7 +59,7 @@
<script src="../swarminject.js"></script> <script src="../swarminject.js"></script>
<style> <style>
#qunit-fixture { font-size: 10pt; font-family: "trebuchet ms", verdana, arial; } #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> </style>
</head> </head>
<body> <body>

View File

@ -104,7 +104,7 @@ test("{ autoHeight: false }", function() {
accordion.find(".ui-accordion-content").each(function() { accordion.find(".ui-accordion-content").each(function() {
sizes.push($(this).height()); 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[1] >= 98 && sizes[1] <= 126, "was " + sizes[1] );
ok( sizes[2] >= 42 && sizes[2] <= 54, "was " + sizes[2] ); ok( sizes[2] >= 42 && sizes[2] <= 54, "was " + sizes[2] );
}); });

View File

@ -183,7 +183,7 @@ test( "{ heightStyle: 'content' }", function() {
var sizes = ac.find( ".ui-accordion-content" ).map(function() { var sizes = ac.find( ".ui-accordion-content" ).map(function() {
return $( this ).height(); return $( this ).height();
}).get(); }).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[ 1 ] >= 98 && sizes[ 1 ] <= 126, "was " + sizes[ 1 ] );
ok( sizes[ 2 ] >= 42 && sizes[ 2 ] <= 54, "was " + sizes[ 2 ] ); ok( sizes[ 2 ] >= 42 && sizes[ 2 ] <= 54, "was " + sizes[ 2 ] );
}); });