Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / inserting / insert-newline-into-dynamically-created-textarea.html
blob61bb4f9ea1dd7b0dc90e6a1af7487cfa9185b765
1 <div id="container">
2 <p id="description"></p>
3 </div>
4 <div id="console"></div>
5 <script src="../../resources/js-test.js"></script>
6 <script>
7 description('Insert newline into dynamically created textarea');
8 function $(id) { return document.getElementById(id); }
9 function visibleNewline(s) { return s.replace(/\n/g, '/'); }
11 var sampleText = 'hello\n\nworld';
12 var textarea = document.createElement('textarea');
13 textarea.rows = 5;
14 textarea.value = '\n';
15 $('container').appendChild(textarea);
16 textarea.select();
17 textarea.focus();
18 document.execCommand('Delete', false);
19 document.execCommand('InsertHtml', false, sampleText);
20 shouldBeEqualToString('visibleNewline(textarea.value)', visibleNewline(sampleText));
22 if (window.testRunner)
23 $('container').outerHTML = '';
24 </script>