summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/xhtml-fragment-whitespace.xhtml
blob: 5c0850e4367d0d0f542b362b6866aa8a2431f8f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<html xmlns="http://www.w3.org/1999/xhtml">
<script>
function test() {
  if (window.testRunner)
    testRunner.dumpAsText();

  var target = document.getElementById('target');

  target.innerHTML += "\t&lt;p>&lt;/p>";
  if (target.firstChild.nodeName == "#text")
    target.innerHTML = "SUCCESS";
  else
    target.innerHTML = "FAIL. Incorrect node type for whitespace: " + target.firstChild.nodeName + ".";
}
</script>
<body onload="test();">
    <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=16731">bug 16731</a>:
    Incorrect node type for whitespace when setting innerHTML in an XHTML document.</p>
    <div id="target"></div>
</body>
</html>