blob: 2e176d9e7acb1d6444bd54270440c37aba65adbb [file] [log] [blame]
description("Test wholeText and replaceWholeText")
var para = document.createElement('p');
para.appendChild(document.createTextNode('A'));
var textB = document.createTextNode('B');
para.appendChild(textB);
para.appendChild(document.createElement('p'));
para.appendChild(document.createTextNode('C'));
shouldBe("textB.wholeText", "'AB'");
shouldBe("para.textContent", "'ABC'");
textB.replaceWholeText("XYZ");
shouldBe("textB.wholeText", "'XYZ'");
shouldBe("para.textContent", "'XYZC'");