Skip to content

Commit 0fcf37f

Browse files
committed
Tooltip: Make title-tests pass in IE6/7 with jQuery 1.6, where undefined attribute is returned as empty string
1 parent 8f6c656 commit 0fcf37f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/unit/tooltip/tooltip_core.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ test( "accessibility", function() {
3434
equal( element.attr( "aria-describedby" ), "fixture-span " + tooltipId,
3535
"multiple describedby when open" );
3636
// strictEqual to distinguish between .removeAttr( "title" ) and .attr( "title", "" )
37-
strictEqual( element.attr( "title" ), undefined, "no title when open" );
37+
// TODO actually use strictEqual(..., undefined, msg) when dropping jQuery 1.6 support (or IE6/7)
38+
ok( !element.attr( "title" ), "no title when open" );
3839
element.tooltip( "close" );
3940
equal( element.attr( "aria-describedby" ), "fixture-span",
4041
"correct describedby when closed" );

tests/unit/tooltip/tooltip_methods.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ test( "enable/disable", function() {
4242

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

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

0 commit comments

Comments
 (0)