Skip to content

Commit

Permalink
Tooltip: Make title-tests pass in IE6/7 with jQuery 1.6, where undefi…
Browse files Browse the repository at this point in the history
…ned attribute is returned as empty string
  • Loading branch information
jzaefferer committed Jun 19, 2012
1 parent 8f6c656 commit 0fcf37f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/unit/tooltip/tooltip_core.js
Expand Up @@ -34,7 +34,8 @@ test( "accessibility", function() {
equal( element.attr( "aria-describedby" ), "fixture-span " + tooltipId,
"multiple describedby when open" );
// strictEqual to distinguish between .removeAttr( "title" ) and .attr( "title", "" )
strictEqual( element.attr( "title" ), undefined, "no title when open" );
// TODO actually use strictEqual(..., undefined, msg) when dropping jQuery 1.6 support (or IE6/7)
ok( !element.attr( "title" ), "no title when open" );
element.tooltip( "close" );
equal( element.attr( "aria-describedby" ), "fixture-span",
"correct describedby when closed" );
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/tooltip/tooltip_methods.js
Expand Up @@ -42,7 +42,8 @@ test( "enable/disable", function() {

element.tooltip( "disable" );
equal( $( ".ui-tooltip" ).length, 0, "no tooltip when disabled" );
equal( tooltip.attr( "title" ), undefined, "title removed on disable" );
// TODO use equal(..., undefined, msg) when dropping jQuery 1.6 support (or IE6/7)
ok( !tooltip.attr( "title" ), "title removed on disable" );

element.tooltip( "open" );
equal( $( ".ui-tooltip" ).length, 0, "open does nothing when disabled" );
Expand Down

0 comments on commit 0fcf37f

Please sign in to comment.