- t( "Multiple Attribute Equals", "#form input[type='hidden'],#form input[type='radio']", ["hidden1","radio1","radio2"] );
- t( "Multiple Attribute Equals", "#form input[type=\"hidden\"],#form input[type='radio']", ["hidden1","radio1","radio2"] );
- t( "Multiple Attribute Equals", "#form input[type=hidden],#form input[type=radio]", ["hidden1","radio1","radio2"] );
+ 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"] );
+
+ var results = ["hidden1","radio1","radio2"];
+
+ if ( document.querySelectorAll ) {
+ results = ["radio1", "radio2", "hidden1"];
+ }
+
+ 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='hidden'],#form input[type='radio']", results );
+ t( "Multiple Attribute Equals", "#form input[type=\"hidden\"],#form input[type='radio']", results );
+ t( "Multiple Attribute Equals", "#form input[type=hidden],#form input[type=radio]", results );