aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authortimmywil <timmywillisn@gmail.com>2011-10-17 16:45:27 -0400
committertimmywil <timmywillisn@gmail.com>2011-10-17 16:45:37 -0400
commitf2c1d2e016018ba14cd3f1612f9a1803d5e1709e (patch)
tree9ca871021b662629b8184064bafebc287ee51b69 /test
parentae6d0024c8b1e991d020fef9e8d4456818f99813 (diff)
downloadjquery-f2c1d2e016018ba14cd3f1612f9a1803d5e1709e.tar.gz
jquery-f2c1d2e016018ba14cd3f1612f9a1803d5e1709e.zip
Use the property name in elem.removeAttribute in IE6/7 to ensure correct removals. Fixes #10514.
Diffstat (limited to 'test')
-rw-r--r--test/unit/attributes.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index fd97d1c05..926ee6ff4 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -452,7 +452,9 @@ test("attr('tabindex', value)", function() {
test("removeAttr(String)", function() {
expect(9);
- equal( jQuery("#mark").removeAttr( "class" )[0].className, "", "remove class" );
+ var $first;
+
+ equal( jQuery("#mark").removeAttr( "class" ).attr("class"), undefined, "remove class" );
equal( jQuery("#form").removeAttr("id").attr("id"), undefined, "Remove id" );
equal( jQuery("#foo").attr("style", "position:absolute;").removeAttr("style").attr("style"), undefined, "Check removing style attribute" );
equal( jQuery("#form").attr("style", "position:absolute;").removeAttr("style").attr("style"), undefined, "Check removing style attribute on a form" );
@@ -465,8 +467,8 @@ test("removeAttr(String)", function() {
equal( document.getElementById("text1").readOnly, false, "removeAttr sets boolean properties to false" );
try {
- jQuery("#first").attr("contenteditable", "true").removeAttr("contenteditable");
- ok( true, "Removing contenteditable does not throw an error.");
+ $first = jQuery("#first").attr("contenteditable", "true").removeAttr("contenteditable");
+ equal( $first.attr('contenteditable'), undefined, "Remove the contenteditable attribute" );
} catch(e) {
ok( false, "Removing contenteditable threw an error (#10429)" );
}