4 <p>This tests pasting into a textarea that starts with a line break that didn't initially have a renderer (display: none).
5 WebKit should still be able to paste text with line breaks.
</p>
6 <textarea id=
"test" style=
"display: none" cols=
"50" rows=
"10"></textarea>
8 <script type=
"text/javascript">
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 var textarea
= document
.querySelector('textarea');
14 textarea
.value
= "\nwebkit";
15 textarea
.style
.display
= "";
18 textarea
.selectionStart
= textarea
.selectionEnd
= 0;
19 document
.execCommand('insertHTML', false, 'hello\nworld\n');
21 var expected
= 'hello\nworld\nwebkit';
22 if (textarea
.value
== expected
)
23 document
.getElementById('log').innerText
= 'PASS';
25 document
.getElementById('log').innerText
= 'FAILED: expected "' + expected
+ '" but got "' + textarea
.value
+ '"';