diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-12-05 11:53:34 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-12-05 11:53:34 -0500 |
commit | f59f5a8b12d50c87ba6e2fe47a1804a23535b3cf (patch) | |
tree | 4bbc619ee12f8d99d09c7818cdfbbe043233ffdf /tests | |
parent | 70f5d18c715ba1c759393856f0f70acfddbee07a (diff) | |
download | jquery-ui-f59f5a8b12d50c87ba6e2fe47a1804a23535b3cf.tar.gz jquery-ui-f59f5a8b12d50c87ba6e2fe47a1804a23535b3cf.zip |
Dialog: Restore inline styles for dimensions/display. Fixes #8119 - Dialog: Destroying a dialog leaves some styles changed.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/dialog/dialog_methods.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/unit/dialog/dialog_methods.js b/tests/unit/dialog/dialog_methods.js index 6eeb50273..92fe3d60f 100644 --- a/tests/unit/dialog/dialog_methods.js +++ b/tests/unit/dialog/dialog_methods.js @@ -34,12 +34,9 @@ test("init", function() { }); test("destroy", function() { - expect( 6 ); + expect( 7 ); - // Dialogs are expected to be hidden on destroy, so make sure they're hidden - // before the test $( "#dialog1, #form-dialog" ).hide(); - domEqual( "#dialog1", function() { var dialog = $( "#dialog1" ).dialog().dialog( "destroy" ); equal( dialog.parent()[ 0 ], $( "#qunit-fixture" )[ 0 ] ); @@ -50,6 +47,16 @@ test("destroy", function() { equal( dialog.parent()[ 0 ], $( "#qunit-fixture" )[ 0 ] ); equal( dialog.index(), 2 ); }); + + // Ensure dimensions are restored (#8119) + $( "#dialog1" ).show().css({ + width: "400px", + minHeight: "100px", + height: "200px" + }); + domEqual( "#dialog1", function() { + $( "#dialog1" ).dialog().dialog( "destroy" ); + }); }); test( "enable/disable disabled", function() { |