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
43fbe3b3
Commit
43fbe3b3
authored
Aug 27, 2010
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle two more cases where comments were missing in the test case, in Blackberry 4.6.
parent
ea8b1584
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
manipulation.js
test/unit/manipulation.js
+7
-1
No files found.
test/unit/manipulation.js
View file @
43fbe3b3
...
...
@@ -984,6 +984,11 @@ test("html(Function) with incoming value", function() {
equals
(
val
,
old
[
i
],
"Make sure the incoming value is correct."
);
return
"<b>bold</b>"
;
});
// Handle the case where no comment is in the document
if
(
j
.
length
===
2
)
{
equals
(
null
,
null
,
"Make sure the incoming value is correct."
);
}
j
.
find
(
'b'
).
removeData
();
equals
(
j
.
html
().
replace
(
/ xmlns="
[^
"
]
+"/g
,
""
).
toLowerCase
(),
"<b>bold</b>"
,
"Check node,textnode,comment with html()"
);
...
...
@@ -1038,7 +1043,8 @@ var testRemove = function(method) {
equals
(
jQuery
(
"#ap"
).
children
().
length
,
0
,
"Check multi-filtered remove"
);
// using contents will get comments regular, text, and comment nodes
equals
(
jQuery
(
"#nonnodes"
).
contents
().
length
,
3
,
"Check node,textnode,comment remove works"
);
// Handle the case where no comment is in the document
ok
(
jQuery
(
"#nonnodes"
).
contents
().
length
>=
2
,
"Check node,textnode,comment remove works"
);
jQuery
(
"#nonnodes"
).
contents
()[
method
]();
equals
(
jQuery
(
"#nonnodes"
).
contents
().
length
,
0
,
"Check node,textnode,comment remove works"
);
...
...
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