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
6f031c10
Commit
6f031c10
authored
Jul 28, 2010
by
jzaefferer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace usage of the removed global reset() method with QUnit.reset().
parent
c4b4df46
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
84 deletions
+84
-84
attributes.js
test/unit/attributes.js
+5
-5
core.js
test/unit/core.js
+2
-2
effects.js
test/unit/effects.js
+1
-1
manipulation.js
test/unit/manipulation.js
+74
-74
selector.js
test/unit/selector.js
+2
-2
No files found.
test/unit/attributes.js
View file @
6f031c10
...
@@ -150,7 +150,7 @@ test("attr(String, Object)", function() {
...
@@ -150,7 +150,7 @@ test("attr(String, Object)", function() {
equals
(
j
.
attr
(
"name"
),
"attrvalue"
,
"Check node,textnode,comment for attr"
);
equals
(
j
.
attr
(
"name"
),
"attrvalue"
,
"Check node,textnode,comment for attr"
);
j
.
removeAttr
(
"name"
);
j
.
removeAttr
(
"name"
);
reset
();
QUnit
.
reset
();
var
type
=
jQuery
(
"#check2"
).
attr
(
'type'
);
var
type
=
jQuery
(
"#check2"
).
attr
(
'type'
);
var
thrown
=
false
;
var
thrown
=
false
;
...
@@ -306,7 +306,7 @@ test("val()", function() {
...
@@ -306,7 +306,7 @@ test("val()", function() {
document
.
getElementById
(
'text1'
).
value
=
"bla"
;
document
.
getElementById
(
'text1'
).
value
=
"bla"
;
equals
(
jQuery
(
"#text1"
).
val
(),
"bla"
,
"Check for modified value of input element"
);
equals
(
jQuery
(
"#text1"
).
val
(),
"bla"
,
"Check for modified value of input element"
);
reset
();
QUnit
.
reset
();
equals
(
jQuery
(
"#text1"
).
val
(),
"Test"
,
"Check for value of input element"
);
equals
(
jQuery
(
"#text1"
).
val
(),
"Test"
,
"Check for value of input element"
);
// ticket #1714 this caused a JS error in IE
// ticket #1714 this caused a JS error in IE
...
@@ -504,7 +504,7 @@ var testRemoveClass = function(valueObj) {
...
@@ -504,7 +504,7 @@ var testRemoveClass = function(valueObj) {
ok
(
!
$divs
.
is
(
'.test'
),
"Remove Class"
);
ok
(
!
$divs
.
is
(
'.test'
),
"Remove Class"
);
reset
();
QUnit
.
reset
();
$divs
=
jQuery
(
'div'
);
$divs
=
jQuery
(
'div'
);
$divs
.
addClass
(
"test"
).
addClass
(
"foo"
).
addClass
(
"bar"
);
$divs
.
addClass
(
"test"
).
addClass
(
"foo"
).
addClass
(
"bar"
);
...
@@ -512,7 +512,7 @@ var testRemoveClass = function(valueObj) {
...
@@ -512,7 +512,7 @@ var testRemoveClass = function(valueObj) {
ok
(
!
$divs
.
is
(
'.test,.bar,.foo'
),
"Remove multiple classes"
);
ok
(
!
$divs
.
is
(
'.test,.bar,.foo'
),
"Remove multiple classes"
);
reset
();
QUnit
.
reset
();
$divs
=
jQuery
(
'div'
);
$divs
=
jQuery
(
'div'
);
// Make sure that a null value doesn't cause problems
// Make sure that a null value doesn't cause problems
...
@@ -563,7 +563,7 @@ test("removeClass(Function) with incoming value", function() {
...
@@ -563,7 +563,7 @@ test("removeClass(Function) with incoming value", function() {
ok
(
!
$divs
.
is
(
'.test'
),
"Remove Class"
);
ok
(
!
$divs
.
is
(
'.test'
),
"Remove Class"
);
reset
();
QUnit
.
reset
();
});
});
var
testToggleClass
=
function
(
valueObj
)
{
var
testToggleClass
=
function
(
valueObj
)
{
...
...
test/unit/core.js
View file @
6f031c10
...
@@ -398,7 +398,7 @@ test("isXMLDoc - XML", function() {
...
@@ -398,7 +398,7 @@ test("isXMLDoc - XML", function() {
test
(
"jQuery('html')"
,
function
()
{
test
(
"jQuery('html')"
,
function
()
{
expect
(
15
);
expect
(
15
);
reset
();
QUnit
.
reset
();
jQuery
.
foo
=
false
;
jQuery
.
foo
=
false
;
var
s
=
jQuery
(
"<script>jQuery.foo='test';</script>"
)[
0
];
var
s
=
jQuery
(
"<script>jQuery.foo='test';</script>"
)[
0
];
ok
(
s
,
"Creating a script"
);
ok
(
s
,
"Creating a script"
);
...
@@ -414,7 +414,7 @@ test("jQuery('html')", function() {
...
@@ -414,7 +414,7 @@ test("jQuery('html')", function() {
equals
(
div
.
childNodes
[
1
].
nodeType
,
1
,
"Paragraph."
);
equals
(
div
.
childNodes
[
1
].
nodeType
,
1
,
"Paragraph."
);
equals
(
div
.
childNodes
[
1
].
firstChild
.
nodeType
,
3
,
"Paragraph text."
);
equals
(
div
.
childNodes
[
1
].
firstChild
.
nodeType
,
3
,
"Paragraph text."
);
reset
();
QUnit
.
reset
();
ok
(
jQuery
(
"<link rel='stylesheet'/>"
)[
0
],
"Creating a link"
);
ok
(
jQuery
(
"<link rel='stylesheet'/>"
)[
0
],
"Creating a link"
);
ok
(
!
jQuery
(
"<script/>"
)[
0
].
parentNode
,
"Create a script"
);
ok
(
!
jQuery
(
"<script/>"
)[
0
].
parentNode
,
"Create a script"
);
...
...
test/unit/effects.js
View file @
6f031c10
...
@@ -61,7 +61,7 @@ test("show()", function() {
...
@@ -61,7 +61,7 @@ test("show()", function() {
test
(
"show(Number) - other displays"
,
function
()
{
test
(
"show(Number) - other displays"
,
function
()
{
expect
(
15
);
expect
(
15
);
reset
();
QUnit
.
reset
();
stop
();
stop
();
jQuery
(
"#main"
).
append
(
'<div id="show-tests"><div><p><a href="#"></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>'
);
jQuery
(
"#main"
).
append
(
'<div id="show-tests"><div><p><a href="#"></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>'
);
...
...
test/unit/manipulation.js
View file @
6f031c10
This diff is collapsed.
Click to expand it.
test/unit/selector.js
View file @
6f031c10
...
@@ -2,7 +2,7 @@ module("selector");
...
@@ -2,7 +2,7 @@ module("selector");
test
(
"element"
,
function
()
{
test
(
"element"
,
function
()
{
expect
(
19
);
expect
(
19
);
reset
();
QUnit
.
reset
();
ok
(
jQuery
(
"*"
).
size
()
>=
30
,
"Select all"
);
ok
(
jQuery
(
"*"
).
size
()
>=
30
,
"Select all"
);
var
all
=
jQuery
(
"*"
),
good
=
true
;
var
all
=
jQuery
(
"*"
),
good
=
true
;
...
@@ -292,7 +292,7 @@ test("pseudo - child", function() {
...
@@ -292,7 +292,7 @@ test("pseudo - child", function() {
t
(
"First Child"
,
"p:first-child"
,
[]
);
t
(
"First Child"
,
"p:first-child"
,
[]
);
reset
();
QUnit
.
reset
();
t
(
"Last Child"
,
"p:last-child"
,
[
"sap"
]
);
t
(
"Last Child"
,
"p:last-child"
,
[
"sap"
]
);
t
(
"Last Child"
,
"a:last-child"
,
[
"simon1"
,
"anchor1"
,
"mark"
,
"yahoo"
,
"anchor2"
,
"simon"
,
"liveLink1"
,
"liveLink2"
]
);
t
(
"Last Child"
,
"a:last-child"
,
[
"simon1"
,
"anchor1"
,
"mark"
,
"yahoo"
,
"anchor2"
,
"simon"
,
"liveLink1"
,
"liveLink2"
]
);
...
...
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