X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fselector%2FselectorTest.js;h=fea247ea3642858ea1cbfa91a8210d0f1eef8c9f;hb=0f7c89cd97de6ca644a834a119dda1e057fd724e;hp=617161457671a97ba9de084d3b21545d9ec24c9e;hpb=61504d516abcc7bae036056853f21601ad310826;p=jquery.git diff --git a/src/selector/selectorTest.js b/src/selector/selectorTest.js index 6171614..fea247e 100644 --- a/src/selector/selectorTest.js +++ b/src/selector/selectorTest.js @@ -1,28 +1,38 @@ module("selector"); test("expressions - element", function() { - expect(5); + 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"] ); + 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