Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / smart-paste-002.html
blobbc3cd7b71e68b2b1de15d1f474518c26c3c2fac4
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 .editing {
6 border: 2px solid red;
7 font-size: 24px;
9 .explanation {
10 border: 2px solid blue;
11 padding: 12px;
12 font-size: 24px;
13 margin-bottom: 24px;
15 .scenario { margin-bottom: 16px;}
16 .scenario:first-line { font-weight: bold; margin-bottom: 16px;}
17 .expected-results:first-line { font-weight: bold }
18 </style>
19 </head>
20 <body>
21 <div class="explanation">
22 <div class="scenario">
23 Tests:
24 <br>
25 Smart paste when pasting at the beginning of a line before a word.
26 </div>
27 <div class="expected-results">
28 Expected Results:
29 <br>
30 A space should be added after the pasted word before the preexising word. It should like this:
31 <BR>
32 test test
33 </div>
34 </div>
36 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
37 <div id="test" class="editing">
38 test
39 </div>
40 </div>
41 <script src="../editing.js"></script>
42 <script>
44 function editingTest() {
45 var target = document.getElementById('test');
46 var x = target.offsetLeft + target.offsetWidth / 2;
47 var y = target.offsetTop + target.offsetHeight / 2;
48 doubleClick(x, y);
49 copyCommand();
50 moveSelectionBackwardByWordCommand();
51 pasteCommand();
54 runDumpAsTextEditingTest(true);
55 </script>
56 </body>
57 </html>