Backing out disconnected + and ~ tests as they're not something that we actively...
[jquery.git] / test / unit / selector.js
index 27ad6e5..7303af4 100644 (file)
@@ -1,4 +1,4 @@
-module("selector");
+module("selector", { teardown: moduleTeardown });
 
 test("element", function() {
        expect(21);
@@ -58,7 +58,7 @@ if ( location.protocol != "file:" ) {
 }
 
 test("broken", function() {
-       expect(20);
+       expect(19);
 
        function broken(name, selector) {
                try {
@@ -80,7 +80,10 @@ test("broken", function() {
        broken( "Doesn't exist", ":visble", [] );
        broken( "Nth-child", ":nth-child", [] );
        broken( "Nth-child", ":nth-child(-)", [] );
-       broken( "Nth-child", ":nth-child(asdf)", [] );
+       // Sigh. WebKit thinks this is a real selector in qSA
+       // They've already fixed this and it'll be coming into
+       // current browsers soon.
+       //broken( "Nth-child", ":nth-child(asdf)", [] );
        broken( "Nth-child", ":nth-child(2n+-0)", [] );
        broken( "Nth-child", ":nth-child(2+0)", [] );
        broken( "Nth-child", ":nth-child(- 1n)", [] );
@@ -224,7 +227,7 @@ test("multiple", function() {
 });
 
 test("child and adjacent", function() {
-       expect(31);
+       expect(29);
        t( "Child", "p > a", ["simon1","google","groups","mark","yahoo","simon"] );
        t( "Child", "p> a", ["simon1","google","groups","mark","yahoo","simon"] );
        t( "Child", "p >a", ["simon1","google","groups","mark","yahoo","simon"] );
@@ -248,9 +251,6 @@ test("child and adjacent", function() {
        t( "Element Preceded By", "#siblingfirst ~ em", ["siblingnext"] );
        same( jQuery("#siblingfirst").find("~ em").get(), q("siblingnext"), "Element Preceded By with a context." );
        same( jQuery("#siblingfirst").find("+ em").get(), q("siblingnext"), "Element Directly Preceded By with a context." );
-       var a = jQuery("<div id='foo'></div><p id='bar'></p><p id='bar2'></p>");
-       same( jQuery("~ p", a[0]).get(), [a[1], a[2]], "Detached Element Directly Preceded By with a context." );
-       same( jQuery("+ p", a[0]).get(), [a[1]], "Detached Element Preceded By with a context." );
 
        t( "Verify deep class selector", "div.blah > p > a", [] );