diff options
author | jeresig <jeresig@gmail.com> | 2010-11-01 19:29:11 -0400 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2010-11-01 19:29:11 -0400 |
commit | 62c83a764cdb3f6e7f6a9b696de1636570df19bf (patch) | |
tree | bce917e9c899afdc3cc8085838114d2483ba6af3 /test/unit/selector.js | |
parent | 9d1bfeb7ffe63b5a7488929b7be847bc1a00f6a6 (diff) | |
download | jquery-62c83a764cdb3f6e7f6a9b696de1636570df19bf.tar.gz jquery-62c83a764cdb3f6e7f6a9b696de1636570df19bf.zip |
Only change ID on nodes that don't already have an ID for rooted qSA. Fixes #7212.
Diffstat (limited to 'test/unit/selector.js')
-rw-r--r-- | test/unit/selector.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/unit/selector.js b/test/unit/selector.js index 856257f38..8f9f56e26 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -1,7 +1,7 @@ module("selector"); test("element", function() { - expect(18); + expect(21); QUnit.reset(); ok( jQuery("*").size() >= 30, "Select all" ); @@ -32,6 +32,11 @@ test("element", function() { t( "Checking sort order", "h2, h1", ["qunit-header", "qunit-banner", "qunit-userAgent"] ); t( "Checking sort order", "h2:first, h1:first", ["qunit-header", "qunit-banner"] ); t( "Checking sort order", "p, p a", ["firstp", "simon1", "ap", "google", "groups", "anchor1", "mark", "sndp", "en", "yahoo", "sap", "anchor2", "simon", "first"] ); + + // Test Conflict ID + same( jQuery("#lengthtest").find("#idTest").get(), q("idTest"), "Finding element with id of ID." ); + same( jQuery("#lengthtest").find("[name='id']").get(), q("idTest"), "Finding element with id of ID." ); + same( jQuery("#lengthtest").find("input[id='idTest']").get(), q("idTest"), "Finding elements with a context." ); }); if ( location.protocol != "file:" ) { |