summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html')
-rw-r--r--Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html59
1 files changed, 59 insertions, 0 deletions
diff --git a/Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html b/Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html
new file mode 100644
index 0000000..9637195
--- /dev/null
+++ b/Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html
@@ -0,0 +1,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>