diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-09-02 08:35:40 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-09-02 08:35:40 -0400 |
commit | de02aa34a80eec32ad19e0c83ac88073ee551483 (patch) | |
tree | 93720948c6dfad39d7f12dcb7e828543fcf95031 /tests/unit | |
parent | 5de8ced5d9e8b18d96cb2e3868123dd41402fc00 (diff) | |
download | jquery-ui-de02aa34a80eec32ad19e0c83ac88073ee551483.tar.gz jquery-ui-de02aa34a80eec32ad19e0c83ac88073ee551483.zip |
Dialog: Set the _isOpen flag before triggering the open event. Fixes #6012 - Dialog: _isOpen flag should be set before triggering open event.
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/dialog/dialog_events.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit/dialog/dialog_events.js b/tests/unit/dialog/dialog_events.js index e2b7bd9ee..8c7657dfd 100644 --- a/tests/unit/dialog/dialog_events.js +++ b/tests/unit/dialog/dialog_events.js @@ -6,11 +6,12 @@ module("dialog: events"); test("open", function() { - expect(11); + expect(13); el = $("<div></div>"); el.dialog({ open: function(ev, ui) { + ok(el.data("dialog")._isOpen, "interal _isOpen flag is set"); ok(true, 'autoOpen: true fires open callback'); equals(this, el[0], "context of callback"); equals(ev.type, 'dialogopen', 'event type in callback'); @@ -29,6 +30,7 @@ test("open", function() { same(ui, {}, 'ui hash in callback'); } }).bind('dialogopen', function(ev, ui) { + ok(el.data("dialog")._isOpen, "interal _isOpen flag is set"); ok(true, 'dialog("open") fires open event'); equals(this, el[0], 'context of event'); same(ui, {}, 'ui hash in event'); |