X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;h=e387d640eba82b04fb7cf6270c67a92e1b2148a3;hb=01f72026ec939e87da85a7afc1a5262872ea3ce5;hp=bb78bdd2b813b0da53daec3051bde859a5a7fb69;hpb=2c8af19a06c49dc2121d968c2609087b0a54e894;p=jquery.git diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index bb78bdd..e387d64 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -139,11 +139,6 @@ test("wrapAll(String|Element)", function() { testWrapAll(bareObj); }); -// TODO: Figure out why each(wrapAll) is not equivalent to wrapAll -// test("wrapAll(Function)", function() { -// testWrapAll(functionReturningObj); -// }) - var testWrapInner = function(val) { expect(8); var num = jQuery("#first").children().length; @@ -828,9 +823,9 @@ var testHtml = function(valueObj) { equals( $div.html(valueObj( 0 )).html(), '0', 'Setting a zero as html' ); var $div2 = jQuery('
'), insert = "<div>hello1</div>"; - equals( $div2.html(insert).html(), insert, "Verify escaped insertion." ); - equals( $div2.html("x" + insert).html(), "x" + insert, "Verify escaped insertion." ); - equals( $div2.html(" " + insert).html(), " " + insert, "Verify escaped insertion." ); + equals( $div2.html(insert).html().replace(/>/g, ">"), insert, "Verify escaped insertion." ); + equals( $div2.html("x" + insert).html().replace(/>/g, ">"), "x" + insert, "Verify escaped insertion." ); + equals( $div2.html(" " + insert).html().replace(/>/g, ">"), " " + insert, "Verify escaped insertion." ); var map = jQuery("").html(valueObj("jQuery")); @@ -908,17 +903,17 @@ test("html(Function) with incoming value", function() { equals( $div2.html(function(i, val) { equals( val, "", "Make sure the incoming value is correct." ); return insert; - }).html(), insert, "Verify escaped insertion." ); + }).html().replace(/>/g, ">"), insert, "Verify escaped insertion." ); equals( $div2.html(function(i, val) { - equals( val, insert, "Make sure the incoming value is correct." ); + equals( val.replace(/>/g, ">"), insert, "Make sure the incoming value is correct." ); return "x" + insert; - }).html(), "x" + insert, "Verify escaped insertion." ); + }).html().replace(/>/g, ">"), "x" + insert, "Verify escaped insertion." ); equals( $div2.html(function(i, val) { - equals( val, "x" + insert, "Make sure the incoming value is correct." ); + equals( val.replace(/>/g, ">"), "x" + insert, "Make sure the incoming value is correct." ); return " " + insert; - }).html(), " " + insert, "Verify escaped insertion." ); + }).html().replace(/>/g, ">"), " " + insert, "Verify escaped insertion." ); }); var testRemove = function(method) {