diff options
author | timmywil <timmywillisn@gmail.com> | 2011-08-25 15:33:38 -0400 |
---|---|---|
committer | timmywil <timmywillisn@gmail.com> | 2011-08-25 15:33:54 -0400 |
commit | d723942b274e3e48dac82ebde11906a4cb349415 (patch) | |
tree | b96993c977f1193fceaf7624e5bf774f3237c6e6 /test/unit/attributes.js | |
parent | e57057739bf0b272113b4b7aa0f3efa369d3fd69 (diff) | |
download | jquery-d723942b274e3e48dac82ebde11906a4cb349415.tar.gz jquery-d723942b274e3e48dac82ebde11906a4cb349415.zip |
Revert back to always setting the attribute to empty string before removal. Fixes #9699.
Diffstat (limited to 'test/unit/attributes.js')
-rw-r--r-- | test/unit/attributes.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js index eaaaa6235..2af36f1c2 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -451,17 +451,18 @@ test("attr('tabindex', value)", function() { }); test("removeAttr(String)", function() { - expect(7); - equals( jQuery("#mark").removeAttr( "class" )[0].className, "", "remove class" ); - equals( jQuery("#form").removeAttr("id").attr("id"), undefined, "Remove id" ); - equals( jQuery("#foo").attr("style", "position:absolute;").removeAttr("style").attr("style"), undefined, "Check removing style attribute" ); - equals( jQuery("#form").attr("style", "position:absolute;").removeAttr("style").attr("style"), undefined, "Check removing style attribute on a form" ); - equals( jQuery("#fx-test-group").attr("height", "3px").removeAttr("height").css("height"), "1px", "Removing height attribute has no effect on height set with style attribute" ); + expect(8); + equal( jQuery("#mark").removeAttr( "class" )[0].className, "", "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" ); + equal( jQuery("<div style='position: absolute'></div>").appendTo("#foo").removeAttr("style").prop("style").cssText, "", "Check removing style attribute (#9699 Webkit)" ); + equal( jQuery("#fx-test-group").attr("height", "3px").removeAttr("height").css("height"), "1px", "Removing height attribute has no effect on height set with style attribute" ); jQuery("#check1").removeAttr("checked").prop("checked", true).removeAttr("checked"); - equals( document.getElementById("check1").checked, false, "removeAttr sets boolean properties to false" ); + equal( document.getElementById("check1").checked, false, "removeAttr sets boolean properties to false" ); jQuery("#text1").prop("readOnly", true).removeAttr("readonly"); - equals( document.getElementById("text1").readOnly, false, "removeAttr sets boolean properties to false" ); + equal( document.getElementById("text1").readOnly, false, "removeAttr sets boolean properties to false" ); }); test("prop(String, Object)", function() { |