diff options
author | timmywil <timmywillisn@gmail.com> | 2012-03-30 17:09:46 -0400 |
---|---|---|
committer | timmywil <timmywillisn@gmail.com> | 2012-03-30 17:10:25 -0400 |
commit | a29d482894a844724f4386f2fed0edf9cf70c069 (patch) | |
tree | 7f296fbd5f5b2a2419cb75344311d85a92605c65 /test | |
parent | c68f4fe548fee5c8bb7cdc7ca2a2315d0433b6f8 (diff) | |
download | jquery-a29d482894a844724f4386f2fed0edf9cf70c069.tar.gz jquery-a29d482894a844724f4386f2fed0edf9cf70c069.zip |
Update Sizzle and add test for sizzle getText fix. Removes usage of innerText. Fixes #11153.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/manipulation.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 18e1b8d67..ff31c4db4 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -7,7 +7,7 @@ var bareObj = function(value) { return value; }; var functionReturningObj = function(value) { return (function() { return value; }); }; test("text()", function() { - expect(4); + expect(5); var expected = "This link has class=\"blog\": Simon Willison's Weblog"; equal( jQuery("#sap").text(), expected, "Check for merged text of more then one element." ); @@ -20,6 +20,10 @@ test("text()", function() { frag.appendChild( document.createTextNode("foo") ); equal( jQuery( frag ).text(), "foo", "Document Fragment Text node was retreived from .text()."); + + var $newLineTest = jQuery("<div>test<br/>testy</div>").appendTo("#moretests"); + $newLineTest.find("br").replaceWith("\n"); + equal( $newLineTest.text(), "test\ntesty", "text() does not remove new lines (#11153)" ); }); test("text(undefined)", function() { |