Remove code for ticket #7717 which has been marked WONTFIX to match existing $.data...
[jquery.git] / test / unit / traversing.js
index 0636f0c..0d079f1 100644 (file)
@@ -1,7 +1,7 @@
 module("traversing");
 
 test("find(String)", function() {
-       expect(3);
+       expect(5);
        equals( 'Yahoo', jQuery('#foo').find('.blogTest').text(), 'Check for find' );
 
        // using contents will get comments regular, text, and comment nodes
@@ -9,6 +9,8 @@ test("find(String)", function() {
        equals( j.find("div").length, 0, "Check node,textnode,comment to find zero divs" );
 
        same( jQuery("#main").find("> div").get(), q("foo", "moretests", "tabindex-tests", "liveHandlerOrder", "siblingTest"), "find child elements" );
+       same( jQuery("#main").find("> #foo, > #moretests").get(), q("foo", "moretests"), "find child elements" );
+       same( jQuery("#main").find("> #foo > p").get(), q("sndp", "en", "sap"), "find child elements" );
 });
 
 test("is(String)", function() {
@@ -122,7 +124,7 @@ test("filter(jQuery)", function() {
 })
 
 test("closest()", function() {
-       expect(10);
+       expect(11);
        same( jQuery("body").closest("body").get(), q("body"), "closest(body)" );
        same( jQuery("body").closest("html").get(), q("html"), "closest(html)" );
        same( jQuery("body").closest("div").get(), [], "closest(div)" );
@@ -139,7 +141,9 @@ test("closest()", function() {
        
        //Test that .closest() returns unique'd set
        equals( jQuery('#main p').closest('#main').length, 1, "Closest should return a unique set" );
-       
+
+       // Test on disconnected node
+       equals( jQuery("<div><p></p></div>").find("p").closest("table").length, 0, "Make sure disconnected closest work." );
 });
 
 test("closest(Array)", function() {