1
1
module ( "selector" ) ;
2
2
3
3
test ( "element" , function ( ) {
4
- expect ( 14 ) ;
4
+ expect ( 18 ) ;
5
5
reset ( ) ;
6
6
7
7
ok ( jQuery ( "*" ) . size ( ) >= 30 , "Select all" ) ;
@@ -15,6 +15,11 @@ test("element", function() {
15
15
t ( "Element Selector" , "html" , [ "html" ] ) ;
16
16
t ( "Parent Element" , "div p" , [ "firstp" , "ap" , "sndp" , "en" , "sap" , "first" ] ) ;
17
17
equals ( jQuery ( "param" , "#object1" ) . length , 2 , "Object/param as context" ) ;
18
+
19
+ isSet ( jQuery ( "p" , document . getElementsByTagName ( "div" ) ) , q ( "firstp" , "ap" , "sndp" , "en" , "sap" , "first" ) , "Finding elements with a context." ) ;
20
+ isSet ( jQuery ( "p" , "div" ) , q ( "firstp" , "ap" , "sndp" , "en" , "sap" , "first" ) , "Finding elements with a context." ) ;
21
+ isSet ( jQuery ( "p" , jQuery ( "div" ) ) , q ( "firstp" , "ap" , "sndp" , "en" , "sap" , "first" ) , "Finding elements with a context." ) ;
22
+ isSet ( jQuery ( "div" ) . find ( "p" ) , q ( "firstp" , "ap" , "sndp" , "en" , "sap" , "first" ) , "Finding elements with a context." ) ;
18
23
19
24
ok ( jQuery ( "#length" ) . length , '<input name="length"> cannot be found under IE, see #945' ) ;
20
25
ok ( jQuery ( "#lengthtest input" ) . length , '<input name="length"> cannot be found under IE, see #945' ) ;
@@ -103,12 +108,17 @@ test("id", function() {
103
108
} ) ;
104
109
105
110
test ( "class" , function ( ) {
106
- expect ( 18 ) ;
111
+ expect ( 22 ) ;
107
112
t ( "Class Selector" , ".blog" , [ "mark" , "simon" ] ) ;
108
113
t ( "Class Selector" , ".GROUPS" , [ "groups" ] ) ;
109
114
t ( "Class Selector" , ".blog.link" , [ "simon" ] ) ;
110
115
t ( "Class Selector w/ Element" , "a.blog" , [ "mark" , "simon" ] ) ;
111
116
t ( "Parent Class Selector" , "p .blog" , [ "mark" , "simon" ] ) ;
117
+
118
+ isSet ( jQuery ( ".blog" , document . getElementsByTagName ( "p" ) ) , q ( "mark" , "simon" ) , "Finding elements with a context." ) ;
119
+ isSet ( jQuery ( ".blog" , "p" ) , q ( "mark" , "simon" ) , "Finding elements with a context." ) ;
120
+ isSet ( jQuery ( ".blog" , jQuery ( "p" ) ) , q ( "mark" , "simon" ) , "Finding elements with a context." ) ;
121
+ isSet ( jQuery ( "p" ) . find ( ".blog" ) , q ( "mark" , "simon" ) , "Finding elements with a context." ) ;
112
122
113
123
t ( "Class selector using UTF8" , ".台北Táiběi" , [ "utf8class1" ] ) ;
114
124
//t( "Class selector using UTF8", ".台北", ["utf8class1","utf8class2"] );
0 commit comments