Title: [261896] trunk/LayoutTests
Revision
261896
Author
[email protected]
Date
2020-05-19 17:01:49 -0700 (Tue, 19 May 2020)

Log Message

Move editing/mac/spelling/editing-word-with-marker-1.html to editing/spelling
https://bugs.webkit.org/show_bug.cgi?id=211813

Reviewed by Simon Fraser.

As of r261796 this test runs on iOS. It is a misnomer for it to be in a Mac-specific
test directory. Let's move it to a platform-independent one.

I fixed up the external _javascript_ files referenced in the test to be relative to its
new location. All other lines are identical.

* editing/spelling/editing-word-with-marker-1-expected.txt: Renamed from LayoutTests/editing/mac/spelling/editing-word-with-marker-1-expected.txt.
* editing/spelling/editing-word-with-marker-1.html: Renamed from LayoutTests/editing/mac/spelling/editing-word-with-marker-1.html.
* platform/ios/TestExpectations:
* platform/mac-wk2/TestExpectations:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (261895 => 261896)


--- trunk/LayoutTests/ChangeLog	2020-05-19 23:56:00 UTC (rev 261895)
+++ trunk/LayoutTests/ChangeLog	2020-05-20 00:01:49 UTC (rev 261896)
@@ -1,3 +1,21 @@
+2020-05-19  Daniel Bates  <[email protected]>
+
+        Move editing/mac/spelling/editing-word-with-marker-1.html to editing/spelling
+        https://bugs.webkit.org/show_bug.cgi?id=211813
+
+        Reviewed by Simon Fraser.
+
+        As of r261796 this test runs on iOS. It is a misnomer for it to be in a Mac-specific
+        test directory. Let's move it to a platform-independent one.
+
+        I fixed up the external _javascript_ files referenced in the test to be relative to its
+        new location. All other lines are identical.
+
+        * editing/spelling/editing-word-with-marker-1-expected.txt: Renamed from LayoutTests/editing/mac/spelling/editing-word-with-marker-1-expected.txt.
+        * editing/spelling/editing-word-with-marker-1.html: Renamed from LayoutTests/editing/mac/spelling/editing-word-with-marker-1.html.
+        * platform/ios/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+
 2020-05-19  Kate Cheney  <[email protected]>
 
         <rdar://problem/57979087>

Deleted: trunk/LayoutTests/editing/mac/spelling/editing-word-with-marker-1-expected.txt (261895 => 261896)


--- trunk/LayoutTests/editing/mac/spelling/editing-word-with-marker-1-expected.txt	2020-05-19 23:56:00 UTC (rev 261895)
+++ trunk/LayoutTests/editing/mac/spelling/editing-word-with-marker-1-expected.txt	2020-05-20 00:01:49 UTC (rev 261896)
@@ -1,15 +0,0 @@
-The test verified that when a word is modified, its spelling markers are removed. When manually testing, type "it's a meagesga", then edit the word "meagesga". You should see the underline under the modified "meagesga" disppears after editing.
-
-
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-SUCCESS
-

Deleted: trunk/LayoutTests/editing/mac/spelling/editing-word-with-marker-1.html (261895 => 261896)


--- trunk/LayoutTests/editing/mac/spelling/editing-word-with-marker-1.html	2020-05-19 23:56:00 UTC (rev 261895)
+++ trunk/LayoutTests/editing/mac/spelling/editing-word-with-marker-1.html	2020-05-20 00:01:49 UTC (rev 261896)
@@ -1,191 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src=""
-<script src=""
-<title>Editing word with marker test 1</title>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
-
-if (window.internals) {
-    if (UIHelper.isIOSFamily() || !UIHelper.isWebKit2())
-        internals.setContinuousSpellCheckingEnabled(true);
-    else {
-        internals.settings.setUnifiedTextCheckerEnabled(true);
-        internals.settings.setAsynchronousSpellCheckingEnabled(true);
-    }
-}
-</script>
-</head>
-<body>
-<p>The test verified that when a word is modified, its spelling markers are removed.
-When manually testing, type "it's a meagesga", then edit the word "meagesga". You should see the 
-underline under the modified "meagesga" disppears after editing.</p>
-<textarea id="test" cols="80" rows="10"></textarea>
-<div id="console"></div>
-<script>
-let textarea = document.getElementById("test");
-
-async function resetText()
-{
-    textarea.blur();
-    if (window.testRunner)
-        await UIHelper.activateElementAndWaitForInputSession(textarea);
-    else
-        textarea.focus();
-    textarea.value = "";
-    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(' ');
-}
-
-async function runTest()
-{
-    resetText();
-    textarea.setSelectionRange(14, 15);
-    execDeleteCommand();
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(7, 7))
-            document.getElementById('console').innerHTML = 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML = "FAILURE. The word 'meagesg' has underline.<br>";
-    }
-
-    // Testing deletion at various location.
-    resetText();
-    textarea.setSelectionRange(6, 6);
-    execForwardDeleteCommand();
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(6, 8))
-            document.getElementById('console').innerHTML += 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML += "FAILURE. The word 'ameagesga' has underline.<br>";
-    }
-
-    resetText();
-    textarea.setSelectionRange(7, 7);
-    execForwardDeleteCommand();
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(7, 7))
-            document.getElementById('console').innerHTML += 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML += "FAILURE. The word 'eagesga' has underline.<br>";
-    }
-
-    resetText();
-    textarea.setSelectionRange(10, 10);
-    typeCharacterCommand(' ');
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(7, 3) && !window.internals.hasSpellingMarker(11, 5))
-            document.getElementById('console').innerHTML += 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML += "FAILURE. The segment 'mea gesga' has underline.<br>";
-    }
-
-    resetText();
-    textarea.setSelectionRange(10, 13);
-    execDeleteCommand();
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(7, 5))
-            document.getElementById('console').innerHTML += 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML += "FAILURE. The word 'meaga' has underline.<br>";
-    }
-
-    resetText();
-    textarea.setSelectionRange(10, 13);
-    typeCharacterCommand(' ');
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(7, 3) && !window.internals.hasSpellingMarker(11, 2))
-            document.getElementById('console').innerHTML += 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML += "FAILURE. The segment 'mea ga' has underline.<br>";
-    }
-
-    // Testing appending non-whitespace character.
-    resetText();
-    textarea.setSelectionRange(7, 7);
-    typeCharacterCommand('a');
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(8, 8))
-            document.getElementById('console').innerHTML += 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML += "FAILURE. The word 'ameagesga' has underline.<br>";
-    }
-
-    resetText();
-    textarea.setSelectionRange(15, 15);
-    typeCharacterCommand('a');
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(7,8))
-            document.getElementById('console').innerHTML += 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML += "FAILURE. The word 'meagesgaa' has underline.<br>";
-    }
-
-    // Testing pasting.
-    resetText();
-    textarea = document.getElementById('test');
-    textarea.setSelectionRange(0, 4);
-    execCopyCommand();
-    textarea.setSelectionRange(7, 7);
-    execPasteCommand();
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(11, 8))
-            document.getElementById('console').innerHTML += 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML += "FAILURE. The word 'meagesga' has underline.<br>";
-    }
-
-    resetText();
-    textarea = document.getElementById('test');
-    textarea.setSelectionRange(0, 4);
-    execCopyCommand();
-    textarea.setSelectionRange(15, 15);
-    if (window.internals)
-        internals.updateEditorUINowIfScheduled();
-    execPasteCommand();
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(7, 8))
-            document.getElementById('console').innerHTML += 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML += "FAILURE. The word 'meagesga' has underline.<br>";
-    }
-
-    resetText();
-    textarea = document.getElementById('test');
-    textarea.setSelectionRange(0, 4);
-    execCopyCommand();
-    textarea.setSelectionRange(10, 10);
-    execPasteCommand();
-    if (window.internals && window.internals.hasSpellingMarker) {
-        if (!window.internals.hasSpellingMarker(7, 3) && !window.internals.hasSpellingMarker(15, 5))
-            document.getElementById('console').innerHTML += 'SUCCESS<br>';
-        else
-            document.getElementById('console').innerHTML += "FAILURE. The word 'meait\'sgesga' has underline.<br>";
-    }
-
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-
-runTest();
-</script>
-</body>
-</html>

Copied: trunk/LayoutTests/editing/spelling/editing-word-with-marker-1-expected.txt (from rev 261895, trunk/LayoutTests/editing/mac/spelling/editing-word-with-marker-1-expected.txt) (0 => 261896)


--- trunk/LayoutTests/editing/spelling/editing-word-with-marker-1-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/editing/spelling/editing-word-with-marker-1-expected.txt	2020-05-20 00:01:49 UTC (rev 261896)
@@ -0,0 +1,15 @@
+The test verified that when a word is modified, its spelling markers are removed. When manually testing, type "it's a meagesga", then edit the word "meagesga". You should see the underline under the modified "meagesga" disppears after editing.
+
+
+SUCCESS
+SUCCESS
+SUCCESS
+SUCCESS
+SUCCESS
+SUCCESS
+SUCCESS
+SUCCESS
+SUCCESS
+SUCCESS
+SUCCESS
+

Copied: trunk/LayoutTests/editing/spelling/editing-word-with-marker-1.html (from rev 261895, trunk/LayoutTests/editing/mac/spelling/editing-word-with-marker-1.html) (0 => 261896)


--- trunk/LayoutTests/editing/spelling/editing-word-with-marker-1.html	                        (rev 0)
+++ trunk/LayoutTests/editing/spelling/editing-word-with-marker-1.html	2020-05-20 00:01:49 UTC (rev 261896)
@@ -0,0 +1,191 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src=""
+<title>Editing word with marker test 1</title>
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+if (window.internals) {
+    if (UIHelper.isIOSFamily() || !UIHelper.isWebKit2())
+        internals.setContinuousSpellCheckingEnabled(true);
+    else {
+        internals.settings.setUnifiedTextCheckerEnabled(true);
+        internals.settings.setAsynchronousSpellCheckingEnabled(true);
+    }
+}
+</script>
+</head>
+<body>
+<p>The test verified that when a word is modified, its spelling markers are removed.
+When manually testing, type "it's a meagesga", then edit the word "meagesga". You should see the 
+underline under the modified "meagesga" disppears after editing.</p>
+<textarea id="test" cols="80" rows="10"></textarea>
+<div id="console"></div>
+<script>
+let textarea = document.getElementById("test");
+
+async function resetText()
+{
+    textarea.blur();
+    if (window.testRunner)
+        await UIHelper.activateElementAndWaitForInputSession(textarea);
+    else
+        textarea.focus();
+    textarea.value = "";
+    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(' ');
+}
+
+async function runTest()
+{
+    resetText();
+    textarea.setSelectionRange(14, 15);
+    execDeleteCommand();
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(7, 7))
+            document.getElementById('console').innerHTML = 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML = "FAILURE. The word 'meagesg' has underline.<br>";
+    }
+
+    // Testing deletion at various location.
+    resetText();
+    textarea.setSelectionRange(6, 6);
+    execForwardDeleteCommand();
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(6, 8))
+            document.getElementById('console').innerHTML += 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML += "FAILURE. The word 'ameagesga' has underline.<br>";
+    }
+
+    resetText();
+    textarea.setSelectionRange(7, 7);
+    execForwardDeleteCommand();
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(7, 7))
+            document.getElementById('console').innerHTML += 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML += "FAILURE. The word 'eagesga' has underline.<br>";
+    }
+
+    resetText();
+    textarea.setSelectionRange(10, 10);
+    typeCharacterCommand(' ');
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(7, 3) && !window.internals.hasSpellingMarker(11, 5))
+            document.getElementById('console').innerHTML += 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML += "FAILURE. The segment 'mea gesga' has underline.<br>";
+    }
+
+    resetText();
+    textarea.setSelectionRange(10, 13);
+    execDeleteCommand();
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(7, 5))
+            document.getElementById('console').innerHTML += 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML += "FAILURE. The word 'meaga' has underline.<br>";
+    }
+
+    resetText();
+    textarea.setSelectionRange(10, 13);
+    typeCharacterCommand(' ');
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(7, 3) && !window.internals.hasSpellingMarker(11, 2))
+            document.getElementById('console').innerHTML += 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML += "FAILURE. The segment 'mea ga' has underline.<br>";
+    }
+
+    // Testing appending non-whitespace character.
+    resetText();
+    textarea.setSelectionRange(7, 7);
+    typeCharacterCommand('a');
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(8, 8))
+            document.getElementById('console').innerHTML += 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML += "FAILURE. The word 'ameagesga' has underline.<br>";
+    }
+
+    resetText();
+    textarea.setSelectionRange(15, 15);
+    typeCharacterCommand('a');
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(7,8))
+            document.getElementById('console').innerHTML += 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML += "FAILURE. The word 'meagesgaa' has underline.<br>";
+    }
+
+    // Testing pasting.
+    resetText();
+    textarea = document.getElementById('test');
+    textarea.setSelectionRange(0, 4);
+    execCopyCommand();
+    textarea.setSelectionRange(7, 7);
+    execPasteCommand();
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(11, 8))
+            document.getElementById('console').innerHTML += 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML += "FAILURE. The word 'meagesga' has underline.<br>";
+    }
+
+    resetText();
+    textarea = document.getElementById('test');
+    textarea.setSelectionRange(0, 4);
+    execCopyCommand();
+    textarea.setSelectionRange(15, 15);
+    if (window.internals)
+        internals.updateEditorUINowIfScheduled();
+    execPasteCommand();
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(7, 8))
+            document.getElementById('console').innerHTML += 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML += "FAILURE. The word 'meagesga' has underline.<br>";
+    }
+
+    resetText();
+    textarea = document.getElementById('test');
+    textarea.setSelectionRange(0, 4);
+    execCopyCommand();
+    textarea.setSelectionRange(10, 10);
+    execPasteCommand();
+    if (window.internals && window.internals.hasSpellingMarker) {
+        if (!window.internals.hasSpellingMarker(7, 3) && !window.internals.hasSpellingMarker(15, 5))
+            document.getElementById('console').innerHTML += 'SUCCESS<br>';
+        else
+            document.getElementById('console').innerHTML += "FAILURE. The word 'meait\'sgesga' has underline.<br>";
+    }
+
+    if (window.testRunner)
+        testRunner.notifyDone();
+}
+
+runTest();
+</script>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/ios/TestExpectations (261895 => 261896)


--- trunk/LayoutTests/platform/ios/TestExpectations	2020-05-19 23:56:00 UTC (rev 261895)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2020-05-20 00:01:49 UTC (rev 261896)
@@ -27,8 +27,6 @@
 
 imported/w3c/web-platform-tests/dom/events/document-level-touchmove-event-listener-passive-by-default.html [ Pass ]
 
-webkit.org/b/211813 editing/mac/spelling/editing-word-with-marker-1.html [ Pass ]
-
 #//////////////////////////////////////////////////////////////////////////////////////////
 # End platform-specific directories.
 #//////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (261895 => 261896)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2020-05-19 23:56:00 UTC (rev 261895)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2020-05-20 00:01:49 UTC (rev 261896)
@@ -179,6 +179,7 @@
 webkit.org/b/105616 editing/spelling/copy-paste-crash.html
 webkit.org/b/105616 editing/spelling/delete-into-misspelled-word.html
 webkit.org/b/105616 editing/spelling/editing-multiple-words-with-markers.html
+webkit.org/b/105616 editing/spelling/editing-word-with-marker-1.html [ Failure ]
 webkit.org/b/105616 editing/spelling/editing-word-with-marker-2.html
 webkit.org/b/105616 editing/spelling/move-cursor-around-misspelled-word.html
 webkit.org/b/105616 editing/spelling/spelling-changed-text.html
@@ -208,7 +209,6 @@
 webkit.org/b/105616 editing/mac/spelling/delete-autocorrected-word-1.html [ Failure ]
 webkit.org/b/105616 editing/mac/spelling/delete-autocorrected-word-2.html [ Failure ]
 webkit.org/b/105616 editing/mac/spelling/delete-into-autocorrected-word.html [ Failure ]
-webkit.org/b/105616 editing/mac/spelling/editing-word-with-marker-1.html [ Failure ]
 webkit.org/b/105616 editing/mac/spelling/forward-delete-into-autocorrected-word.html [ Failure ]
 webkit.org/b/105616 editing/mac/spelling/move-cursor-to-autocorrected-word.html [ Failure ]
 webkit.org/b/105616 editing/mac/spelling/move-cursor-to-beginning-of-autocorrected-word.html [ Failure ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to