diff options
author | timmywil <tim.willison@thisismedium.com> | 2011-05-18 11:29:25 -0400 |
---|---|---|
committer | timmywil <tim.willison@thisismedium.com> | 2011-05-18 11:29:25 -0400 |
commit | ba90af0dc5b279d785e49ff5c051073d2178d372 (patch) | |
tree | 210fe8f6f408c9679c0ede1b296e452489bc7e84 /test | |
parent | 7d3ba9f89e8077dff96e4cd9784fda20625c38d6 (diff) | |
download | jquery-ba90af0dc5b279d785e49ff5c051073d2178d372.tar.gz jquery-ba90af0dc5b279d785e49ff5c051073d2178d372.zip |
Make the value hook less obtrusive for elements which do not inherently have a value property. Fixes #9328.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/attributes.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js index 549efcab0..546aaffa5 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -40,7 +40,7 @@ test("jQuery.attrFix/jQuery.propFix integrity test", function() { }); test("attr(String)", function() { - expect(42); + expect(43); equals( jQuery("#text1").attr("type"), "text", "Check for type attribute" ); equals( jQuery("#radio1").attr("type"), "radio", "Check for type attribute" ); @@ -54,6 +54,7 @@ test("attr(String)", function() { equals( jQuery("#text1").attr("name"), "action", "Check for name attribute" ); ok( jQuery("#form").attr("action").indexOf("formaction") >= 0, "Check for action attribute" ); equals( jQuery("#text1").attr("value", "t").attr("value"), "t", "Check setting the value attribute" ); + equals( jQuery("<div value='t'></div>").attr("value"), "t", "Check setting custom attr named 'value' on a div" ); equals( jQuery("#form").attr("blah", "blah").attr("blah"), "blah", "Set non-existant attribute on a form" ); equals( jQuery("#foo").attr("height"), undefined, "Non existent height attribute should return undefined" ); |