blob: 12155ca5692c806945d3e8ca2c892f3fdb88d191 [file] [log] [blame]
cblu8c27a4d2005-03-01 21:15:05 +00001<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.comf597bed2019-02-01 23:27:30 +000019<script src="../editing.js"></script>
20<script src="../../resources/ui-helper.js"></script>
cblu8c27a4d2005-03-01 21:15:05 +000021<script>
22
megan_gardner@apple.comf597bed2019-02-01 23:27:30 +000023async function editingTest() {
24 await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test'));
cblu8c27a4d2005-03-01 21:15:05 +000025 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">
40Tests:
41<br>
42Smart paste when pasting between two periods.
43</div>
44<div class="expected-results">
45Expected Results:
46<br>
47A 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">
55test
56</div>
57</div>
58
59<script>
megan_gardner@apple.com07573fa2019-02-06 05:52:01 +000060runDumpAsTextEditingTest(true);
cblu8c27a4d2005-03-01 21:15:05 +000061</script>
62
63</body>
64</html>