From 2bbabd7c68563c995a9acfaaa64d115f571a31aa Mon Sep 17 00:00:00 2001 From: Chong Zhang Date: Fri, 15 Sep 2017 12:19:00 -0700 Subject: [PATCH] [InputEvent] Rewrite typing and getTargetRanges() tests into WPT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 'input-events-typing-manual.html' passes on both Chrome and Safari. * 'input-events-get-target-ranges-manual.html' fails on Safari. Bug: 652439 Change-Id: I0d2fd6281e2ed615890278b7f6417ba41f3ed22a Reviewed-on: https://chromium-review.googlesource.com/666197 Commit-Queue: Chong Zhang Reviewed-by: Philip Jägenstedt Cr-Commit-Position: refs/heads/master@{#502325} --- ...input-events-get-target-ranges-manual.html | 76 +++++++++++++++++++ .../input-events-typing-data-manual.html | 38 ---------- input-events/input-events-typing-manual.html | 60 +++++++++++++++ 3 files changed, 136 insertions(+), 38 deletions(-) create mode 100644 input-events/input-events-get-target-ranges-manual.html delete mode 100644 input-events/input-events-typing-data-manual.html create mode 100644 input-events/input-events-typing-manual.html diff --git a/input-events/input-events-get-target-ranges-manual.html b/input-events/input-events-get-target-ranges-manual.html new file mode 100644 index 00000000000000..7e6a59769d0471 --- /dev/null +++ b/input-events/input-events-get-target-ranges-manual.html @@ -0,0 +1,76 @@ + + +InputEvent.getTargetRanges() behavior + + +

To manually run this test, please follow the steps below:
+1. Place caret at the end of 'hello world'.
+2. Press Ctrl-Backspace (Alt-Backspace on macOS) to delete word backwards.
+3. Place caret at the end of 'test2' => Press 'a' key.
+4. Select 'test2a' => Press 'b' key.
+5. Select 'b' => Bold text through context menu or Command-b on macOS.
+6. Place caret at the end of 'test3' => Press 'a' key => Press Backspace key.
+
+If a "PASS" result appears the test passes, otherwise it fails

+

hello world

+

test2

+ + diff --git a/input-events/input-events-typing-data-manual.html b/input-events/input-events-typing-data-manual.html deleted file mode 100644 index 26e179c3c0f1b2..00000000000000 --- a/input-events/input-events-typing-data-manual.html +++ /dev/null @@ -1,38 +0,0 @@ - - -InputEvent have data when typing on textarea and contenteditable - - -

To manually run this test, please follow the steps below:
-1. Focus the first box and press key 'a' and then 'b'.
-2. Focus the second box and press key 'c' and then 'd'.
-
-If a "PASS" result appears the test passes, otherwise it fails

- -

- diff --git a/input-events/input-events-typing-manual.html b/input-events/input-events-typing-manual.html new file mode 100644 index 00000000000000..5f81c33c7519e7 --- /dev/null +++ b/input-events/input-events-typing-manual.html @@ -0,0 +1,60 @@ + + +InputEvent have correct data/order when typing on textarea and contenteditable + + +

To manually run this test, please follow the steps below:
+1. Focus the first box and press key 'a' and then Shift-'b'.
+2. Focus the second box and press key 'c' and then Shift-'d'.
+
+If a "PASS" result appears the test passes, otherwise it fails

+ +

+