Candidates that don't end in spaces shouldn't have spaces arbitrarily appended to...
[WebKit-https.git] / LayoutTests / editing / mac / spelling / accept-candidate-without-crossing-editing-boundary.html
1 <html>
2 <head>
3 <script src=../../editing.js></script>
4 <script src="../../../resources/js-test-pre.js"></script>
5 <script>
6
7 function editingTest() {
8     edit = document.getElementById('edit');
9     edit.focus();
10     typeCharacterCommand('h');
11     typeCharacterCommand('a');
12     if (window.internals)
13         internals.handleAcceptedCandidate("happy ", 0, 2);
14
15     if (window.testRunner)
16         testRunner.dumpAsText(true);
17 }
18
19 </script>
20 </head>
21 <body>
22 <p>This test verifies that accepted candidates replace the text before the caret.</p>
23 <div style="border:1px solid black;">
24     <div contenteditable="true" id="edit"></div>
25 </div>
26
27 <div style="visibility:hidden;">
28     <br>
29 </div>
30
31 <div style="width: 1px; height: 1px;"></div>
32
33 <script>
34 runEditingTest();
35 </script>
36 <script src="../../../resources/js-test-post.js"></script>
37 </body>
38 </html>