3 <style type="text/css">
9 testRunner.dumpAsText();
11 // The bug only reproduces when textarea is the last element in body
12 // So we have no choice but to run the test on page load.
14 var input = document.body.getElementsByTagName('textarea')[0];
16 input.selectionStart = 5;
17 input.selectionEnd = 5;
18 document.execCommand('InsertHTML', false, '<div> world</div>');
19 var result = input.value == 'hello world' ? 'PASS' : 'FAIL';
20 input.parentNode.insertBefore(document.createTextNode(result), input);
21 if (window.testRunner)
22 input.parentNode.removeChild(input);
27 <body onload="runTest()">
28 <p>This test ensures WebKit can paste content inside an textarea element even when there is div:last-child {}.</p>
29 <textarea>hello</textarea>