Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
f9a7cfac
Commit
f9a7cfac
authored
Feb 15, 2009
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the copy of jQuery and added some more context tests.
parent
87b3ea4b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
selector.js
test/unit/selector.js
+12
-2
No files found.
test/unit/selector.js
View file @
f9a7cfac
module
(
"selector"
);
module
(
"selector"
);
test
(
"element"
,
function
()
{
test
(
"element"
,
function
()
{
expect
(
1
4
);
expect
(
1
8
);
reset
();
reset
();
ok
(
jQuery
(
"*"
).
size
()
>=
30
,
"Select all"
);
ok
(
jQuery
(
"*"
).
size
()
>=
30
,
"Select all"
);
...
@@ -16,6 +16,11 @@ test("element", function() {
...
@@ -16,6 +16,11 @@ test("element", function() {
t
(
"Parent Element"
,
"div p"
,
[
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]
);
t
(
"Parent Element"
,
"div p"
,
[
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]
);
equals
(
jQuery
(
"param"
,
"#object1"
).
length
,
2
,
"Object/param as context"
);
equals
(
jQuery
(
"param"
,
"#object1"
).
length
,
2
,
"Object/param as context"
);
isSet
(
jQuery
(
"p"
,
document
.
getElementsByTagName
(
"div"
)),
q
(
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
),
"Finding elements with a context."
);
isSet
(
jQuery
(
"p"
,
"div"
),
q
(
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
),
"Finding elements with a context."
);
isSet
(
jQuery
(
"p"
,
jQuery
(
"div"
)),
q
(
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
),
"Finding elements with a context."
);
isSet
(
jQuery
(
"div"
).
find
(
"p"
),
q
(
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
),
"Finding elements with a context."
);
ok
(
jQuery
(
"#length"
).
length
,
'<input name="length"> cannot be found under IE, see #945'
);
ok
(
jQuery
(
"#length"
).
length
,
'<input name="length"> cannot be found under IE, see #945'
);
ok
(
jQuery
(
"#lengthtest input"
).
length
,
'<input name="length"> cannot be found under IE, see #945'
);
ok
(
jQuery
(
"#lengthtest input"
).
length
,
'<input name="length"> cannot be found under IE, see #945'
);
...
@@ -103,13 +108,18 @@ test("id", function() {
...
@@ -103,13 +108,18 @@ test("id", function() {
});
});
test
(
"class"
,
function
()
{
test
(
"class"
,
function
()
{
expect
(
18
);
expect
(
22
);
t
(
"Class Selector"
,
".blog"
,
[
"mark"
,
"simon"
]
);
t
(
"Class Selector"
,
".blog"
,
[
"mark"
,
"simon"
]
);
t
(
"Class Selector"
,
".GROUPS"
,
[
"groups"
]
);
t
(
"Class Selector"
,
".GROUPS"
,
[
"groups"
]
);
t
(
"Class Selector"
,
".blog.link"
,
[
"simon"
]
);
t
(
"Class Selector"
,
".blog.link"
,
[
"simon"
]
);
t
(
"Class Selector w/ Element"
,
"a.blog"
,
[
"mark"
,
"simon"
]
);
t
(
"Class Selector w/ Element"
,
"a.blog"
,
[
"mark"
,
"simon"
]
);
t
(
"Parent Class Selector"
,
"p .blog"
,
[
"mark"
,
"simon"
]
);
t
(
"Parent Class Selector"
,
"p .blog"
,
[
"mark"
,
"simon"
]
);
isSet
(
jQuery
(
".blog"
,
document
.
getElementsByTagName
(
"p"
)),
q
(
"mark"
,
"simon"
),
"Finding elements with a context."
);
isSet
(
jQuery
(
".blog"
,
"p"
),
q
(
"mark"
,
"simon"
),
"Finding elements with a context."
);
isSet
(
jQuery
(
".blog"
,
jQuery
(
"p"
)),
q
(
"mark"
,
"simon"
),
"Finding elements with a context."
);
isSet
(
jQuery
(
"p"
).
find
(
".blog"
),
q
(
"mark"
,
"simon"
),
"Finding elements with a context."
);
t
(
"Class selector using UTF8"
,
".台北Táiběi"
,
[
"utf8class1"
]
);
t
(
"Class selector using UTF8"
,
".台北Táiběi"
,
[
"utf8class1"
]
);
//t( "Class selector using UTF8", ".台北", ["utf8class1","utf8class2"] );
//t( "Class selector using UTF8", ".台北", ["utf8class1","utf8class2"] );
t
(
"Class selector using UTF8"
,
".台北Táiběi.台北"
,
[
"utf8class1"
]
);
t
(
"Class selector using UTF8"
,
".台北Táiběi.台北"
,
[
"utf8class1"
]
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment