aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/draggable/draggable_core.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/draggable/draggable_core.js')
-rw-r--r--tests/unit/draggable/draggable_core.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/unit/draggable/draggable_core.js b/tests/unit/draggable/draggable_core.js
index b8ea19930..c9cdde260 100644
--- a/tests/unit/draggable/draggable_core.js
+++ b/tests/unit/draggable/draggable_core.js
@@ -224,11 +224,15 @@ test( "#9379: Draggable: position bug in scrollable div", function() {
test( "#5727: draggable from iframe" , function() {
expect( 1 );
- var iframe = $( "<iframe id='iframe-draggable-container' src='about:blank'></iframe>" ).appendTo( "#qunit-fixture" ),
- iframeBody = iframe.contents().find( "body" ).append(
- "<div id='iframe-draggable-1' style='background: green; width: 200px; height: 100px;'>Relative</div>"
- ),
- draggable1 = iframeBody.find( "#iframe-draggable-1" );
+ var iframeBody, draggable1,
+ iframe = $( "<iframe />" ).appendTo( "#qunit-fixture" ),
+ iframeDoc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document;
+
+ iframeDoc.write( "<!doctype html><html><body>" );
+ iframeDoc.close();
+
+ iframeBody = $( iframeDoc.body ).append( "<div style='width: 2px; height: 2px;' />" );
+ draggable1 = iframeBody.find( "div" );
draggable1.draggable();