duplicate-html-element-crash.html revision eff69b907ef2cd3a9af0351287a929c66f58e3f6
1<body onload="runTest()">
2<script>
3function runTest() {
4    if (window.layoutTestController)
5        layoutTestController.dumpAsText();
6        
7    var div = document.createElement('div');
8    div.appendChild(document.body.parentElement);
9    var a = document.createElement('a');
10    a.innerHTML = '<x><html></html>'; 
11    
12    document.appendChild(document.createElement('html'))
13    document.documentElement.innerHTML='<div>This tests that we won\'t crash when creating a new html element when the document does not ' +
14        'have a document element.</div><div>SUCCESS - Did not crash!</div>'
15}
16</script>
17</body>
18