aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-05-30 18:51:29 -0400
committerScott González <scott.gonzalez@gmail.com>2011-05-30 18:51:29 -0400
commitab703d75f66412a92de34de10629c365861e17ef (patch)
tree347d8aa8ad8b2060db0e97935c5d537803b49f9d /tests
parente530d06c98571c9330fc8cfda62a438d07e8f65b (diff)
downloadjquery-ui-ab703d75f66412a92de34de10629c365861e17ef.tar.gz
jquery-ui-ab703d75f66412a92de34de10629c365861e17ef.zip
Tooltip: Added tests for ui object in open and close events.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/tooltip/tooltip_events.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/unit/tooltip/tooltip_events.js b/tests/unit/tooltip/tooltip_events.js
index 61026882e..29220705f 100644
--- a/tests/unit/tooltip/tooltip_events.js
+++ b/tests/unit/tooltip/tooltip_events.js
@@ -3,16 +3,21 @@
module( "tooltip: events" );
test( "programmatic triggers", function() {
- expect( 2 );
- var element = $( "#tooltipped1" ).tooltip();
+ expect( 4 );
+ var tooltip,
+ element = $( "#tooltipped1" ).tooltip();
- element.one( "tooltipopen", function( event ) {
+ element.one( "tooltipopen", function( event, ui ) {
+ tooltip = ui.tooltip;
ok( !( "originalEvent" in event ), "open" );
+ strictEqual( ui.tooltip[0],
+ $( "#" + element.attr( "aria-describedby" ) )[0], "ui.tooltip" );
});
element.tooltip( "open" );
- element.one( "tooltipclose", function( event ) {
+ element.one( "tooltipclose", function( event, ui ) {
ok( !( "originalEvent" in event ), "close" );
+ strictEqual( ui.tooltip[0], tooltip[0], "ui.tooltip" );
});
element.tooltip( "close" );
});