WebCore:
[WebKit-https.git] / LayoutTests / fast / dom / HTMLElement / innerHTML-selection-crash.html
1 <p>This tests that calling innerHTML doesn't crash when the selection endpoint is inside a text field's shadow DOM tree.</p>
2
3 <p>If the test doesn't crash, then it passes.</p>
4
5 <input id="field" type="text" value="some text">
6 <script>
7
8 if (window.layoutTestController)
9     layoutTestController.dumpAsText();
10
11 document.getElementById('field').setAttribute('style', 'display: inline');
12 document.getElementById('field').focus();
13 document.body.offsetLeft;
14 document.getElementById('field').setAttribute('style', 'display: block');
15 document.body.innerHTML;
16 document.getElementById('field').setAttribute('style', 'display: none');
17
18 document.write("<p>PASS: There was no crash.</p>");
19
20 </script>