});
asyncTest( "refresh - change selected option", function () {
- expect( 3 );
+ expect( 4 );
var element = $( "#speed" ).selectmenu(),
button = element.selectmenu( "widget" );
element[ 0 ].selectedIndex = 0;
element.selectmenu( "refresh" );
-
equal( element.find( "option:selected" ).text(), button.text(), "button text after changing selected option" );
+ element.find( "option" ).removeAttr( "selected" );
+ element.prepend( "<option selected value=\"selected_option\">Selected option</option>" );
+ element.selectmenu( "refresh" );
+ equal( element.find( "option:selected" ).text(), button.text(), "button text after adding selected option" );
+
start();
}, 1 );
});