From 1cca8292e8678645a3e5af54bd3f761fd72ff02e Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Mon, 29 Apr 2013 20:59:35 +0200 Subject: Selectmenu Tests: add toLowerCase() to node type checks --- tests/unit/selectmenu/selectmenu_events.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/selectmenu/selectmenu_events.js b/tests/unit/selectmenu/selectmenu_events.js index 0d1b3bf91..aefd78b94 100644 --- a/tests/unit/selectmenu/selectmenu_events.js +++ b/tests/unit/selectmenu/selectmenu_events.js @@ -13,7 +13,7 @@ test( "change", function () { change: function ( event, ui ) { ok( event, "change event fired on change" ); 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" ); } }); @@ -44,15 +44,13 @@ test( "close", function () { test( "focus", function () { expect( 3 ); - var button, - menu, - links; + var button, menu, links; this.element.selectmenu({ focus: function ( event, ui ) { ok( event, "focus event fired on mouseover" ); 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" ); } }); @@ -91,7 +89,7 @@ test( "select", function () { select: function ( event, ui ) { ok( event, "select event fired on item select" ); 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" ); } }); -- cgit v1.2.3