Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / html / adjacent-html-context-element.html
blob35843452f859acf801acdafbc02362eef4cf8b91
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>This tests inserting a td element "beforeBegin" of another td element using insertAdjacentHTML.
5 If the context element was not properly adjusted, then td will be stripped by the parser.</p>
6 <table><tr><td></td></tr></table>
7 <script>
9 if (window.testRunner)
10 testRunner.dumpAsText();
12 var td = document.querySelector('td');
13 td.insertAdjacentHTML('beforeBegin', '<td></td>');
15 document.write(document.getElementsByTagName('td').length == 2 ? 'PASS' : 'FAIL');
17 </script>
18 </body>
19 </html>