Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / smart-paste-007.html
blob8b7de9d52a901e67ab4e4979dcf889d067843aab
1 <html>
2 <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 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
21 <script>
23 function editingTest() {
24 var target = document.getElementById('test');
25 var x = target.offsetLeft;
26 var y = target.offsetTop + target.offsetHeight / 2;
27 doubleClick(x, y);
28 cutCommand();
29 typeCharacterCommand('.');
30 typeCharacterCommand('.');
31 moveSelectionBackwardByCharacterCommand();
32 pasteCommand();
35 </script>
37 <title>Editing Test</title>
38 </head>
39 <body>
41 <div class="explanation">
42 <div class="scenario">
43 Tests:
44 <br>
45 Smart paste when pasting between two periods.
46 </div>
47 <div class="expected-results">
48 Expected Results:
49 <br>
50 A space should be added before, but not after the pasted word. It should look like this:
51 <BR>
52 . test.
53 </div>
54 </div>
56 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
57 <div id="test" class="editing">
58 test
59 </div>
60 </div>
62 <script>
63 runEditingTest();
64 </script>
66 </body>
67 </html>