servo/tests/content/test_textcontent.html

16 lines
342 B
HTML

<html>
<head>
<script src="harness.js"></script>
</head>
<body>
<div>this is
text content</div>
<script>
var div = document.getElementsByTagName('div')[0];
is(div.textContent, "this is\n text content");
var newContent = "new text con\ntent";
div.textContent = newContent;
is(div.textContent, newContent);
</script>
</body>
</html>