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
b0306cc3
Commit
b0306cc3
authored
Sep 29, 2009
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the jQuery suite to use the new 'qunit-' prefix on specific elements.
parent
dfeb8140
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
index.html
test/index.html
+3
-3
selector.js
test/unit/selector.js
+8
-8
No files found.
test/index.html
View file @
b0306cc3
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
<body
id=
"body"
>
<body
id=
"body"
>
<h1
id=
"header"
>
jQuery Test Suite
</h1>
<h1
id=
"header"
>
jQuery Test Suite
</h1>
<h2
id=
"banner"
></h2>
<h2
id=
"
qunit-
banner"
></h2>
<h2
id=
"userAgent"
></h2>
<h2
id=
"
qunit-
userAgent"
></h2>
<!-- Test HTML -->
<!-- Test HTML -->
<div
id=
"nothiddendiv"
style=
"height:1px;background:white;"
class=
"nothiddendiv"
>
<div
id=
"nothiddendiv"
style=
"height:1px;background:white;"
class=
"nothiddendiv"
>
...
@@ -227,6 +227,6 @@ Z</textarea>
...
@@ -227,6 +227,6 @@ Z</textarea>
<div
id=
"fx-tests"
></div>
<div
id=
"fx-tests"
></div>
</div>
</div>
<ol
id=
"tests"
></ol>
<ol
id=
"
qunit-
tests"
></ol>
</body>
</body>
</html>
</html>
test/unit/selector.js
View file @
b0306cc3
...
@@ -28,8 +28,8 @@ test("element", function() {
...
@@ -28,8 +28,8 @@ test("element", function() {
same
(
jQuery
(
"*"
).
get
(),
jQuery
(
"*, *"
).
get
(),
"Check for duplicates: *, *"
);
same
(
jQuery
(
"*"
).
get
(),
jQuery
(
"*, *"
).
get
(),
"Check for duplicates: *, *"
);
same
(
jQuery
(
"p"
).
get
(),
jQuery
(
"p, div p"
).
get
(),
"Check for duplicates: p, div p"
);
same
(
jQuery
(
"p"
).
get
(),
jQuery
(
"p, div p"
).
get
(),
"Check for duplicates: p, div p"
);
t
(
"Checking sort order"
,
"h2, h1"
,
[
"header"
,
"
banner"
,
"
userAgent"
]
);
t
(
"Checking sort order"
,
"h2, h1"
,
[
"header"
,
"
qunit-banner"
,
"qunit-
userAgent"
]
);
t
(
"Checking sort order"
,
"h2:first, h1:first"
,
[
"header"
,
"banner"
]
);
t
(
"Checking sort order"
,
"h2:first, h1:first"
,
[
"header"
,
"
qunit-
banner"
]
);
t
(
"Checking sort order"
,
"p, p a"
,
[
"firstp"
,
"simon1"
,
"ap"
,
"google"
,
"groups"
,
"anchor1"
,
"mark"
,
"sndp"
,
"en"
,
"yahoo"
,
"sap"
,
"anchor2"
,
"simon"
,
"first"
]
);
t
(
"Checking sort order"
,
"p, p a"
,
[
"firstp"
,
"simon1"
,
"ap"
,
"google"
,
"groups"
,
"anchor1"
,
"mark"
,
"sndp"
,
"en"
,
"yahoo"
,
"sap"
,
"anchor2"
,
"simon"
,
"first"
]
);
});
});
...
@@ -175,10 +175,10 @@ test("name", function() {
...
@@ -175,10 +175,10 @@ test("name", function() {
test
(
"multiple"
,
function
()
{
test
(
"multiple"
,
function
()
{
expect
(
4
);
expect
(
4
);
t
(
"Comma Support"
,
"h2, p"
,
[
"
banner"
,
"
userAgent"
,
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]);
t
(
"Comma Support"
,
"h2, p"
,
[
"
qunit-banner"
,
"qunit-
userAgent"
,
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]);
t
(
"Comma Support"
,
"h2 , p"
,
[
"
banner"
,
"
userAgent"
,
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]);
t
(
"Comma Support"
,
"h2 , p"
,
[
"
qunit-banner"
,
"qunit-
userAgent"
,
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]);
t
(
"Comma Support"
,
"h2 , p"
,
[
"
banner"
,
"
userAgent"
,
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]);
t
(
"Comma Support"
,
"h2 , p"
,
[
"
qunit-banner"
,
"qunit-
userAgent"
,
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]);
t
(
"Comma Support"
,
"h2,p"
,
[
"
banner"
,
"
userAgent"
,
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]);
t
(
"Comma Support"
,
"h2,p"
,
[
"
qunit-banner"
,
"qunit-
userAgent"
,
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]);
});
});
test
(
"child and adjacent"
,
function
()
{
test
(
"child and adjacent"
,
function
()
{
...
@@ -361,7 +361,7 @@ test("pseudo (:) selectors", function() {
...
@@ -361,7 +361,7 @@ test("pseudo (:) selectors", function() {
t
(
"Position Less Than"
,
"p:lt(3)"
,
[
"firstp"
,
"ap"
,
"sndp"
]
);
t
(
"Position Less Than"
,
"p:lt(3)"
,
[
"firstp"
,
"ap"
,
"sndp"
]
);
t
(
"Is A Parent"
,
"p:parent"
,
[
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]
);
t
(
"Is A Parent"
,
"p:parent"
,
[
"firstp"
,
"ap"
,
"sndp"
,
"en"
,
"sap"
,
"first"
]
);
t
(
"Is Visible"
,
"#form input:visible"
,
[]
);
t
(
"Is Visible"
,
"#form input:visible"
,
[]
);
t
(
"Is Visible"
,
"div:visible:not(.testrunner-toolbar):lt(2)"
,
[
"nothiddendiv"
,
"nothiddendivchild"
]
);
t
(
"Is Visible"
,
"div:visible:not(.
qunit-
testrunner-toolbar):lt(2)"
,
[
"nothiddendiv"
,
"nothiddendivchild"
]
);
t
(
"Is Hidden"
,
"#form input:hidden"
,
[
"text1"
,
"text2"
,
"radio1"
,
"radio2"
,
"check1"
,
"check2"
,
"hidden1"
,
"hidden2"
,
"name"
,
"search"
]
);
t
(
"Is Hidden"
,
"#form input:hidden"
,
[
"text1"
,
"text2"
,
"radio1"
,
"radio2"
,
"check1"
,
"check2"
,
"hidden1"
,
"hidden2"
,
"name"
,
"search"
]
);
t
(
"Is Hidden"
,
"#main:hidden"
,
[
"main"
]
);
t
(
"Is Hidden"
,
"#main:hidden"
,
[
"main"
]
);
t
(
"Is Hidden"
,
"#dl:hidden"
,
[
"dl"
]
);
t
(
"Is Hidden"
,
"#dl:hidden"
,
[
"dl"
]
);
...
@@ -409,6 +409,6 @@ test("pseudo (:) selectors", function() {
...
@@ -409,6 +409,6 @@ test("pseudo (:) selectors", function() {
t
(
"Form element :checkbox:checked"
,
"#form :checkbox:checked"
,
[
"check1"
]
);
t
(
"Form element :checkbox:checked"
,
"#form :checkbox:checked"
,
[
"check1"
]
);
t
(
"Form element :radio:checked, :checkbox:checked"
,
"#form :radio:checked, #form :checkbox:checked"
,
[
"radio2"
,
"check1"
]
);
t
(
"Form element :radio:checked, :checkbox:checked"
,
"#form :radio:checked, #form :checkbox:checked"
,
[
"radio2"
,
"check1"
]
);
t
(
"Headers"
,
":header"
,
[
"header"
,
"
banner"
,
"
userAgent"
]
);
t
(
"Headers"
,
":header"
,
[
"header"
,
"
qunit-banner"
,
"qunit-
userAgent"
]
);
t
(
"Has Children - :has()"
,
"p:has(a)"
,
[
"firstp"
,
"ap"
,
"en"
,
"sap"
]
);
t
(
"Has Children - :has()"
,
"p:has(a)"
,
[
"firstp"
,
"ap"
,
"en"
,
"sap"
]
);
});
});
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