Reviewed by John
[WebKit-https.git] / LayoutTests / editing / inserting / insert-text-with-newlines.html
1
2 <html> 
3 <head>
4
5 <style>
6 .editing { 
7     border: 2px solid red; 
8     padding: 12px; 
9     font-size: 24px; 
10 }
11 </style>
12 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
13
14 <script>
15
16 function moveNSpacesAndType(n) {
17     for (i = 0; i < n; i++) {
18         moveSelectionForwardByCharacterCommand();
19     }
20     for (i = 0; i < 3; i++) {
21         typeCharacterCommand();
22     }
23 }
24
25 function editingTest() {
26     moveNSpacesAndType(4);
27     insertLineBreakCommand();
28     moveNSpacesAndType(4);
29     insertLineBreakCommand();
30     insertLineBreakCommand();
31     moveNSpacesAndType(4);
32 }
33
34 </script>
35
36 <title>Editing Test</title> 
37 </head> 
38 <body>
39 <div contenteditable id="root" class="editing">
40 <span id="test">Foo    <i>  bar</i>
41
42 baz</span>
43 </div>
44
45 <script>
46 runEditingTest();
47 </script>
48
49 </body>
50 </html>