X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fselector%2FselectorTest.js;h=9ae223309c8222466c25711997459cbe4f209551;hb=346ceacce3fb6f83701d742ce0835d4db0ba98aa;hp=7a4789a80a1a9d26a6046acfc7912625d1f6dcea;hpb=46e770352a9d68fe72a2cf59fc2d18fe61669730;p=jquery.git diff --git a/src/selector/selectorTest.js b/src/selector/selectorTest.js index 7a4789a..9ae2233 100644 --- a/src/selector/selectorTest.js +++ b/src/selector/selectorTest.js @@ -41,7 +41,7 @@ test("broken", function() { }); test("id", function() { - expect(24); + expect(25); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); @@ -72,6 +72,8 @@ test("id", function() { t( "ID Selector on Form with an input that has a name of 'id'", "#lengthtest", ["lengthtest"] ); t( "ID selector with non-existant ancestor", "#asdfasdf #foobar", [] ); // bug #986 + + isSet( $("body").find("div#form"), [], "ID selector within the context of another element" ); }); test("class", function() { @@ -161,7 +163,7 @@ test("attributes", function() { }); test("pseudo (:) selectors", function() { - expect(30); + expect(31); 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"] ); @@ -194,6 +196,8 @@ test("pseudo (:) selectors", function() { t( "Form element :radio:checked", ":radio:checked", ["radio2"] ); t( "Form element :checkbox:checked", ":checkbox:checked", ["check1"] ); t( "Form element :checkbox:checked, :radio:checked", ":checkbox:checked, :radio:checked", ["check1", "radio2"] ); + + t( "Headers", ":header", ["header", "banner", "userAgent"] ); }); test("basic xpath", function() {