X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=7dd7a16bb789b720b634dcc020ae1ed85fa9003a;hb=ccc4c7663a117f4a9c5469f086d18133ae4f2e38;hp=be39a87d9e19931c56cd3135264a6828562e502c;hpb=94e59e287a9fde9425cd96713e8130aef06bc431;p=jquery.git diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index be39a87..7dd7a16 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -331,11 +331,15 @@ test("expressions - element", function() { }); test("expressions - id", function() { - expect(5); + expect(8); t( "ID Selector", "#body", ["body"] ); t( "ID Selector w/ Element", "body#body", ["body"] ); t( "ID Selector w/ Element", "ul#first", [] ); + 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/*", [] ); }); @@ -375,7 +379,7 @@ test("expressions - child and adjacent", function() { }); test("expressions - attributes", function() { - expect(16); + expect(19); t( "Attribute Exists", "a[@title]", ["google"] ); t( "Attribute Exists", "*[@title]", ["google"] ); t( "Attribute Exists", "[@title]", ["google"] ); @@ -391,6 +395,10 @@ test("expressions - attributes", function() { t( "Attribute Ends With", "a[@href $= 'org/']", ["mark"] ); t( "Attribute Contains", "a[@href *= 'google']", ["google","groups"] ); + t("Select options via [@selected]", "#select1 option[@selected]", ["option1a"] ); + t("Select options via [@selected]", "#select2 option[@selected]", ["option2d"] ); + t("Select options via [@selected]", "#select3 option[@selected]", ["option3b", "option3c"] ); + t( "Grouped Form Elements", "input[@name='foo[bar]']", ["hidden2"] ); t( ":not() Existing attribute", "select:not([@multiple])", ["select1", "select2"]);