Skip to content

Commit

Permalink
Revert "Attributes: remove flakey test for selected attribute"
Browse files Browse the repository at this point in the history
This reverts commit 87bd130.
  • Loading branch information
markelog committed Nov 11, 2015
1 parent 112f612 commit 3826177
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/unit/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ QUnit.test( "attr('tabindex', value)", function( assert ) {
} );

QUnit.test( "removeAttr(String)", function( assert ) {
assert.expect( 12 );
assert.expect( 13 );
var $first;

assert.equal( jQuery( "#mark" ).removeAttr( "class" ).attr( "class" ), undefined, "remove class" );
Expand All @@ -576,6 +576,8 @@ QUnit.test( "removeAttr(String)", function( assert ) {

jQuery( "#check1" ).removeAttr( "checked" ).prop( "checked", true ).removeAttr( "checked" );
assert.equal( document.getElementById( "check1" ).checked, true, "removeAttr should not set checked to false, since the checked attribute does NOT mirror the checked property" );
jQuery( "#option1b" ).attr( "selected", "selected" ).removeAttr( "selected" ).attr( "selected", "selected" );
assert.notEqual( document.getElementById( "select1" ).selectedIndex, 1, "Once the selected attribute is dirty, subsequent settings should not select the option (gh-1759)" );
jQuery( "#text1" ).prop( "readOnly", true ).removeAttr( "readonly" );
assert.equal( document.getElementById( "text1" ).readOnly, false, "removeAttr sets boolean properties to false" );

Expand Down

0 comments on commit 3826177

Please sign in to comment.