summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests/autocorrection
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-06 11:45:16 +0100
committerSteve Block <steveblock@google.com>2011-05-12 13:44:10 +0100
commitcad810f21b803229eb11403f9209855525a25d57 (patch)
tree29a6fd0279be608e0fe9ffe9841f722f0f4e4269 /Source/WebCore/manual-tests/autocorrection
parent121b0cf4517156d0ac5111caf9830c51b69bae8f (diff)
downloadexternal_webkit-cad810f21b803229eb11403f9209855525a25d57.zip
external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.gz
external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.bz2
Merge WebKit at r75315: Initial merge by git.
Change-Id: I570314b346ce101c935ed22a626b48c2af266b84
Diffstat (limited to 'Source/WebCore/manual-tests/autocorrection')
-rw-r--r--Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-ESC.html50
-rw-r--r--Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html59
-rw-r--r--Source/WebCore/manual-tests/autocorrection/autocorrection-contraction.html52
-rw-r--r--Source/WebCore/manual-tests/autocorrection/continue-typing-to-dismiss-reversion.html49
-rw-r--r--Source/WebCore/manual-tests/autocorrection/delete-to-dismiss-reversion.html49
-rw-r--r--Source/WebCore/manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html49
-rw-r--r--Source/WebCore/manual-tests/autocorrection/dismiss-multiple-guesses.html49
-rw-r--r--Source/WebCore/manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html49
-rw-r--r--Source/WebCore/manual-tests/autocorrection/select-from-multiple-guesses.html49
-rw-r--r--Source/WebCore/manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html50
10 files changed, 505 insertions, 0 deletions
diff --git a/Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-ESC.html b/Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-ESC.html
new file mode 100644
index 0000000..185e5c6
--- /dev/null
+++ b/Source/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-ESC.html
@@ -0,0 +1,50 @@
+<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('c');
+ typeCharacterCommand('o');
+ typeCharacterCommand('l');
+ typeCharacterCommand('l');
+ typeCharacterCommand('a');
+ typeCharacterCommand('p');
+ typeCharacterCommand('s');
+}
+
+</script>
+
+<title>Autocorrection Cancellation By ESC Test</title>
+</head>
+<body>
+<div><p>This test verifies that autocorrection is not applied when user dismisses correction panel by pressing
+ESC key.</p>
+<p>After seeing the correction panel, press ESC key, then press space. You should see the phrase "the collaps"
+where "collaps" has red mispell underline. </p>
+<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>
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>
diff --git a/Source/WebCore/manual-tests/autocorrection/autocorrection-contraction.html b/Source/WebCore/manual-tests/autocorrection/autocorrection-contraction.html
new file mode 100644
index 0000000..ef5bb68
--- /dev/null
+++ b/Source/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/Source/WebCore/manual-tests/autocorrection/continue-typing-to-dismiss-reversion.html b/Source/WebCore/manual-tests/autocorrection/continue-typing-to-dismiss-reversion.html
new file mode 100644
index 0000000..b8521c0
--- /dev/null
+++ b/Source/WebCore/manual-tests/autocorrection/continue-typing-to-dismiss-reversion.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('g');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ execMoveSelectionBackwardByCharacterCommand();
+}
+
+</script>
+
+<title>Continue Typing to Dismiss Reversion Panel Test</title>
+</head>
+<body>
+<div><p>This test verifies that, after reversion panel is shown, continue typing will dismiss the reversion panel.</p>
+<p>After seeing the reversion panel, start typing (excluding whitespace). You should see the panel being
+dismissed once you start typing.</p>
+<p style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously
+frequently revert 'message' to 'mesage'. 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/Source/WebCore/manual-tests/autocorrection/delete-to-dismiss-reversion.html b/Source/WebCore/manual-tests/autocorrection/delete-to-dismiss-reversion.html
new file mode 100644
index 0000000..c39b2ac
--- /dev/null
+++ b/Source/WebCore/manual-tests/autocorrection/delete-to-dismiss-reversion.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('g');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ execMoveSelectionBackwardByCharacterCommand();
+}
+
+</script>
+
+<title>Delete to Dismiss Reversion Panel Test</title>
+</head>
+<body>
+<div><p>This test verifies that, after reversion panel is shown, continue deleting the word will dismiss the reversion panel.</p>
+<p>After seeing the reversion panel, start deleting the corrected word character by character. You should see the panel being
+dismissed once you start deleting.</p>
+<p style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously
+frequently revert 'message' to 'mesage'. 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/Source/WebCore/manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html b/Source/WebCore/manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html
new file mode 100644
index 0000000..320ed8c
--- /dev/null
+++ b/Source/WebCore/manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.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('g');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ execDeleteCommand();
+}
+
+</script>
+
+<title>Delete to End of Word to Show Reversion Panel Test</title>
+</head>
+<body>
+<div><p>This test verifies that reversion panel is shown when user moves carret to previously corrected word using delete key.</p>
+<p>After seeing the reversion panel, press ESC key, then space key. You should see the phrase "the mesage"
+where "mesage" has red mispell underline. </p>
+<p style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously
+frequently revert 'message' to 'mesage'. 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/Source/WebCore/manual-tests/autocorrection/dismiss-multiple-guesses.html b/Source/WebCore/manual-tests/autocorrection/dismiss-multiple-guesses.html
new file mode 100644
index 0000000..56724f1
--- /dev/null
+++ b/Source/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/Source/WebCore/manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html b/Source/WebCore/manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html
new file mode 100644
index 0000000..8ca2a6b
--- /dev/null
+++ b/Source/WebCore/manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.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('g');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ execMoveSelectionBackwardByCharacterCommand();
+}
+
+</script>
+
+<title>Move to End of Word to Show Reversion Panel Test</title>
+</head>
+<body>
+<div><p>This test verifies that reversion panel is shown when user moves carret to previously corrected word</p>
+<p>After seeing the reversion panel, press ESC key, then space key. You should see the phrase "the mesage"
+where "mesage" has red mispell underline. </p>
+<p style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously
+frequently revert 'message' to 'mesage'. 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/Source/WebCore/manual-tests/autocorrection/select-from-multiple-guesses.html b/Source/WebCore/manual-tests/autocorrection/select-from-multiple-guesses.html
new file mode 100644
index 0000000..dc8881f
--- /dev/null
+++ b/Source/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>
diff --git a/Source/WebCore/manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html b/Source/WebCore/manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html
new file mode 100644
index 0000000..eeea0f7
--- /dev/null
+++ b/Source/WebCore/manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html
@@ -0,0 +1,50 @@
+<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('g');
+ typeCharacterCommand('e');
+ typeCharacterCommand(' ');
+ execMoveSelectionBackwardByCharacterCommand();
+}
+
+</script>
+
+<title>Type Whitespace to Dismiss Reversion Panel Test</title>
+</head>
+<body>
+<div><p>This test verifies that, after reversion panel is shown, typing whitespace will dismiss the reversion panel.
+It also keep the existing autocorrection underline.</p>
+<p>After seeing the reversion panel, type whitespace. You should see the panel being dismissed once you start typing.
+However, the word "message" still has blue underline.</p>
+<p style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously
+frequently revert 'message' to 'mesage'. 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>