cblu | 8c27a4d | 2005-03-01 21:15:05 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | |
| 4 | <style> |
| 5 | .editing { |
| 6 | border: 2px solid red; |
| 7 | font-size: 24px; |
| 8 | } |
| 9 | .explanation { |
| 10 | border: 2px solid blue; |
| 11 | padding: 12px; |
| 12 | font-size: 24px; |
| 13 | margin-bottom: 24px; |
| 14 | } |
| 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> |
megan_gardner@apple.com | f597bed | 2019-02-01 23:27:30 +0000 | [diff] [blame] | 19 | <script src="../editing.js"></script> |
| 20 | <script src="../../resources/ui-helper.js"></script> |
cblu | 8c27a4d | 2005-03-01 21:15:05 +0000 | [diff] [blame] | 21 | <script> |
| 22 | |
megan_gardner@apple.com | f597bed | 2019-02-01 23:27:30 +0000 | [diff] [blame] | 23 | async function editingTest() { |
| 24 | await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test')); |
cblu | 8c27a4d | 2005-03-01 21:15:05 +0000 | [diff] [blame] | 25 | cutCommand(); |
| 26 | typeCharacterCommand('.'); |
| 27 | typeCharacterCommand('.'); |
| 28 | moveSelectionBackwardByCharacterCommand(); |
| 29 | pasteCommand(); |
| 30 | } |
| 31 | |
| 32 | </script> |
| 33 | |
| 34 | <title>Editing Test</title> |
| 35 | </head> |
| 36 | <body> |
| 37 | |
| 38 | <div class="explanation"> |
| 39 | <div class="scenario"> |
| 40 | Tests: |
| 41 | <br> |
| 42 | Smart paste when pasting between two periods. |
| 43 | </div> |
| 44 | <div class="expected-results"> |
| 45 | Expected Results: |
| 46 | <br> |
| 47 | A space should be added before, but not after the pasted word. It should look like this: |
| 48 | <BR> |
| 49 | . test. |
| 50 | </div> |
| 51 | </div> |
| 52 | |
| 53 | <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;"> |
| 54 | <div id="test" class="editing"> |
| 55 | test |
| 56 | </div> |
| 57 | </div> |
| 58 | |
| 59 | <script> |
megan_gardner@apple.com | 07573fa | 2019-02-06 05:52:01 +0000 | [diff] [blame] | 60 | runDumpAsTextEditingTest(true); |
cblu | 8c27a4d | 2005-03-01 21:15:05 +0000 | [diff] [blame] | 61 | </script> |
| 62 | |
| 63 | </body> |
| 64 | </html> |