diff options
author | Richard Worth <rdworth@gmail.com> | 2008-06-25 10:01:24 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2008-06-25 10:01:24 +0000 |
commit | d0c11e932bec29bc271acf86db062e3a4d8d3797 (patch) | |
tree | ea99a58516289b265e57a0f1d21755e4d7645dea /tests/dialog.js | |
parent | b07cac10cdfdbc2da0da08b7c3906925642bd8ec (diff) | |
download | jquery-ui-d0c11e932bec29bc271acf86db062e3a4d8d3797.tar.gz jquery-ui-d0c11e932bec29bc271acf86db062e3a4d8d3797.zip |
fixed #3025 - dialog should have an autoResize option; default value: true
Diffstat (limited to 'tests/dialog.js')
-rw-r--r-- | tests/dialog.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/dialog.js b/tests/dialog.js index 161417e96..423cdea79 100644 --- a/tests/dialog.js +++ b/tests/dialog.js @@ -8,6 +8,7 @@ var defaults = {
autoOpen: true,
+ autoResize: true,
buttons: {},
disabled: false,
dialogClass: null,
@@ -200,6 +201,25 @@ test("autoOpen", function() { el.remove();
});
+test("autoResize", function() {
+ expect(2);
+ el = $('<div>content<br>content<br>content<br>content<br>content</div>').dialog({ autoResize: false });
+ var expected = { height: el.height() };
+ var handle = $(".ui-resizable-se", dlg());
+ drag(handle, 50, 50);
+ var actual = { height: el.height() };
+ compare2(actual, expected, '.dialog({ autoResize: false })');
+ el.remove();
+ el = $('<div>content<br>content<br>content<br>content<br>content</div>').dialog({ autoResize: true });
+ var before = { width: el.width(), height: el.height() };
+ var handle = $(".ui-resizable-se", dlg());
+ drag(handle, 50, 50);
+ var expected = { width: before.width + 50, height: before.height + 50 };
+ var actual = { width: el.width(), height: el.height() };
+ compare2(actual, expected, '.dialog({ autoResize: true })');
+ el.remove();
+});
+
test("buttons", function() {
expect(14);
var buttons = {
|