aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/tooltip
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-15 17:14:19 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-11-15 17:14:19 +0100
commitf86168bf6b57a06b2faa53f976976fc17cb6cc7e (patch)
treea18bfd9cf1e75fa1417436798611bc969d9a59ad /tests/unit/tooltip
parent8cbbf33192728b51d2b7a05e2a75fa334da54f26 (diff)
parentfb6119e182ece9f2b5f94eb79b8763b602d04c47 (diff)
downloadjquery-ui-f86168bf6b57a06b2faa53f976976fc17cb6cc7e.tar.gz
jquery-ui-f86168bf6b57a06b2faa53f976976fc17cb6cc7e.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'tests/unit/tooltip')
-rw-r--r--tests/unit/tooltip/all.html2
-rw-r--r--tests/unit/tooltip/tooltip_core.js27
2 files changed, 28 insertions, 1 deletions
diff --git a/tests/unit/tooltip/all.html b/tests/unit/tooltip/all.html
index 6329326b9..cb1c14095 100644
--- a/tests/unit/tooltip/all.html
+++ b/tests/unit/tooltip/all.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>jQuery UI Tooltip Test Suite</title>
- <script src="../../../jquery-1.8.2.js"></script>
+ <script src="../../../jquery-1.8.3.js"></script>
<link rel="stylesheet" href="../../../external/qunit.css">
<link rel="stylesheet" href="../qunit-composite.css">
diff --git a/tests/unit/tooltip/tooltip_core.js b/tests/unit/tooltip/tooltip_core.js
index 69936dba2..c3568bffc 100644
--- a/tests/unit/tooltip/tooltip_core.js
+++ b/tests/unit/tooltip/tooltip_core.js
@@ -107,4 +107,31 @@ test( "tooltip on .ui-state-disabled element", function() {
equal( $( ".ui-tooltip" ).length, 0 );
});
+// http://bugs.jqueryui.com/ticket/8740
+asyncTest( "programmatic focus with async content", function() {
+ expect( 2 );
+ var element = $( "#tooltipped1" ).tooltip({
+ content: function( response ) {
+ setTimeout(function() {
+ response( "test" );
+ });
+ }
+ });
+
+ element.bind( "tooltipopen", function( event ) {
+ deepEqual( event.originalEvent.type, "focusin" );
+
+ element.bind( "tooltipclose", function( event ) {
+ deepEqual( event.originalEvent.type, "focusout" );
+ start();
+ });
+
+ setTimeout(function() {
+ element.blur();
+ });
+ });
+
+ element.focus();
+});
+
}( jQuery ) );