diff options
author | Felix Nagel <info@felixnagel.com> | 2012-07-16 21:38:47 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-07-16 21:38:47 +0200 |
commit | 06372cdcc8401b7fe67b5cf188cb459fd6258231 (patch) | |
tree | bb90e5c098cfe021320dd1171424fda62b3f0ade | |
parent | 83f424972308b533846bd6511495881b9e8a534b (diff) | |
download | jquery-ui-06372cdcc8401b7fe67b5cf188cb459fd6258231.tar.gz jquery-ui-06372cdcc8401b7fe67b5cf188cb459fd6258231.zip |
Selectmenu: follow-up to 'split core unit test for state synchronization in keydown and click'
-rw-r--r-- | tests/unit/selectmenu/selectmenu_core.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/selectmenu/selectmenu_core.js b/tests/unit/selectmenu/selectmenu_core.js index 29cd9df43..5754b30b7 100644 --- a/tests/unit/selectmenu/selectmenu_core.js +++ b/tests/unit/selectmenu/selectmenu_core.js @@ -57,10 +57,10 @@ $.each([ links = menu.find("li.ui-menu-item a"); button.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } ); - equal( menu.attr("aria-activedescendant"), links.eq(element[0].selectedIndex).attr("id"), "after keydown menu aria-activedescendant" ); - equal( links.eq(element[0].selectedIndex).attr("aria-selected"), "true", "after keydown selected menu link aria-selected" ); - equal( element.find("option:selected").val(), selected.next("option").val() , "after keydown original select state" ); - equal( button.text(), selected.next("option").text(), "after keydown button text" ); + equal( menu.attr("aria-activedescendant"), links.eq(element[0].selectedIndex).attr("id"), "menu aria-activedescendant" ); + equal( links.eq(element[0].selectedIndex).attr("aria-selected"), "true", "selected menu link aria-selected" ); + equal( element.find("option:selected").val(), selected.next("option").val() , "original select state" ); + equal( button.text(), selected.next("option").text(), "button text" ); }); test("state synchronization - after click - " + settings.type, function () { @@ -77,10 +77,10 @@ $.each([ button.simulate( "click" ); menu.find("a").last().simulate( "mouseover" ).trigger( "click" ); - equal( menu.attr("aria-activedescendant"), links.eq(element[0].selectedIndex).attr("id"), "after click menu aria-activedescendant" ); - equal( links.eq(element[0].selectedIndex).attr("aria-selected"), "true", "after click selected menu link aria-selected" ); - equal( element.find("option:selected").val(), element.find("option").last().val(), "after click original select state" ); - equal( button.text(), element.find("option").last().text(), "after click button text" ); + equal( menu.attr("aria-activedescendant"), links.eq(element[0].selectedIndex).attr("id"), "menu aria-activedescendant" ); + equal( links.eq(element[0].selectedIndex).attr("aria-selected"), "true", "selected menu link aria-selected" ); + equal( element.find("option:selected").val(), element.find("option").last().val(), "original select state" ); + equal( button.text(), element.find("option").last().text(), "button text" ); }); }); |