From ce0afde900fb2b55b5766a3e0e3029e24a094a75 Mon Sep 17 00:00:00 2001 From: James Khoury Date: Mon, 28 Nov 2011 16:52:10 -0500 Subject: Dialog: Modified the dialog._size() to use outerHeight in calculating the nonContentHeight. Fixed #7692 - dialog: dialog height bug is incorrect when .ui-dialog padding set. --- tests/unit/dialog/dialog_options.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tests/unit/dialog/dialog_options.js') diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js index eab577c69..264c2fb6e 100644 --- a/tests/unit/dialog/dialog_options.js +++ b/tests/unit/dialog/dialog_options.js @@ -177,19 +177,24 @@ test("draggable", function() { }); test("height", function() { - expect(3); + expect(4); el = $('
').dialog(); - equals(dlg().height(), 150, "default height"); + equals(dlg().outerHeight(), 150, "default height"); el.remove(); el = $('
').dialog({ height: 237 }); - equals(dlg().height(), 237, "explicit height"); + equals(dlg().outerHeight(), 237, "explicit height"); el.remove(); el = $('
').dialog(); el.dialog('option', 'height', 238); - equals(dlg().height(), 238, "explicit height set after init"); + equals(dlg().outerHeight(), 238, "explicit height set after init"); + el.remove(); + + el = $('
').css("padding", "20px") + .dialog({ height: 240 }); + equals(dlg().outerHeight(), 240, "explicit height with padding"); el.remove(); }); -- cgit v1.2.3