diff options
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/dialog/dialog.html | 2 | ||||
-rw-r--r-- | tests/unit/dialog/dialog_options.js | 40 |
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/unit/dialog/dialog.html b/tests/unit/dialog/dialog.html index 57017b1b9..7943b425b 100644 --- a/tests/unit/dialog/dialog.html +++ b/tests/unit/dialog/dialog.html @@ -24,7 +24,9 @@ "ui/jquery.ui.resizable.js", "ui/jquery.ui.button.js", "ui/jquery.ui.effect.js", + "ui/jquery.ui.effect-blind.js", "ui/jquery.ui.effect-clip.js", + "ui/jquery.ui.effect-explode.js", "ui/jquery.ui.dialog.js" ] }); diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js index 5f0434308..ecb7e5dd2 100644 --- a/tests/unit/dialog/dialog_options.js +++ b/tests/unit/dialog/dialog_options.js @@ -531,4 +531,44 @@ test("#4826: setting resizable false toggles resizable on dialog", function() { }); +asyncTest( "#8051 - 'Explode' dialog animation causes crash in IE 6, 7 and 8", function() { + expect( 1 ); + var el = $( "<div></div>" ).dialog({ + show: "explode", + focus: function() { + ok( true, "dialog opened with animation" ); + el.remove(); + start(); + } + }); +}); + +asyncTest( "#4421 - Focus lost from dialog which uses show-effect", function() { + expect( 1 ); + var el = $( "<div></div>" ).dialog({ + show: "blind", + focus: function() { + equal( el.dialog( "widget" ).find( ":focus" ).length, 1, "dialog maintains focus" ); + el.remove(); + start(); + } + }); +}); + +asyncTest( "Open followed by close during show effect", function() { + expect( 1 ); + var el = $( "<div></div>" ).dialog({ + show: "blind", + close: function() { + ok( true, "dialog closed properly during animation" ); + el.remove(); + start(); + } + }); + + setTimeout( function() { + el.dialog("close"); + }, 100 ); +}); + })(jQuery); |