diff options
author | Ariel Flesler <aflesler@gmail.com> | 2008-12-25 19:47:56 +0000 |
---|---|---|
committer | Ariel Flesler <aflesler@gmail.com> | 2008-12-25 19:47:56 +0000 |
commit | 0e3e470edc77cde0eede8aa6b7642c336d081d66 (patch) | |
tree | ad8519b4ba890c51a3b363a5845e225e85a71786 /test/unit/core.js | |
parent | 4b25b147ab60a026ba1841b313d713fe57530b04 (diff) | |
download | jquery-0e3e470edc77cde0eede8aa6b7642c336d081d66.tar.gz jquery-0e3e470edc77cde0eede8aa6b7642c336d081d66.zip |
jquery core: Closes #3255. The div used in jQuery.clean is emptied in the end. Cleaning the parentNode's properties of the elements.
Diffstat (limited to 'test/unit/core.js')
-rw-r--r-- | test/unit/core.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/unit/core.js b/test/unit/core.js index 679d50425..4da992de0 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -451,7 +451,7 @@ test("attr(Hash)", function() { }); test("attr(String, Object)", function() { - expect(17); + expect(19); var div = jQuery("div").attr("foo", "bar"); fail = false; for ( var i = 0; i < div.size(); i++ ) { @@ -515,6 +515,16 @@ test("attr(String, Object)", function() { } ok( thrown, "Exception thrown when trying to change type property" ); equals( "checkbox", jQuery(check).attr('type'), "Verify that you can change the type of an input element that isn't in the DOM" ); + + var check = jQuery("<input />"); + var thrown = true; + try { + check.attr('type','checkbox'); + } catch(e) { + thrown = false; + } + ok( thrown, "Exception thrown when trying to change type property" ); + equals( "checkbox", check.attr('type'), "Verify that you can change the type of an input element that isn't in the DOM" ); }); if ( !isLocal ) { @@ -1139,6 +1149,8 @@ test("is(String)", function() { }); test("jQuery.merge()", function() { + expect(6); + var parse = jQuery.merge; same( parse([],[]), [], "Empty arrays" ); |