* Fixed IE ID selectors selecting by the name attribute and added tests

* Added href attribute test to test suite
* Updated Changelog
This commit is contained in:
Brandon Aaron 2007-02-23 02:53:22 +00:00
parent 4259b02c99
commit 44599e174b
4 changed files with 20 additions and 7 deletions

View file

@ -11,7 +11,7 @@ test("expressions - element", function() {
});
test("expressions - id", function() {
expect(11);
expect(13);
t( "ID Selector", "#body", ["body"] );
t( "ID Selector w/ Element", "body#body", ["body"] );
t( "ID Selector w/ Element", "ul#first", [] );
@ -25,7 +25,11 @@ test("expressions - id", function() {
t( "All Children of ID", "#foo/*", ["sndp", "en", "sap"] );
t( "All Children of ID with no children", "#firstUL/*", [] );
t( "ID selector with non-existant ancestor", "#asdfasdf #foobar", [] );
$('<a name="tName1">tName1 A</a><a name="tName2">tName2 A</a><div id="tName1">tName1 Div</div>').appendTo('#main');
ok( $("#tName1")[0].id == 'tName1', "ID selector with same value for a name attribute" );
ok( $("#tName2").length == 0, "ID selector non-existing but name attribute on an A tag" );
t( "ID selector with non-existant ancestor", "#asdfasdf #foobar", [] ); // bug #986
});