Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / pasteboard / paste-text-010.html
1 <html> 
2 <head>
3 <style>
4 .editing { 
5     border: 2px solid red; 
6     padding: 12px; 
7     font-size: 24px; 
8 }
9 </style>
10 <script src="../editing.js"></script>
11 <script src="../../resources/dump-as-markup.js"></script>
12 <title>Editing Test</title> 
13 </head> 
14 <body contenteditable id="root">
15 <div class="editing" id="test">There is a tide in the affairs of men.</div>
16 <script>
17
18 window.getSelection().collapse(document.getElementById('test'), 0);
19
20 for (i = 0; i < 31; i++)
21     moveSelectionForwardByCharacterCommand();
22 for (i = 0; i < 7; i++)
23     extendSelectionForwardByCharacterCommand();
24
25 copyCommand();
26 moveSelectionForwardByCharacterCommand();
27 insertLineBreakCommand();
28 insertLineBreakCommand();
29 pasteCommand();
30 pasteCommand();
31
32 Markup.description('There was a bug when pasting at the end of the block. The content was inserted at the start\n'
33  + 'the block instead of the end. This tests the insert-at-end case.');
34 var script = document.getElementsByTagName('script')[2];
35 script.parentNode.removeChild(script);
36 Markup.dump('root');
37
38 </script>
39 </body>
40 </html>