Reviewed by John
[WebKit-https.git] / LayoutTests / editing / pasteboard / paste-text-010.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 // There was a bug when pasting at the end of the block. The content was inserted at the 
17 // start of the block instead of the end. This tests the insert-at-end case.
18
19 function editingTest() {
20     for (i = 0; i < 31; i++)
21         moveSelectionForwardByCharacterCommand();
22     for (i = 0; i < 7; i++)
23         extendSelectionForwardByCharacterCommand();
24     copyCommand();
25     moveSelectionForwardByCharacterCommand();
26     insertLineBreakCommand();
27     insertLineBreakCommand();
28     pasteCommand();
29     pasteCommand();
30 }
31
32 </script>
33
34 <title>Editing Test</title> 
35 </head> 
36 <body contenteditable id="root">
37
38 <div class="editing" id="test">There is a tide in the affairs of men.</div>
39  
40 <script>
41 runEditingTest();
42 </script>
43
44 </body>
45 </html>