X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fselector%2FselectorTest.js;h=c9cf762a57f848d9bc4c0e24295e45e925c12bf4;hb=1c42201d7aba027afeaec8bef5e026d74ce38a7b;hp=422f84a4f9082ab738dc8365ebab8b3c0abf2edf;hpb=02483b4a593fb5ae9bb3925f6fe9641e31e2828e;p=jquery.git diff --git a/src/selector/selectorTest.js b/src/selector/selectorTest.js index 422f84a..c9cf762 100644 --- a/src/selector/selectorTest.js +++ b/src/selector/selectorTest.js @@ -1,28 +1,35 @@ module("selector"); test("expressions - element", function() { - expect(7); + expect(6); ok( $("*").size() >= 30, "Select all" ); t( "Element Selector", "div", ["main","foo"] ); t( "Element Selector", "body", ["body"] ); t( "Element Selector", "html", ["html"] ); t( "Parent Element", "div div", ["foo"] ); - t( "Object/Param element", "#object param", ["param1", "param2"] ); - ok( $("param", $("#object")[0]).length == 2, "Object/param as context" ); + ok( $("param", "#object1").length == 2, "Object/param as context" ); }); test("expressions - id", function() { - expect(8); + expect(13); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); + t( "ID selector with existing ID descendant", "#firstp #simon1", ["simon1"] ); + t( "ID selector with non-existant descendant", "#firstp #foobar", [] ); t( "ID Selector, child ID present", "#form > #radio1", ["radio1"] ); // bug #267 t( "ID Selector, not an ancestor ID", "#form #first", [] ); t( "ID Selector, not a child ID", "#form > #option1a", [] ); - t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); - t( "All Children of ID with no children", "#firstUL/*", [] ); + t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] ); + t( "All Children of ID with no children", "#firstUL/*", [] ); + + $('tName1 AtName2 A