mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Revert "Attributes: remove flakey test for selected attribute"
This reverts commit 87bd130289
.
This commit is contained in:
parent
112f612aaf
commit
38261772a4
@ -564,7 +564,7 @@ QUnit.test( "attr('tabindex', value)", function( assert ) {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
QUnit.test( "removeAttr(String)", function( assert ) {
|
QUnit.test( "removeAttr(String)", function( assert ) {
|
||||||
assert.expect( 12 );
|
assert.expect( 13 );
|
||||||
var $first;
|
var $first;
|
||||||
|
|
||||||
assert.equal( jQuery( "#mark" ).removeAttr( "class" ).attr( "class" ), undefined, "remove class" );
|
assert.equal( jQuery( "#mark" ).removeAttr( "class" ).attr( "class" ), undefined, "remove class" );
|
||||||
@ -576,6 +576,8 @@ QUnit.test( "removeAttr(String)", function( assert ) {
|
|||||||
|
|
||||||
jQuery( "#check1" ).removeAttr( "checked" ).prop( "checked", true ).removeAttr( "checked" );
|
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" );
|
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" );
|
jQuery( "#text1" ).prop( "readOnly", true ).removeAttr( "readonly" );
|
||||||
assert.equal( document.getElementById( "text1" ).readOnly, false, "removeAttr sets boolean properties to false" );
|
assert.equal( document.getElementById( "text1" ).readOnly, false, "removeAttr sets boolean properties to false" );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user