Skip to content
Permalink
Browse files

Tooltip: Make title-tests pass in IE6/7 with jQuery 1.6, where undefi…

…ned attribute is returned as empty string
  • Loading branch information...
jzaefferer committed Jun 19, 2012
1 parent 8f6c656 commit 0fcf37fba6126c24c1ff9a5e2979fd565a9b4cec
Showing with 4 additions and 2 deletions.
  1. +2 −1 tests/unit/tooltip/tooltip_core.js
  2. +2 −1 tests/unit/tooltip/tooltip_methods.js
@@ -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" );
@@ -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" );

0 comments on commit 0fcf37f

Please sign in to comment.
You can’t perform that action at this time.