summaryrefslogtreecommitdiffstats
path: root/WebCore/manual-tests/autocorrection
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/manual-tests/autocorrection')
-rw-r--r--WebCore/manual-tests/autocorrection/autocorrection-contraction.html52
-rw-r--r--WebCore/manual-tests/autocorrection/dismiss-multiple-guesses.html49
-rw-r--r--WebCore/manual-tests/autocorrection/select-from-multiple-guesses.html49
3 files changed, 150 insertions, 0 deletions
diff --git a/WebCore/manual-tests/autocorrection/autocorrection-contraction.html b/WebCore/manual-tests/autocorrection/autocorrection-contraction.html
new file mode 100644
index 0000000..ef5bb68
--- /dev/null
+++ b/WebCore/manual-tests/autocorrection/autocorrection-contraction.html
@@ -0,0 +1,52 @@
+<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>
+function keepTyping() {
+ typeCharacterCommand('\'');
+ typeCharacterCommand('t');
+ typeCharacterCommand(' ');
+}
+
+function editingTest() {
+ typeCharacterCommand('t');
+ typeCharacterCommand('h');
+ typeCharacterCommand('i');
+ typeCharacterCommand('s');
+ typeCharacterCommand(' ');
+ typeCharacterCommand('w');
+ typeCharacterCommand('o');
+ typeCharacterCommand('u');
+ typeCharacterCommand('l');
+ typeCharacterCommand('d');
+ typeCharacterCommand('n');
+ setTimeout("keepTyping()", 1000);
+}
+
+</script>
+
+<title>Delete to Dismiss Reversion Panel Test</title>
+</head>
+<body>
+<div><p>This test verifies that, after typing an apostrophe, if the current word is part of a contraction, previously shown autocorrection will not be applied.</p>
+<p>After loading the page, you should see correction panel shows "would" for "wouldn". Then after typing "'t", the correction panel dissappears and the final sentence is "this wouldn't".</p>
+<div contenteditable id="root" class="editing">
+<span id="test"></span>
+</div>
+
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/WebCore/manual-tests/autocorrection/dismiss-multiple-guesses.html b/WebCore/manual-tests/autocorrection/dismiss-multiple-guesses.html
new file mode 100644
index 0000000..56724f1
--- /dev/null
+++ b/WebCore/manual-tests/autocorrection/dismiss-multiple-guesses.html
@@ -0,0 +1,49 @@
+<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>
+function editingTest() {
+ typeCharacterCommand('t');
+ typeCharacterCommand('h');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ typeCharacterCommand('m');
+ typeCharacterCommand('e');
+ typeCharacterCommand('s');
+ typeCharacterCommand('a');
+ typeCharacterCommand('e');
+ typeCharacterCommand('g');
+ typeCharacterCommand('e');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ execMoveSelectionBackwardByCharacterCommand();
+}
+
+</script>
+
+<title>Dismiss Multiple Guesses Test</title>
+</head>
+<body>
+<div><p>This test verifies that pressing ESC key diusmisses multiple guesses panel correctly</p>
+<p>After seeing the panel with multiple candidates, pressing ESC key to dismiss the panel.</p>
+<p style="color:green">Note, this test can fail due to user specific spell checking data. To fix this, remove all files in ~/Library/Spelling, then kill AppleSpell.service process.</p>
+<div contenteditable id="root" class="editing">
+<span id="test"></span>
+</div>
+
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/WebCore/manual-tests/autocorrection/select-from-multiple-guesses.html b/WebCore/manual-tests/autocorrection/select-from-multiple-guesses.html
new file mode 100644
index 0000000..dc8881f
--- /dev/null
+++ b/WebCore/manual-tests/autocorrection/select-from-multiple-guesses.html
@@ -0,0 +1,49 @@
+<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>
+function editingTest() {
+ typeCharacterCommand('t');
+ typeCharacterCommand('h');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ typeCharacterCommand('m');
+ typeCharacterCommand('e');
+ typeCharacterCommand('s');
+ typeCharacterCommand('a');
+ typeCharacterCommand('e');
+ typeCharacterCommand('g');
+ typeCharacterCommand('e');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ execMoveSelectionBackwardByCharacterCommand();
+}
+
+</script>
+
+<title>Select From Multiple Guesses Test</title>
+</head>
+<body>
+<div><p>This test verifies that multiple guesses on mispelled word is working correctly</p>
+<p>After seeing the panel with multiple candidates, use left and/or right arrow key to select the desired candidate, and then use return key to confirm. You can also use this test to test that pressing ESC key will dismiss the panel.</p>
+<p style="color:green">Note, this test can fail due to user specific spell checking data. To fix this, remove all files in ~/Library/Spelling, then kill AppleSpell.service process.</p>
+<div contenteditable id="root" class="editing">
+<span id="test"></span>
+</div>
+
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>