aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authortimmywil <tim.willison@thisismedium.com>2011-04-21 21:33:09 -0400
committerjeresig <jeresig@gmail.com>2011-04-21 21:33:09 -0400
commit3ac9eb7ce37b461a34e303e8b77aa544d313441c (patch)
tree50cf69cf2e5d6c4e670ecd4757e0f12e48b010b8 /test
parentdbe966aa57ce10d6c93db46eb2f3369a39e10d01 (diff)
downloadjquery-3ac9eb7ce37b461a34e303e8b77aa544d313441c.tar.gz
jquery-3ac9eb7ce37b461a34e303e8b77aa544d313441c.zip
Landing pull request [337](https://github.com/jquery/jquery/pull/337). Value of radio inputs resets when type is set after the value in all IEs. Fixes #8570 ([bug](http://bugs.jquery.com/ticket/8570)).
Diffstat (limited to 'test')
-rw-r--r--test/unit/attributes.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index f663e443e..0889bf339 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -177,7 +177,7 @@ test("attr(Hash)", function() {
});
test("attr(String, Object)", function() {
- expect(29);
+ expect(30);
var div = jQuery("div").attr("foo", "bar"),
fail = false;
@@ -290,7 +290,10 @@ test("attr(String, Object)", function() {
}
ok( thrown, "Exception thrown when trying to change type property" );
equals( "button", button.attr("type"), "Verify that you can't change the type of a button element" );
-
+
+ var $radio = jQuery("<input>", { "value": "sup", "type": "radio" }).appendTo("#testForm");
+ equals( $radio.val(), "sup", "Value is not reset when type is set after value on a radio" );
+
// Setting attributes on svg elements (bug #3116)
var $svg = jQuery("<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' baseProfile='full' width='200' height='200'>"
+ "<circle cx='200' cy='200' r='150' />"
@@ -557,6 +560,7 @@ test( "val(Array of Numbers) (Bug #7123)", function() {
test("val(Function) with incoming value", function() {
expect(10);
+ QUnit.reset();
var oldVal = jQuery("#text1").val();
jQuery("#text1").val(function(i, val) {