X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=test%2Funit%2Fselector.js;h=99cef579fedbecee28fc6222e86473c3b557dd1f;hb=e25c4a132f9f11cb407605e3ca7d1900ca904077;hp=341d59b9e0ade7703393ea091b061c2de045a9a5;hpb=f0189d618181409ac628b9bbdecd77338127b9b1;p=jquery.git diff --git a/test/unit/selector.js b/test/unit/selector.js index 341d59b..99cef57 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -180,7 +180,7 @@ test("multiple", function() { }); test("child and adjacent", function() { - expect(45); + expect(48); 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"] ); @@ -193,6 +193,9 @@ test("child and adjacent", function() { t( "Adjacent", "a+ a", ["groups"] ); t( "Adjacent", "a+a", ["groups"] ); t( "Adjacent", "p + p", ["ap","en","sap"] ); + t( "Adjacent", "p#firstp + p", ["ap"] ); + t( "Adjacent", "p[lang=en] + p", ["sap"] ); + t( "Adjacent", "a.GROUPS + code + a", ["mark"] ); t( "Comma, Child, and Adjacent", "a + a, code > a", ["groups","anchor1","anchor2"] ); t( "Verify deep class selector", "div.blah > p > a", [] ); @@ -305,7 +308,7 @@ test("attributes", function() { }); test("pseudo (:) selectors", function() { - expect(67); + expect(70); t( "First Child", "p:first-child", ["firstp","sndp"] ); t( "Last Child", "p:last-child", ["sap"] ); t( "Only Child", "a:only-child", ["simon1","anchor1","yahoo","anchor2","liveLink1","liveLink2"] ); @@ -351,8 +354,11 @@ test("pseudo (:) selectors", function() { t( "Position Greater Than", "p:gt(0)", ["ap","sndp","en","sap","first"] ); t( "Position Less Than", "p:lt(3)", ["firstp","ap","sndp"] ); t( "Is A Parent", "p:parent", ["firstp","ap","sndp","en","sap","first"] ); - t( "Is Visible", "#form input:visible", ["text1","text2","radio1","radio2","check1","check2","name"] ); - t( "Is Hidden", "#form input:hidden", ["hidden1","hidden2"] ); + t( "Is Visible", "#form input:visible", [] ); + t( "Is Visible", "div:visible:not(.testrunner-toolbar)", ["nothiddendiv", "nothiddendivchild"] ); + t( "Is Hidden", "#form input:hidden", ["text1","text2","radio1","radio2","check1","check2","hidden1","hidden2","name"] ); + t( "Is Hidden", "#main:hidden", ["main"] ); + t( "Is Hidden", "#dl:hidden", ["dl"] ); t( "Check position filtering", "div#nothiddendiv:eq(0)", ["nothiddendiv"] ); t( "Check position filtering", "div#nothiddendiv:last", ["nothiddendiv"] );