X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=test%2Funit%2Fmanipulation.js;h=e1d3dbf6add31f9a8ea8d869edad6bfefe1491b5;hb=97d468fbf0f840f52c91855b0bc8db0ed6ac403c;hp=97d4ca0261bc4426e0727ef98156367cbd5fd873;hpb=c5382ad7c118ca54dde630b6c7146f1c3b6afb80;p=jquery.git diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 97d4ca0..e1d3dbf 100644 --- 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()" ); - 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() { @@ -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( "" )); - 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 @@ -265,7 +269,7 @@ var testAppend = function(valueObj) { var body = jQuery("#iframe")[0].contentWindow.document.body; pass = false; - jQuery( document.body ).append(valueObj( "