aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2013-03-31 12:28:40 -0400
committerScott González <scott.gonzalez@gmail.com>2013-04-17 15:07:13 -0400
commitd9391c75902adab7e39f1f4e4634fbb7c10634d8 (patch)
tree6472a8ee1fec04f4a18293d85bd04e337ff26806
parent3f29430f8a282c80756af65996a69442f429f2ac (diff)
downloadjquery-ui-d9391c75902adab7e39f1f4e4634fbb7c10634d8.tar.gz
jquery-ui-d9391c75902adab7e39f1f4e4634fbb7c10634d8.zip
Position Tests: Fix FF and IE10 test failures by accounting for subpixel offsets.(cherry picked from commit e12879a441b972fea01697580c05c4ce698578e6)
-rw-r--r--tests/unit/position/position_core.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/unit/position/position_core.js b/tests/unit/position/position_core.js
index cefd7929c..e03d4c111 100644
--- a/tests/unit/position/position_core.js
+++ b/tests/unit/position/position_core.js
@@ -221,7 +221,9 @@ test( "of", function() {
});
test( "offsets", function() {
- expect( 7 );
+ expect( 9 );
+
+ var offset;
$( "#elx" ).position({
my: "left top",
@@ -261,7 +263,9 @@ test( "offsets", function() {
of: "#parentx",
collision: "none"
});
- deepEqual( $( "#elx" ).offset(), { top: 65, left: 37 }, "decimal percentage offsets in my" );
+ offset = $( "#elx" ).offset();
+ equal( Math.round( offset.top ), 65, "decimal percentage offsets in my" );
+ equal( Math.round( offset.left ), 37, "decimal percentage offsets in my" );
$( "#elx" ).position({
my: "left+10.4 top-10.6",
@@ -269,7 +273,9 @@ test( "offsets", function() {
of: "#parentx",
collision: "none"
});
- deepEqual( $( "#elx" ).offset(), { top: 49, left: 50 }, "decimal offsets in my" );
+ offset = $( "#elx" ).offset();
+ equal( Math.round( offset.top ), 49, "decimal offsets in my" );
+ equal( Math.round( offset.left ), 50, "decimal offsets in my" );
$( "#elx" ).position({
my: "left+right top-left",