<!DOCTYPEHTML>
<html> <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=744830
-->
<head>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=166235">Mozilla Bug 166235</a>
<div id="testnodes"><span>hi</span> there <!-- mon ami --></div>
<pre id="test">
<script type="application/javascript"> var t = document.getElementById('testnodes');
is(t.innerHTML, "hi there ", "comment nodes should be included");
var PI = document.createProcessingInstruction('foo', 'bar="1.0"');
t.appendChild(PI);
is(t.innerHTML, 'hi there ', "pi nodes should be included");
t.innerHTML = null;
t.appendChild(document.createElement("textarea"));
t.firstChild.appendChild(document.createTextNode("\nhello"));
// This is the old behavior. Spec requires something else.
is(t.innerHTML, "", "No extra newlines should be inserted to the textarea!");