diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2012-12-08 16:28:10 -0500 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2012-12-14 10:37:20 -0500 |
commit | 2c40fdd4a852fe6ee16feaa3bb6d7d49c7a02606 (patch) | |
tree | b38e8ebf6f22bed3bb326f0398abce7c9a96905c /test/unit/selector.js | |
parent | 7d61c5238e57cf252faa2d999465bd69afc6c038 (diff) | |
download | jquery-2c40fdd4a852fe6ee16feaa3bb6d7d49c7a02606.tar.gz jquery-2c40fdd4a852fe6ee16feaa3bb6d7d49c7a02606.zip |
Fix #12600: don't use value property in place of value attribute. Close gh-1063.
Diffstat (limited to 'test/unit/selector.js')
-rw-r--r-- | test/unit/selector.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/test/unit/selector.js b/test/unit/selector.js index 57c32cf0d..799603012 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -31,15 +31,28 @@ test("class - jQuery only", function() { }); test("attributes - jQuery only", function() { - expect( 2 ); + expect( 4 ); t( "Find elements with a tabindex attribute", "[tabindex]", ["listWithTabIndex", "foodWithNegativeTabIndex", "linkWithTabIndex", "linkWithNegativeTabIndex", "linkWithNoHrefWithTabIndex", "linkWithNoHrefWithNegativeTabIndex"] ); - // jQuery #12523 + + // #12523 deepEqual( jQuery.find( "[title]", null, null, jQuery("#qunit-fixture a").get().concat( document.createTextNode("") ) ), q("google"), "Text nodes fail attribute tests without exception" ); + + // #12600 + ok( + jQuery("<select value='12600'><option value='option' selected='selected'></option><option value=''></option></select>") + .prop( "value", "option" ) + .is(":input[value='12600']"), + + ":input[value=foo] selects select by attribute" + ); + ok( jQuery("<input type='text' value='12600'/>").prop( "value", "option" ).is(":input[value='12600']"), + ":input[value=foo] selects text input by attribute" + ); }); if ( jQuery.css ) { @@ -74,7 +87,7 @@ test("disconnected nodes", function() { equal( $opt.is(":selected"), true, "selected option" ); var $div = jQuery("<div/>"); - equal( $div.is("div"), true, "Make sure .is('nodeName') works on disconnect nodes." ); + equal( $div.is("div"), true, "Make sure .is('nodeName') works on disconnected nodes." ); }); test("jQuery only - broken", 1, function() { |