aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-04-25 14:04:30 -0400
committerScott González <scott.gonzalez@gmail.com>2011-04-25 14:04:30 -0400
commit325ee6e87133dd2a507c820dd3c356e3b897a3ec (patch)
treec13ef9ce107caf181f300cb0ab2a6d5214aada87 /tests/unit/dialog
parentc4c36e557ef2b3450bc365708064f7314bc6fdc4 (diff)
downloadjquery-ui-325ee6e87133dd2a507c820dd3c356e3b897a3ec.tar.gz
jquery-ui-325ee6e87133dd2a507c820dd3c356e3b897a3ec.zip
Widget: define a null default for the create callback.
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r--tests/unit/dialog/dialog_defaults.js67
-rw-r--r--tests/unit/dialog/dialog_options.js4
2 files changed, 35 insertions, 36 deletions
diff --git a/tests/unit/dialog/dialog_defaults.js b/tests/unit/dialog/dialog_defaults.js
index 612fd58c8..9f2e4c6a8 100644
--- a/tests/unit/dialog/dialog_defaults.js
+++ b/tests/unit/dialog/dialog_defaults.js
@@ -1,35 +1,34 @@
-/*
- * dialog_defaults.js
- */
+commonWidgetTests( "dialog", {
+ defaults: {
+ autoOpen: true,
+ buttons: {},
+ closeOnEscape: true,
+ closeText: 'close',
+ disabled: false,
+ dialogClass: '',
+ draggable: true,
+ height: 'auto',
+ hide: null,
+ maxHeight: false,
+ maxWidth: false,
+ minHeight: 150,
+ minWidth: 150,
+ modal: false,
+ position: {
+ my: 'center',
+ at: 'center',
+ of: window,
+ collision: 'fit',
+ using: $.ui.dialog.prototype.options.position.using
+ },
+ resizable: true,
+ show: null,
+ stack: true,
+ title: '',
+ width: 300,
+ zIndex: 1000,
-var dialog_defaults = {
- autoOpen: true,
- buttons: {},
- closeOnEscape: true,
- closeText: 'close',
- disabled: false,
- dialogClass: '',
- draggable: true,
- height: 'auto',
- hide: null,
- maxHeight: false,
- maxWidth: false,
- minHeight: 150,
- minWidth: 150,
- modal: false,
- position: {
- my: 'center',
- at: 'center',
- of: window,
- collision: 'fit',
- using: $.ui.dialog.prototype.options.position.using
- },
- resizable: true,
- show: null,
- stack: true,
- title: '',
- width: 300,
- zIndex: 1000
-};
-
-commonWidgetTests('dialog', { defaults: dialog_defaults });
+ // callbacks
+ create: null
+ }
+});
diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js
index fb8dea775..5705da079 100644
--- a/tests/unit/dialog/dialog_options.js
+++ b/tests/unit/dialog/dialog_options.js
@@ -180,7 +180,7 @@ test("height", function() {
expect(3);
el = $('<div></div>').dialog();
- equals(dlg().height(), dialog_defaults.minHeight, "default height");
+ equals(dlg().height(), 150, "default height");
el.remove();
el = $('<div></div>').dialog({ height: 237 });
@@ -431,7 +431,7 @@ test("width", function() {
expect(3);
el = $('<div></div>').dialog();
- equals(dlg().width(), dialog_defaults.width, "default width");
+ equals(dlg().width(), 300, "default width");
el.remove();
el = $('<div></div>').dialog({width: 437 });