Title: [168352] trunk/LayoutTests
Revision
168352
Author
[email protected]
Date
2014-05-05 23:54:23 -0700 (Mon, 05 May 2014)

Log Message

Share mac/editing/spelling/delete-into-misspelled-word.html with other platforms
https://bugs.webkit.org/show_bug.cgi?id=132561

Reviewed by Darin Adler.

This test does not use Mac specific features and
can be run by other platforms as well.

Due to bug 125689, this test starts using asynchronous spellchecking.

* editing/spelling/delete-into-misspelled-word-expected.txt:
Renamed from LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word-expected.txt
* editing/spelling/delete-into-misspelled-word.html:
Renamed from LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word.html

* platform/gtk/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:
Mark delete-into-misspelled-word.html as failing since those
platforms didn't turn on asynchronous spellchecking.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (168351 => 168352)


--- trunk/LayoutTests/ChangeLog	2014-05-06 06:19:50 UTC (rev 168351)
+++ trunk/LayoutTests/ChangeLog	2014-05-06 06:54:23 UTC (rev 168352)
@@ -1,3 +1,26 @@
+2014-05-05  Grzegorz Czajkowski  <[email protected]>
+
+        Share mac/editing/spelling/delete-into-misspelled-word.html with other platforms
+        https://bugs.webkit.org/show_bug.cgi?id=132561
+
+        Reviewed by Darin Adler.
+
+        This test does not use Mac specific features and
+        can be run by other platforms as well.
+
+        Due to bug 125689, this test starts using asynchronous spellchecking.
+
+        * editing/spelling/delete-into-misspelled-word-expected.txt:
+        Renamed from LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word-expected.txt
+        * editing/spelling/delete-into-misspelled-word.html:
+        Renamed from LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word.html
+
+        * platform/gtk/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+        * platform/win/TestExpectations:
+        Mark delete-into-misspelled-word.html as failing since those
+        platforms didn't turn on asynchronous spellchecking.
+
 2014-05-05  Dirk Schulze  <[email protected]>
 
         Adapt inline SVG sizing behavior to Firefox and Blink

Added: trunk/LayoutTests/editing/spelling/delete-into-misspelled-word-expected.txt (0 => 168352)


--- trunk/LayoutTests/editing/spelling/delete-into-misspelled-word-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/spelling/delete-into-misspelled-word-expected.txt	2014-05-06 06:54:23 UTC (rev 168352)
@@ -0,0 +1,14 @@
+This test verifies if the misspelled word still remains spelling markers when user pressed the backspace key to move the caret at the end of the word or delete key to move the caret at the beginning of the word. This test succeeds when a word "meagesga" has red underline.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS internals.hasSpellingMarker(7, 8) became true
+execDeleteCommand()
+PASS internals.hasSpellingMarker(7, 8) became true
+execForwardDeleteCommand()
+PASS internals.hasSpellingMarker(7, 8) became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/editing/spelling/delete-into-misspelled-word.html (0 => 168352)


--- trunk/LayoutTests/editing/spelling/delete-into-misspelled-word.html	                        (rev 0)
+++ trunk/LayoutTests/editing/spelling/delete-into-misspelled-word.html	2014-05-06 06:54:23 UTC (rev 168352)
@@ -0,0 +1,79 @@
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<textarea id="testElement"></textarea>
+<script type="text/_javascript_">
+description('This test verifies if the misspelled word still remains spelling markers '
+    + 'when user pressed the backspace key to move the caret at the end of the word or delete key to move '
+    + 'the caret at the beginning of the word. '
+    + 'This test succeeds when a word "meagesga" has red underline.');
+
+jsTestIsAsync = true;
+
+if (window.internals) {
+    internals.settings.setUnifiedTextCheckerEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
+}
+
+document.getElementById('testElement').focus();
+typeCharacterCommand('i');
+typeCharacterCommand('t');
+typeCharacterCommand('\'');
+typeCharacterCommand('s');
+typeCharacterCommand(' ');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+typeCharacterCommand('m');
+typeCharacterCommand('e');
+typeCharacterCommand('a');
+typeCharacterCommand('g');
+typeCharacterCommand('e');
+typeCharacterCommand('s');
+typeCharacterCommand('g');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+
+function checkSpellingMarker()
+{
+    if (window.internals)
+        shouldBecomeEqual('internals.hasSpellingMarker(7, 8)', 'true', done);
+}
+
+function checkSpellingMarkerAfterDeleteCommand()
+{
+    evalAndLog('execDeleteCommand()');
+    checkSpellingMarker();
+}
+
+function checkSpellingMarkerAfterForwardDelete()
+{
+    textarea = document.getElementById('testElement');
+    textarea.setSelectionRange(6, 6);
+    typeCharacterCommand(' ');
+    evalAndLog('execForwardDeleteCommand()');
+
+    checkSpellingMarker();
+}
+
+var tests = [
+    function() { checkSpellingMarker(); },
+    function() { checkSpellingMarkerAfterDeleteCommand(); },
+    function() { checkSpellingMarkerAfterForwardDelete(); }
+];
+
+function done()
+{
+    var next = tests.shift();
+    if (next)
+        return window.setTimeout(next, 0);
+
+    finishJSTest();
+}
+done();
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (168351 => 168352)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2014-05-06 06:19:50 UTC (rev 168351)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2014-05-06 06:54:23 UTC (rev 168352)
@@ -1138,6 +1138,7 @@
 webkit.org/b/42194 http/tests/security/drag-drop-same-unique-origin.html [ Failure ]
 
 # Missing TextChecker::requestCheckingOfString() implementation for Gtk.
+webkit.org/b/73003 editing/spelling/delete-into-misspelled-word.html [ Skip ]
 webkit.org/b/73003 editing/spelling/spellcheck-async-mutation.html [ Skip ]
 webkit.org/b/73003 editing/spelling/spellcheck-async-remove-frame.html [ Skip ]
 webkit.org/b/73003 editing/spelling/spellcheck-async.html [ Skip ]

Deleted: trunk/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word-expected.txt (168351 => 168352)


--- trunk/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word-expected.txt	2014-05-06 06:19:50 UTC (rev 168351)
+++ trunk/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word-expected.txt	2014-05-06 06:54:23 UTC (rev 168352)
@@ -1,6 +0,0 @@
-The test verified that if user use delete to move caret to the end, or use forward delete to move caret to the beginning of, a word that is marked as misspelled, the misspell underline will remain. You should see phrase "it's a meagesga", in which the word 'meagesga' has red underline.
-
-
-SUCCESS
-SUCCESS
-

Deleted: trunk/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word.html (168351 => 168352)


--- trunk/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word.html	2014-05-06 06:19:50 UTC (rev 168351)
+++ trunk/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word.html	2014-05-06 06:54:23 UTC (rev 168352)
@@ -1,57 +0,0 @@
-<html>
-<head>
-<script src="" language="_javascript_" type="text/_javascript_"></script>
-<title>Editing Test</title> 
-</head> 
-<body>
-<p>The test verified that if user use delete to move caret to the end, or use forward delete to move
-caret to the beginning of, a word that is marked as misspelled, the misspell underline will remain. 
-You should see phrase "it's a meagesga", in which the word 'meagesga' has red underline.</p>
-<textarea id="test" cols="80" rows="10"></textarea>
-<div id="console"></div>
-<script language="_javascript_" type="text/_javascript_">
-if (window.testRunner) {
-    testRunner.dumpAsText();
-}
-
-document.getElementById('test').focus();
-typeCharacterCommand('i');
-typeCharacterCommand('t');
-typeCharacterCommand('\'');
-typeCharacterCommand('s');
-typeCharacterCommand(' ');
-typeCharacterCommand('a');
-typeCharacterCommand(' ');
-typeCharacterCommand('m');
-typeCharacterCommand('e');
-typeCharacterCommand('a');
-typeCharacterCommand('g');
-typeCharacterCommand('e');
-typeCharacterCommand('s');
-typeCharacterCommand('g');
-typeCharacterCommand('a');
-typeCharacterCommand(' ');
-execDeleteCommand();
-if (window.internals && window.internals.hasSpellingMarker) {
-    if (window.internals.hasSpellingMarker(7,8) == 1) {
-        document.getElementById('console').innerHTML = 'SUCCESS<br>';
-    } else {
-        document.getElementById('console').innerHTML = "FAILURE. The word 'meagesga' does not have underline.<br>";
-    }
-}
-
-textarea = document.getElementById('test');
-textarea.setSelectionRange(6, 6);
-textarea.focus();
-typeCharacterCommand(' ');
-execForwardDeleteCommand();
-if (window.internals && window.internals.hasSpellingMarker) {
-    if (window.internals.hasSpellingMarker(7,8) == 1) {
-        document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
-    } else {
-        document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' does not have underline.<br>";
-    }
-}
-</script>
-</body>
-</html>

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (168351 => 168352)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2014-05-06 06:19:50 UTC (rev 168351)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2014-05-06 06:54:23 UTC (rev 168352)
@@ -118,6 +118,7 @@
 # [WK2] [Mac] Spellcheck tests don't seem to work
 webkit.org/b/105616 editing/spelling/context-menu-suggestions-multiword-selection.html
 webkit.org/b/105616 editing/spelling/context-menu-suggestions-subword-selection.html
+webkit.org/b/105616 editing/spelling/delete-into-misspelled-word.html
 webkit.org/b/105616 editing/inserting/inserting-slash-inside-url-with-smart-link.html
 webkit.org/b/105616 editing/spelling/spelling-changed-text.html
 webkit.org/b/105616 editing/spelling/spelling-backspace-between-lines.html

Modified: trunk/LayoutTests/platform/win/TestExpectations (168351 => 168352)


--- trunk/LayoutTests/platform/win/TestExpectations	2014-05-06 06:19:50 UTC (rev 168351)
+++ trunk/LayoutTests/platform/win/TestExpectations	2014-05-06 06:54:23 UTC (rev 168352)
@@ -1932,6 +1932,7 @@
 # End temporary skips
 
 # Spellchecker behavior tests.
+webkit.org/b/108370 editing/spelling/delete-into-misspelled-word.html [ Failure ]
 webkit.org/b/108370 editing/spelling/design-mode-spellcheck-off.html [ Failure ]
 webkit.org/b/108370 editing/spelling/context-menu-suggestions-multiword-selection.html [ Failure ]
 webkit.org/b/108370 editing/spelling/context-menu-suggestions-subword-selection.html [ Failure ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to