mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Accordion: Improve unit test to get consistent results on mobile devices
This commit is contained in:
parent
3d3b5dd1e7
commit
9ac6bde8a9
@ -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 ] );
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user