+ t( "Element Preceded By", "p ~ div", ["foo", "moretests","tabindex-tests", "liveHandlerOrder", "siblingTest"] );
+ t( "Element Preceded By", "#first ~ div", ["moretests","tabindex-tests", "liveHandlerOrder", "siblingTest"] );
+ t( "Element Preceded By", "#groups ~ a", ["mark"] );
+ t( "Element Preceded By", "#length ~ input", ["idTest"] );
+ t( "Element Preceded By", "#siblingfirst ~ em", ["siblingnext"] );
+ t( "Element Preceded By", "#siblingfirst:first ~ em", ["siblingnext"] );
+
+ t( "Verify deep class selector", "div.blah > p > a", [] );
+
+ t( "No element deep selector", "div.foo > span > a", [] );
+
+ same( jQuery("> :first", document.getElementById("nothiddendiv")).get(), q("nothiddendivchild"), "Verify child context positional selctor" );
+ same( jQuery("> :eq(0)", document.getElementById("nothiddendiv")).get(), q("nothiddendivchild"), "Verify child context positional selctor" );
+ same( jQuery("> *:first", document.getElementById("nothiddendiv")).get(), q("nothiddendivchild"), "Verify child context positional selctor" );
+
+ t( "Non-existant ancestors", ".fototab > .thumbnails > a", [] );
+});
+
+test("attributes", function() {
+ expect(34);
+ t( "Attribute Exists", "a[title]", ["google"] );
+ t( "Attribute Exists", "*[title]", ["google"] );
+ t( "Attribute Exists", "[title]", ["google"] );
+ t( "Attribute Exists", "a[ title ]", ["google"] );
+
+ t( "Attribute Equals", "a[rel='bookmark']", ["simon1"] );
+ t( "Attribute Equals", 'a[rel="bookmark"]', ["simon1"] );
+ t( "Attribute Equals", "a[rel=bookmark]", ["simon1"] );
+ t( "Attribute Equals", "a[href='http://www.google.com/']", ["google"] );
+ t( "Attribute Equals", "a[ rel = 'bookmark' ]", ["simon1"] );
+
+ document.getElementById("anchor2").href = "#2";
+ t( "href Attribute", "p a[href^=#]", ["anchor2"] );
+ t( "href Attribute", "p a[href*=#]", ["simon1", "anchor2"] );
+
+ t( "for Attribute", "form label[for]", ["label-for"] );
+ t( "for Attribute in form", "#form [for=action]", ["label-for"] );
+
+ t( "Attribute containing []", "input[name^='foo[']", ["hidden2"] );
+ t( "Attribute containing []", "input[name^='foo[bar]']", ["hidden2"] );
+ t( "Attribute containing []", "input[name*='[bar]']", ["hidden2"] );
+ t( "Attribute containing []", "input[name$='bar]']", ["hidden2"] );
+ t( "Attribute containing []", "input[name$='[bar]']", ["hidden2"] );
+ t( "Attribute containing []", "input[name$='foo[bar]']", ["hidden2"] );
+ t( "Attribute containing []", "input[name*='foo[bar]']", ["hidden2"] );
+
+ t( "Multiple Attribute Equals", "#form input[type='radio'], #form input[type='hidden']", ["radio1", "radio2", "hidden1"] );
+ t( "Multiple Attribute Equals", "#form input[type='radio'], #form input[type=\"hidden\"]", ["radio1", "radio2", "hidden1"] );
+ t( "Multiple Attribute Equals", "#form input[type='radio'], #form input[type=hidden]", ["radio1", "radio2", "hidden1"] );
+
+ t( "Attribute selector using UTF8", "span[lang=中文]", ["台北"] );
+
+ t( "Attribute Begins With", "a[href ^= 'http://www']", ["google","yahoo"] );
+ t( "Attribute Ends With", "a[href $= 'org/']", ["mark"] );
+ t( "Attribute Contains", "a[href *= 'google']", ["google","groups"] );
+ t( "Attribute Is Not Equal", "#ap a[hreflang!='en']", ["google","groups","anchor1"] );
+
+ t("Empty values", "#select1 option[value='']", ["option1a"]);
+ t("Empty values", "#select1 option[value!='']", ["option1b","option1c","option1d"]);