summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html
blob: 9637195ffb076017f56fc6b4d1b63ab5e57a77f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<html>
<head>

<style>
.editing {
    border: 2px solid red;
    padding: 12px;
    font-size: 24px;
}
</style>
<script src=../../../LayoutTests/editing/editing.js language="JavaScript" type="text/JavaScript" ></script>

<script>
 if (window.layoutTestController)
        layoutTestController.waitUntilDone();

function keepTyping() {
    typeCharacterCommand('i');
    typeCharacterCommand('n');
    typeCharacterCommand('g');
    typeCharacterCommand(' ');
    if (window.layoutTestController)
            layoutTestController.notifyDone();
}

function editingTest() {
    typeCharacterCommand('t');
    typeCharacterCommand('h');
    typeCharacterCommand('e');
    typeCharacterCommand(' ');
    typeCharacterCommand('c');
    typeCharacterCommand('o');
    typeCharacterCommand('l');
    typeCharacterCommand('l');
    typeCharacterCommand('a');
    typeCharacterCommand('p');
    typeCharacterCommand('s');
    setTimeout("keepTyping()", 1000);
}

</script>

<title>Autocorrection Cancellation By Typing Test</title>
</head>
<body>
<div>This test verifies that autocorrection behaves correctly when continuing typing in a word on 
which autocorrection panel is hown. You should see correction panel showing 'collapse' after 'collaps' is entered. And after a pause, phrase 'the collapsing' is shown without underline.</div>
<p  style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'collapse' as the correct spelling of 'collaps' several times, the spell checker will not provide 'collapse' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.</p>
<div contenteditable id="root" class="editing">
<span id="test"></span>
</div>


<script>
runEditingTest();
</script>

</body>
</html>