git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1e9d6e1
)
Blackberry 4.6 doesn't maintain comment nodes in the DOM, ignore them in our test...
author
John Resig
<jeresig@gmail.com>
Thu, 26 Aug 2010 19:36:44 +0000
(15:36 -0400)
committer
John Resig
<jeresig@gmail.com>
Thu, 26 Aug 2010 19:36:44 +0000
(15:36 -0400)
test/unit/manipulation.js
patch
|
blob
|
history
diff --git
a/test/unit/manipulation.js
b/test/unit/manipulation.js
index
4dd1df4
..
87af324
100644
(file)
--- a/
test/unit/manipulation.js
+++ b/
test/unit/manipulation.js
@@
-22,7
+22,9
@@
var testText = function(valueObj) {
j.text(valueObj("hi!"));
equals( jQuery(j[0]).text(), "hi!", "Check node,textnode,comment with text()" );
equals( j[1].nodeValue, " there ", "Check node,textnode,comment with text()" );
j.text(valueObj("hi!"));
equals( jQuery(j[0]).text(), "hi!", "Check node,textnode,comment with text()" );
equals( j[1].nodeValue, " there ", "Check node,textnode,comment with text()" );
- equals( j[2].nodeType, 8, "Check node,textnode,comment with text()" );
+
+ // Blackberry 4.6 doesn't maintain comments in the DOM
+ equals( jQuery("#nonnodes")[0].childNodes.length < 3 ? 8 : j[2].nodeType, 8, "Check node,textnode,comment with text()" );
}
test("text(String)", function() {
}
test("text(String)", function() {
@@
-72,7
+74,9
@@
var testWrap = function(val) {
// using contents will get comments regular, text, and comment nodes
var j = jQuery("#nonnodes").contents();
j.wrap(val( "<i></i>" ));
// using contents will get comments regular, text, and comment nodes
var j = jQuery("#nonnodes").contents();
j.wrap(val( "<i></i>" ));
- equals( jQuery("#nonnodes > i").length, 3, "Check node,textnode,comment wraps ok" );
+
+ // Blackberry 4.6 doesn't maintain comments in the DOM
+ equals( jQuery("#nonnodes > i").length, jQuery("#nonnodes")[0].childNodes.length, "Check node,textnode,comment wraps ok" );
equals( jQuery("#nonnodes > i").text(), j.text(), "Check node,textnode,comment wraps doesn't hurt text" );
// Try wrapping a disconnected node
equals( jQuery("#nonnodes > i").text(), j.text(), "Check node,textnode,comment wraps doesn't hurt text" );
// Try wrapping a disconnected node