summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/html/adjacent-html-context-element.html
blob: 35843452f859acf801acdafbc02362eef4cf8b91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html>
<body>
<p>This tests inserting a td element "beforeBegin" of another td element using insertAdjacentHTML.
If the context element was not properly adjusted, then td will be stripped by the parser.</p>
<table><tr><td></td></tr></table>
<script>

if (window.testRunner)
    testRunner.dumpAsText();

var td = document.querySelector('td');
td.insertAdjacentHTML('beforeBegin', '<td></td>');

document.write(document.getElementsByTagName('td').length == 2 ? 'PASS' : 'FAIL');

</script>
</body>
</html>