diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-02-28 15:56:32 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-02-29 18:36:40 +0100 |
commit | 72023dd045a7fead5a3136ec2400ad4743a190d2 (patch) | |
tree | 4999a287a815e6a4200498a2a0241abc349fe599 /tests/unit/tooltip | |
parent | e6b7486abf2e0f98837e76027084fad6fe908cff (diff) | |
download | jquery-ui-72023dd045a7fead5a3136ec2400ad4743a190d2.tar.gz jquery-ui-72023dd045a7fead5a3136ec2400ad4743a190d2.zip |
Update to QUnit 1.3. Replace usage of same with deepEqual and equals with equal.
Diffstat (limited to 'tests/unit/tooltip')
-rw-r--r-- | tests/unit/tooltip/tooltip_events.js | 12 | ||||
-rw-r--r-- | tests/unit/tooltip/tooltip_methods.js | 4 | ||||
-rw-r--r-- | tests/unit/tooltip/tooltip_options.js | 14 |
3 files changed, 15 insertions, 15 deletions
diff --git a/tests/unit/tooltip/tooltip_events.js b/tests/unit/tooltip/tooltip_events.js index bf60c3cdc..b1ce92fb2 100644 --- a/tests/unit/tooltip/tooltip_events.js +++ b/tests/unit/tooltip/tooltip_events.js @@ -27,12 +27,12 @@ test( "mouse events", function() { var element = $( "#tooltipped1" ).tooltip(); element.one( "tooltipopen", function( event ) { - same( event.originalEvent.type, "mouseover" ); + deepEqual( event.originalEvent.type, "mouseover" ); }); element.trigger( "mouseover" ); element.one( "tooltipclose", function( event ) { - same( event.originalEvent.type, "mouseleave" ); + deepEqual( event.originalEvent.type, "mouseleave" ); }); element.trigger( "mouseleave" ); }); @@ -42,12 +42,12 @@ test( "focus events", function() { var element = $( "#tooltipped1" ).tooltip(); element.one( "tooltipopen", function( event ) { - same( event.originalEvent.type, "focusin" ); + deepEqual( event.originalEvent.type, "focusin" ); }); element.trigger( "focusin" ); element.one( "tooltipclose", function( event ) { - same( event.originalEvent.type, "focusout" ); + deepEqual( event.originalEvent.type, "focusout" ); }); element.trigger( "focusout" ); }); @@ -57,7 +57,7 @@ asyncTest( "mixed events", function() { var element = $( "#tooltipped1" ).tooltip(); element.one( "tooltipopen", function( event ) { - same( event.originalEvent.type, "focusin" ); + deepEqual( event.originalEvent.type, "focusin" ); }); element.simulate( "focus" ); @@ -74,7 +74,7 @@ asyncTest( "mixed events", function() { // blurring is async in IE element.one( "tooltipclose", function( event ) { - same( event.originalEvent.type, "focusout" ); + deepEqual( event.originalEvent.type, "focusout" ); start(); }); element.simulate( "blur" ); diff --git a/tests/unit/tooltip/tooltip_methods.js b/tests/unit/tooltip/tooltip_methods.js index 74fd35d84..3e8256c50 100644 --- a/tests/unit/tooltip/tooltip_methods.js +++ b/tests/unit/tooltip/tooltip_methods.js @@ -59,8 +59,8 @@ TODO currently tooltip doesn't override widget can't return anything useful if no element is kept around and there's no useful reference test("widget", function() { var tooltip = $("#tooltipped1").tooltip(); - same(tooltip.tooltip("widget")[0], $(".ui-tooltip")[0]); - same(tooltip.tooltip("widget").end()[0], tooltip[0]); + deepEqual(tooltip.tooltip("widget")[0], $(".ui-tooltip")[0]); + deepEqual(tooltip.tooltip("widget").end()[0], tooltip[0]); }); */ diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js index 04bb4c6a4..42529e087 100644 --- a/tests/unit/tooltip/tooltip_options.js +++ b/tests/unit/tooltip/tooltip_options.js @@ -4,7 +4,7 @@ module( "tooltip: options" ); test( "content: default", function() { var element = $( "#tooltipped1" ).tooltip().tooltip( "open" ); - same( $( "#" + element.attr( "aria-describedby" ) ).text(), "anchortitle" ); + deepEqual( $( "#" + element.attr( "aria-describedby" ) ).text(), "anchortitle" ); }); test( "content: return string", function() { @@ -13,7 +13,7 @@ test( "content: return string", function() { return "customstring"; } }).tooltip( "open" ); - same( $( "#" + element.attr( "aria-describedby" ) ).text(), "customstring" ); + deepEqual( $( "#" + element.attr( "aria-describedby" ) ).text(), "customstring" ); }); test( "content: return jQuery", function() { @@ -22,7 +22,7 @@ test( "content: return jQuery", function() { return $( "<div>" ).html( "cu<b>s</b>tomstring" ); } }).tooltip( "open" ); - same( $( "#" + element.attr( "aria-describedby" ) ).text(), "customstring" ); + deepEqual( $( "#" + element.attr( "aria-describedby" ) ).text(), "customstring" ); }); asyncTest( "content: sync + async callback", function() { @@ -30,11 +30,11 @@ asyncTest( "content: sync + async callback", function() { var element = $( "#tooltipped1" ).tooltip({ content: function( response ) { setTimeout(function() { - same( $( "#" + element.attr("aria-describedby") ).text(), "loading..." ); + deepEqual( $( "#" + element.attr("aria-describedby") ).text(), "loading..." ); response( "customstring2" ); setTimeout(function() { - same( $( "#" + element.attr("aria-describedby") ).text(), "customstring2" ); + deepEqual( $( "#" + element.attr("aria-describedby") ).text(), "customstring2" ); start(); }, 13 ); }, 13 ); @@ -52,12 +52,12 @@ test( "items", function() { var event = $.Event( "mouseenter" ); event.target = $( "#fixture-span" )[ 0 ]; element.tooltip( "open", event ); - same( $( "#" + $( "#fixture-span" ).attr( "aria-describedby" ) ).text(), "title-text" ); + deepEqual( $( "#" + $( "#fixture-span" ).attr( "aria-describedby" ) ).text(), "title-text" ); // make sure default [title] doesn't get used event.target = $( "#tooltipped1" )[ 0 ]; element.tooltip( "open", event ); - same( $( "#tooltipped1" ).attr( "aria-describedby" ), undefined ); + deepEqual( $( "#tooltipped1" ).attr( "aria-describedby" ), undefined ); element.tooltip( "destroy" ); }); |