aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/draggable/draggable_options.js
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2013-04-07 12:10:59 -0400
committerMike Sherov <mike.sherov@gmail.com>2013-04-07 12:10:59 -0400
commit3c1a3ca252a24f63ab7f4ac819cc7744eaf57c77 (patch)
tree91e20de8173fd3e1afcd55f5976d0892366f9492 /tests/unit/draggable/draggable_options.js
parent6a3bf605ba74ef891bdbe39e8f3d2a0ba6bf33c9 (diff)
downloadjquery-ui-3c1a3ca252a24f63ab7f4ac819cc7744eaf57c77.tar.gz
jquery-ui-3c1a3ca252a24f63ab7f4ac819cc7744eaf57c77.zip
Draggable Tests: fix old Safari and old Opera tests with jQuery < 1.8 tests by accounting for a bug in $.contains on disconnected Elements.
Diffstat (limited to 'tests/unit/draggable/draggable_options.js')
-rw-r--r--tests/unit/draggable/draggable_options.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js
index 6a0cd593b..635d318e7 100644
--- a/tests/unit/draggable/draggable_options.js
+++ b/tests/unit/draggable/draggable_options.js
@@ -1289,9 +1289,15 @@ test( "#8459: element can snap to an element that was removed during drag", func
moves: 1
});
- // TODO: fix IE8 testswarm IFRAME positioning bug so closeEnough can be turned back to equal
- closeEnough( element.offset().left, newX, 1, "doesn't snap to a removed element" );
- closeEnough( element.offset().top, newY, 1, "doesn't snap to a removed element" );
+ // Support: Opera 12.10, Safari 5.1, jQuery <1.8
+ if ( TestHelpers.draggable.unreliableContains ) {
+ ok( true, "Opera <12.14 and Safari <6.0 report wrong values for $.contains in jQuery < 1.8" );
+ ok( true, "Opera <12.14 and Safari <6.0 report wrong values for $.contains in jQuery < 1.8" );
+ } else {
+ // TODO: fix IE8 testswarm IFRAME positioning bug so closeEnough can be turned back to equal
+ closeEnough( element.offset().left, newX, 1, "doesn't snap to a removed element" );
+ closeEnough( element.offset().top, newY, 1, "doesn't snap to a removed element" );
+ }
});
test( "#8165: Snapping large rectangles to small rectangles doesn't snap properly", function() {