4 <!-- It is a minimized testcase of fuzz test. See crbug.com/343037 -->
7 testRunner
.dumpAsText();
9 window
.onload = function() {
10 var selection
= window
.getSelection();
11 document
.execCommand('SelectAll');
12 selection
.collapseToEnd();
14 // Shuffling and htmlElement.innerHTML = '' cause that nested table element does not have renderer in the selection.
15 var range
= selection
.getRangeAt(0);
16 range
.insertNode(document
.getElementById('nested_table'));
17 range
.surroundContents(document
.getElementById('caption'));
18 document
.getElementById('table').insertAdjacentHTML('beforebegin', '<div id="target"></div>');
19 range
.surroundContents(document
.getElementById('target'));
20 selection
.extend(document
.getElementById('target'), 0);
22 var htmlElement
= document
.getElementById('html');
23 htmlElement
.innerHTML
= '';
24 htmlElement
.parentNode
.replaceChild(document
.createElement('div'), htmlElement
);
25 document
.getElementsByTagName('div')[0].innerText
= 'This test passes if it does not crash.';
31 <caption id='caption'
>
32 <table id='nested_table'
></table>