diff options
author | John Resig <jeresig@gmail.com> | 2011-04-22 00:51:23 -0400 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2011-04-22 00:51:23 -0400 |
commit | 9b00827ac90e0411ff2d106cb799465af18f703f (patch) | |
tree | 57c479ca91aeb8b6624eb03f1e641e17f594dc62 /test/unit/traversing.js | |
parent | bc7bb0df28f52846e54a2ce5ecf493d4594b2a90 (diff) | |
download | jquery-9b00827ac90e0411ff2d106cb799465af18f703f.tar.gz jquery-9b00827ac90e0411ff2d106cb799465af18f703f.zip |
Disabling .add(form.elements) unit test.
Diffstat (limited to 'test/unit/traversing.js')
-rw-r--r-- | test/unit/traversing.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/unit/traversing.js b/test/unit/traversing.js index b5130dbf7..5216ae752 100644 --- a/test/unit/traversing.js +++ b/test/unit/traversing.js @@ -480,10 +480,15 @@ test("contents()", function() { }); test("add(String|Element|Array|undefined)", function() { - expect(17); + expect(16); same( jQuery("#sndp").add("#en").add("#sap").get(), q("sndp", "en", "sap"), "Check elements from document" ); same( jQuery("#sndp").add( jQuery("#en")[0] ).add( jQuery("#sap") ).get(), q("sndp", "en", "sap"), "Check elements from document" ); - ok( jQuery([]).add(jQuery("#form")[0].elements).length >= 13, "Check elements from array" ); + + // We no longer support .add(form.elements), unfortunately. + // There is no way, in browsers, to reliably determine the difference + // between form.elements and form - and doing .add(form) and having it + // add the form elements is way to unexpected, so this gets the boot. + // ok( jQuery([]).add(jQuery("#form")[0].elements).length >= 13, "Check elements from array" ); // For the time being, we're discontinuing support for jQuery(form.elements) since it's ambiguous in IE // use jQuery([]).add(form.elements) instead. |