Skip to content

Commit

Permalink
Selectmenu Tests: add toLowerCase() to node type checks
Browse files Browse the repository at this point in the history
  • Loading branch information
fnagel committed Apr 29, 2013
1 parent f2bd236 commit 1cca829
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/unit/selectmenu/selectmenu_events.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test( "change", function () {
change: function ( event, ui ) { change: function ( event, ui ) {
ok( event, "change event fired on change" ); ok( event, "change event fired on change" );
equal( event.type, "selectmenuchange", "event type set to selectmenuchange" ); equal( event.type, "selectmenuchange", "event type set to selectmenuchange" );
equal( ui.item.element[ 0 ].nodeName, "OPTION", "ui.item.element[0] points to original option element" ); equal( ui.item.element[ 0 ].nodeName.toLowerCase(), "option", "ui.item.element[0] points to original option element" );
equal( ui.item.value, value, "ui.item.value property updated correctly" ); equal( ui.item.value, value, "ui.item.value property updated correctly" );
} }
}); });
Expand Down Expand Up @@ -44,15 +44,13 @@ test( "close", function () {
test( "focus", function () { test( "focus", function () {
expect( 3 ); expect( 3 );


var button, var button, menu, links;
menu,
links;


this.element.selectmenu({ this.element.selectmenu({
focus: function ( event, ui ) { focus: function ( event, ui ) {
ok( event, "focus event fired on mouseover" ); ok( event, "focus event fired on mouseover" );
equal( event.type, "selectmenufocus", "event type set to selectmenufocus" ); equal( event.type, "selectmenufocus", "event type set to selectmenufocus" );
equal( ui.item.element[0].nodeName, "OPTION", "ui points to original option element" ); equal( ui.item.element[0].nodeName.toLowerCase(), "option", "ui points to original option element" );
} }
}); });


Expand Down Expand Up @@ -91,7 +89,7 @@ test( "select", function () {
select: function ( event, ui ) { select: function ( event, ui ) {
ok( event, "select event fired on item select" ); ok( event, "select event fired on item select" );
equal( event.type, "selectmenuselect", "event type set to selectmenuselect" ); equal( event.type, "selectmenuselect", "event type set to selectmenuselect" );
equal( ui.item.element[0].nodeName, "OPTION", "ui points to original option element" ); equal( ui.item.element[0].nodeName.toLowerCase(), "option", "ui points to original option element" );
} }
}); });


Expand Down

0 comments on commit 1cca829

Please sign in to comment.