aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/tooltip/tooltip_options.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-05-22 11:06:44 -0400
committerScott González <scott.gonzalez@gmail.com>2012-05-22 11:06:44 -0400
commitb6cc9dd870836b94d6f82729d56e592c548f24ea (patch)
tree2731c6661089fb3a7b723ede7601d12861403c3b /tests/unit/tooltip/tooltip_options.js
parentd7359beee6f8103e997959efd4f070245e9d3225 (diff)
downloadjquery-ui-b6cc9dd870836b94d6f82729d56e592c548f24ea.tar.gz
jquery-ui-b6cc9dd870836b94d6f82729d56e592c548f24ea.zip
Tooltip: Handle multiple aria-describedby values.
Diffstat (limited to 'tests/unit/tooltip/tooltip_options.js')
-rw-r--r--tests/unit/tooltip/tooltip_options.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js
index 4f994f8de..a4ef9f472 100644
--- a/tests/unit/tooltip/tooltip_options.js
+++ b/tests/unit/tooltip/tooltip_options.js
@@ -4,7 +4,7 @@ module( "tooltip: options" );
test( "content: default", function() {
var element = $( "#tooltipped1" ).tooltip().tooltip( "open" );
- deepEqual( $( "#" + element.attr( "aria-describedby" ) ).text(), "anchortitle" );
+ deepEqual( $( "#" + element.data( "ui-tooltip-id" ) ).text(), "anchortitle" );
});
test( "content: return string", function() {
@@ -13,7 +13,7 @@ test( "content: return string", function() {
return "customstring";
}
}).tooltip( "open" );
- deepEqual( $( "#" + element.attr( "aria-describedby" ) ).text(), "customstring" );
+ deepEqual( $( "#" + element.data( "ui-tooltip-id" ) ).text(), "customstring" );
});
test( "content: return jQuery", function() {
@@ -22,7 +22,7 @@ test( "content: return jQuery", function() {
return $( "<div>" ).html( "cu<b>s</b>tomstring" );
}
}).tooltip( "open" );
- deepEqual( $( "#" + element.attr( "aria-describedby" ) ).text(), "customstring" );
+ deepEqual( $( "#" + element.data( "ui-tooltip-id" ) ).text(), "customstring" );
});
asyncTest( "content: sync + async callback", function() {
@@ -30,11 +30,11 @@ asyncTest( "content: sync + async callback", function() {
var element = $( "#tooltipped1" ).tooltip({
content: function( response ) {
setTimeout(function() {
- deepEqual( $( "#" + element.attr("aria-describedby") ).text(), "loading..." );
+ deepEqual( $( "#" + element.data("ui-tooltip-id") ).text(), "loading..." );
response( "customstring2" );
setTimeout(function() {
- deepEqual( $( "#" + element.attr("aria-describedby") ).text(), "customstring2" );
+ deepEqual( $( "#" + element.data("ui-tooltip-id") ).text(), "customstring2" );
start();
}, 13 );
}, 13 );
@@ -53,12 +53,12 @@ test( "items", function() {
event = $.Event( "mouseenter" );
event.target = $( "#fixture-span" )[ 0 ];
element.tooltip( "open", event );
- deepEqual( $( "#" + $( "#fixture-span" ).attr( "aria-describedby" ) ).text(), "title-text" );
+ deepEqual( $( "#" + $( "#fixture-span" ).data( "ui-tooltip-id" ) ).text(), "title-text" );
// make sure default [title] doesn't get used
event.target = $( "#tooltipped1" )[ 0 ];
element.tooltip( "open", event );
- deepEqual( $( "#tooltipped1" ).attr( "aria-describedby" ), undefined );
+ deepEqual( $( "#tooltipped1" ).data( "ui-tooltip-id" ), undefined );
element.tooltip( "destroy" );
});
@@ -68,7 +68,7 @@ test( "tooltipClass", function() {
var element = $( "#tooltipped1" ).tooltip({
tooltipClass: "custom"
}).tooltip( "open" );
- ok( $( "#" + element.attr( "aria-describedby" ) ).hasClass( "custom" ) );
+ ok( $( "#" + element.data( "ui-tooltip-id" ) ).hasClass( "custom" ) );
});
}( jQuery ) );