aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/tooltip/tooltip_options.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/tooltip/tooltip_options.js')
-rw-r--r--tests/unit/tooltip/tooltip_options.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js
index 01ac25040..bced8e860 100644
--- a/tests/unit/tooltip/tooltip_options.js
+++ b/tests/unit/tooltip/tooltip_options.js
@@ -41,13 +41,16 @@ test( "content: return string", function() {
});
test( "content: return jQuery", function() {
- expect( 1 );
+ expect( 2 );
var element = $( "#tooltipped1" ).tooltip({
content: function() {
- return $( "<div>" ).html( "cu<b>s</b>tomstring" );
+ return $( "<div id='unique'>" ).html( "cu<b id='bold'>s</b>tomstring" );
}
- }).tooltip( "open" );
+ }).tooltip( "open" ),
+ liveRegion = element.tooltip( "instance" ).liveRegion;
deepEqual( $( "#" + element.data( "ui-tooltip-id" ) ).text(), "customstring" );
+ equal( liveRegion.children().last().html(), "<div>cu<b>s</b>tomstring</div>",
+ "The accessibility live region will strip the ids but keep the structure" );
});
asyncTest( "content: sync + async callback", function() {