Tooltip: Make title-tests pass in IE6/7 with jQuery 1.6, where undefined attribute is returned as empty string

This commit is contained in:
Jörn Zaefferer 2012-06-19 17:12:38 +02:00
parent 8f6c656c28
commit 0fcf37fba6
2 changed files with 4 additions and 2 deletions

View File

@ -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" );

View File

@ -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" );