Refactoring editing/selection/13804.html
authorg.czajkowski@samsung.com <g.czajkowski@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Apr 2014 07:34:01 +0000 (07:34 +0000)
committerg.czajkowski@samsung.com <g.czajkowski@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Apr 2014 07:34:01 +0000 (07:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=131986

Reviewed by Darin Adler.

This test does not need pixel baselines (MAC, EFL, GTK) to just
check whether spelling marker appears on 'adf'.

According to bug 125688, the test starts using asynchronous
spellchecking.

Since the test mostly verifies spelling behaviour, it was moved
to editing/spelling directory.
Its name was changed to spelling-backward.html.

* editing/selection/13804.html: Removed.
* editing/spelling/spelling-backward-expected.txt: Added, renamed from editing/selection/13804.html.
* editing/spelling/spelling-backward.html: Added.

* platform/efl/editing/selection/13804-expected.png: Removed.
* platform/efl/editing/selection/13804-expected.txt: Removed.
* platform/gtk/editing/selection/13804-expected.png: Removed.
* platform/gtk/editing/selection/13804-expected.txt: Removed.
* platform/mac/editing/selection/13804-expected.png: Removed.
* platform/mac/editing/selection/13804-expected.txt: Removed.
Get rid of platform specific expectation.

* platform/gtk/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:
Mark spelling-backward.html as failure due to missing asynchronous spellchecking.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167701 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/selection/13804.html [deleted file]
LayoutTests/editing/spelling/spelling-backward-expected.txt [new file with mode: 0644]
LayoutTests/editing/spelling/spelling-backward.html [new file with mode: 0644]
LayoutTests/platform/efl/editing/selection/13804-expected.png [deleted file]
LayoutTests/platform/efl/editing/selection/13804-expected.txt [deleted file]
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/gtk/editing/selection/13804-expected.png [deleted file]
LayoutTests/platform/gtk/editing/selection/13804-expected.txt [deleted file]
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/platform/mac/editing/selection/13804-expected.png [deleted file]
LayoutTests/platform/mac/editing/selection/13804-expected.txt [deleted file]
LayoutTests/platform/win/TestExpectations

index dabef71..65abd66 100644 (file)
@@ -1,3 +1,37 @@
+2014-04-22  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
+
+        Refactoring editing/selection/13804.html
+        https://bugs.webkit.org/show_bug.cgi?id=131986
+
+        Reviewed by Darin Adler.
+
+        This test does not need pixel baselines (MAC, EFL, GTK) to just
+        check whether spelling marker appears on 'adf'.
+
+        According to bug 125688, the test starts using asynchronous
+        spellchecking.
+
+        Since the test mostly verifies spelling behaviour, it was moved
+        to editing/spelling directory.
+        Its name was changed to spelling-backward.html.
+
+        * editing/selection/13804.html: Removed.
+        * editing/spelling/spelling-backward-expected.txt: Added, renamed from editing/selection/13804.html.
+        * editing/spelling/spelling-backward.html: Added.
+
+        * platform/efl/editing/selection/13804-expected.png: Removed.
+        * platform/efl/editing/selection/13804-expected.txt: Removed.
+        * platform/gtk/editing/selection/13804-expected.png: Removed.
+        * platform/gtk/editing/selection/13804-expected.txt: Removed.
+        * platform/mac/editing/selection/13804-expected.png: Removed.
+        * platform/mac/editing/selection/13804-expected.txt: Removed.
+        Get rid of platform specific expectation.
+
+        * platform/gtk/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+        * platform/win/TestExpectations:
+        Mark spelling-backward.html as failure due to missing asynchronous spellchecking.
+
 2014-04-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Unreviewed EFL gardening. media tests has been broken since r166395 on both EFL wk1 and wk2.
diff --git a/LayoutTests/editing/selection/13804.html b/LayoutTests/editing/selection/13804.html
deleted file mode 100644 (file)
index 9d6955b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<p>This tests for a bug when moving the caret backward through a misspelled word. Once the caret is no longer adjacent to it it should be marked as misspelled.</p>
-<div id="div" contenteditable="true"><br></div>
-
-<script>
-var div = document.getElementById("div");
-div.focus();
-document.execCommand("InsertText", false, "This sentence ends with a misspelled word asd.");
-var selection = window.getSelection();
-selection.modify("move", "backward", "character");
-selection.modify("move", "backward", "character");
-selection.modify("move", "backward", "character");
-selection.modify("move", "backward", "character");
-selection.modify("move", "backward", "character");
-selection.modify("move", "backward", "character");
-</script>
diff --git a/LayoutTests/editing/spelling/spelling-backward-expected.txt b/LayoutTests/editing/spelling/spelling-backward-expected.txt
new file mode 100644 (file)
index 0000000..de4528b
--- /dev/null
@@ -0,0 +1,10 @@
+This tests for a bug when moving the caret backward through a misspelled word. Once the caret is no longer adjacent to it, it should be marked as misspelled.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS internals.hasSpellingMarker(42, 3) became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+This sentence ends with a misspelled word asd.
diff --git a/LayoutTests/editing/spelling/spelling-backward.html b/LayoutTests/editing/spelling/spelling-backward.html
new file mode 100644 (file)
index 0000000..6d9752a
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../resources/js-test-pre.js"></script>
+<script src="../../editing/editing.js"></script>
+<div id="div" contenteditable="true"></div>
+<script>
+description('This tests for a bug when moving the caret backward through '
+    + 'a misspelled word. Once the caret is no longer adjacent to it, '
+    + 'it should be marked as misspelled.');
+
+jsTestIsAsync = true;
+
+if (window.internals) {
+    internals.settings.setUnifiedTextCheckerEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
+}
+
+var div = document.getElementById("div");
+div.focus();
+document.execCommand("InsertText", false, "This sentence ends with a misspelled word asd.");
+
+moveSelectionBackwardByCharacterCommand();
+moveSelectionBackwardByCharacterCommand();
+moveSelectionBackwardByCharacterCommand();
+moveSelectionBackwardByCharacterCommand();
+moveSelectionBackwardByCharacterCommand();
+moveSelectionBackwardByCharacterCommand();
+
+if (window.internals)
+    shouldBecomeEqual("internals.hasSpellingMarker(42, 3)", "true", finishJSTest);
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</html>
diff --git a/LayoutTests/platform/efl/editing/selection/13804-expected.png b/LayoutTests/platform/efl/editing/selection/13804-expected.png
deleted file mode 100644 (file)
index 17a621f..0000000
Binary files a/LayoutTests/platform/efl/editing/selection/13804-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/efl/editing/selection/13804-expected.txt b/LayoutTests/platform/efl/editing/selection/13804-expected.txt
deleted file mode 100644 (file)
index df9eda2..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {P} at (0,0) size 784x36
-        RenderText {#text} at (0,0) size 778x35
-          text run at (0,0) width 778: "This tests for a bug when moving the caret backward through a misspelled word. Once the caret is no longer adjacent to it it"
-          text run at (0,18) width 203: "should be marked as misspelled."
-      RenderBlock {DIV} at (0,52) size 784x18
-        RenderText {#text} at (0,0) size 298x17
-          text run at (0,0) width 298: "This sentence ends with a misspelled word asd."
-caret: position 40 of child 0 {#text} of child 2 {DIV} of body
index c80c713..cfca20a 100644 (file)
@@ -1044,6 +1044,7 @@ webkit.org/b/73003 editing/spelling/spellcheck-async-remove-frame.html [ Skip ]
 webkit.org/b/73003 editing/spelling/spellcheck-async.html [ Skip ]
 webkit.org/b/73003 editing/spelling/spellcheck-queue.html [ Skip ]
 webkit.org/b/73003 editing/spelling/spellcheck-sequencenum.html [ Skip ]
+webkit.org/b/73003 editing/spelling/spelling-backward.html [ Skip ]
 webkit.org/b/73003 editing/spelling/spelling-marker-description.html [ Skip ]
 
 # Spellcheck tests don't seem to work.
diff --git a/LayoutTests/platform/gtk/editing/selection/13804-expected.png b/LayoutTests/platform/gtk/editing/selection/13804-expected.png
deleted file mode 100644 (file)
index 5d90701..0000000
Binary files a/LayoutTests/platform/gtk/editing/selection/13804-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/gtk/editing/selection/13804-expected.txt b/LayoutTests/platform/gtk/editing/selection/13804-expected.txt
deleted file mode 100644 (file)
index 3029a3b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {P} at (0,0) size 784x34
-        RenderText {#text} at (0,0) size 778x34
-          text run at (0,0) width 778: "This tests for a bug when moving the caret backward through a misspelled word. Once the caret is no longer adjacent to it it"
-          text run at (0,17) width 203: "should be marked as misspelled."
-      RenderBlock {DIV} at (0,50) size 784x17
-        RenderText {#text} at (0,0) size 298x17
-          text run at (0,0) width 298: "This sentence ends with a misspelled word asd."
-caret: position 40 of child 0 {#text} of child 2 {DIV} of body
index e8fe73e..4fffffc 100644 (file)
@@ -125,6 +125,7 @@ webkit.org/b/105616 editing/spelling/design-mode-spellcheck-off.html
 webkit.org/b/105616 editing/spelling/spellcheck-attribute.html
 webkit.org/b/105616 editing/spelling/spelling-attribute-at-child.html
 webkit.org/b/105616 editing/spelling/spelling-attribute-change.html
+webkit.org/b/105616 editing/spelling/spelling-backward.html
 webkit.org/b/105616 editing/spelling/spelling-double-clicked-word.html
 webkit.org/b/105616 editing/spelling/spelling-exactly-selected-word.html
 webkit.org/b/105616 editing/spelling/spelling-hasspellingmarker.html
diff --git a/LayoutTests/platform/mac/editing/selection/13804-expected.png b/LayoutTests/platform/mac/editing/selection/13804-expected.png
deleted file mode 100644 (file)
index 2d34786..0000000
Binary files a/LayoutTests/platform/mac/editing/selection/13804-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/editing/selection/13804-expected.txt b/LayoutTests/platform/mac/editing/selection/13804-expected.txt
deleted file mode 100644 (file)
index a6e9565..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {P} at (0,0) size 784x36
-        RenderText {#text} at (0,0) size 778x36
-          text run at (0,0) width 778: "This tests for a bug when moving the caret backward through a misspelled word. Once the caret is no longer adjacent to it it"
-          text run at (0,18) width 203: "should be marked as misspelled."
-      RenderBlock {DIV} at (0,52) size 784x18
-        RenderText {#text} at (0,0) size 298x18
-          text run at (0,0) width 298: "This sentence ends with a misspelled word asd."
-caret: position 40 of child 0 {#text} of child 2 {DIV} of body
index f531139..8a2daec 100644 (file)
@@ -1935,6 +1935,7 @@ svg/css/shadow-changes.svg [ 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.org/b/108370 editing/spelling/spelling-backward.html [ Failure ]
 webkit.org/b/108370 editing/spelling/spelling-double-clicked-word.html [ Failure ]
 webkit.org/b/108370 editing/spelling/spelling-exactly-selected-word.html [ Failure ]
 webkit.org/b/108370 editing/spelling/spelling-with-punctuation-selection.html [ Failure ]