aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/selector.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-02-16 18:23:59 +0000
committerJohn Resig <jeresig@gmail.com>2009-02-16 18:23:59 +0000
commit048fc4555f8a794239a985c63cff3f76d20d6c61 (patch)
tree25066a009b29c9c13f48f31ee2c65435d1e3c60c /test/unit/selector.js
parent8533da939d933561aa6c516db4e544dba076a988 (diff)
downloadjquery-048fc4555f8a794239a985c63cff3f76d20d6c61.tar.gz
jquery-048fc4555f8a794239a985c63cff3f76d20d6c61.zip
Added support for class selectors and class attribute selectors on XML documents. Fixes jQuery bug #4167.
Diffstat (limited to 'test/unit/selector.js')
-rw-r--r--test/unit/selector.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/selector.js b/test/unit/selector.js
index 9f29bf6bf..c4c13601b 100644
--- a/test/unit/selector.js
+++ b/test/unit/selector.js
@@ -35,10 +35,12 @@ test("element", function() {
if ( location.protocol != "file:" ) {
test("XML Document Selectors", function() {
- expect(5);
+ expect(7);
stop();
jQuery.get("data/with_fries.xml", function(xml) {
equals( jQuery("foo_bar", xml).length, 1, "Element Selector with underscore" );
+ equals( jQuery(".component", xml).length, 1, "Class selector" );
+ equals( jQuery("[class*=component]", xml).length, 1, "Attribute selector for class" );
equals( jQuery("property[name=prop2]", xml).length, 1, "Attribute selector with name" );
equals( jQuery("[name=prop2]", xml).length, 1, "Attribute selector with name" );
equals( jQuery("#seite1", xml).length, 1, "Attribute selector with ID" );