]> source.dussan.org Git - jquery.git/commitdiff
Make sure that we don't use matchesSelector on XML Documents (same as with qSA)....
authorjeresig <jeresig@gmail.com>
Fri, 22 Oct 2010 04:40:06 +0000 (00:40 -0400)
committerjeresig <jeresig@gmail.com>
Fri, 22 Oct 2010 04:40:06 +0000 (00:40 -0400)
test/unit/selector.js

index abb071748a73508b62ad4dd3b644cbb30fc19946..856257f38b8c67316d36582d8c776de16918f925 100644 (file)
@@ -36,7 +36,7 @@ test("element", function() {
 
 if ( location.protocol != "file:" ) {
        test("XML Document Selectors", function() {
-               expect(7);
+               expect(8);
                stop();
                jQuery.get("data/with_fries.xml", function(xml) {
                        equals( jQuery("foo_bar", xml).length, 1, "Element Selector with underscore" );
@@ -46,6 +46,7 @@ if ( location.protocol != "file:" ) {
                        equals( jQuery("[name=prop2]", xml).length, 1, "Attribute selector with name" );
                        equals( jQuery("#seite1", xml).length, 1, "Attribute selector with ID" );
                        equals( jQuery("component#seite1", xml).length, 1, "Attribute selector with ID" );
+                       equals( jQuery("component", xml).filter("#seite1").length, 1, "Attribute selector filter with ID" );
                        start();
                });
        });