0655c2129b262c07c04e6084ee62fab9397e5990
[WebKit-https.git] / LayoutTests / editing / mac / spelling / accept-candidate-replacing-multiple-words.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('g');
11     typeCharacterCommand('o');
12     typeCharacterCommand('o');
13     typeCharacterCommand(' ');
14     typeCharacterCommand('d');
15     typeCharacterCommand('i');
16     typeCharacterCommand('d');
17     typeCharacterCommand('e');
18     typeCharacterCommand('a');
19     
20     if (window.internals)
21         internals.handleAcceptedCandidate("good idea", 0, 9);
22
23     if (window.testRunner)
24         testRunner.dumpAsText(true);
25 }
26
27 </script>
28 </head>
29 <body>
30 <p>This test verifies that accepted candidates replace the entire range of the candidate source.</p>
31 <div style="border:1px solid black;">
32     <div contenteditable="true" id="edit"></div>
33 </div>
34 <script>
35 runEditingTest();
36 </script>
37 <script src="../../../resources/js-test-post.js"></script>
38 </body>
39 </html>