From e7e1616f73f6d513e9617d7ee3f909fe34e98375 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Tue, 4 Aug 2020 03:33:46 +0000 Subject: [PATCH] Bug 1655393 - Add WPT for `InputEvent.getTargetRanges()` r=smaug There are no automated tests for `InputEvent.getTargetRanges()` because it is set only when `beforeinput` event, but it's defined as not dispatched by `document.execCommand`. However, we can synthesize `beforeinput` event with test driver. On the other hand, the definition in Input Events spec is not clear. Therefore, most of the tests won't be passed on any browsers for now. There are some spec issues which I filed: * https://github.com/w3c/input-events/issues/112 * https://github.com/w3c/input-events/issues/113 * https://github.com/w3c/input-events/issues/114 These new test must be useful when browser vendors discuss the issues. Differential Revision: https://phabricator.services.mozilla.com/D85527 --- ...target-ranges-backspace.tentative.html.ini | 86 ++ ...et-ranges-forwarddelete.tentative.html.ini | 88 ++ ...get-target-ranges-backspace.tentative.html | 811 ++++++++++++++++++ ...target-ranges-forwarddelete.tentative.html | 808 +++++++++++++++++ 4 files changed, 1793 insertions(+) create mode 100644 testing/web-platform/meta/input-events/input-events-get-target-ranges-backspace.tentative.html.ini create mode 100644 testing/web-platform/meta/input-events/input-events-get-target-ranges-forwarddelete.tentative.html.ini create mode 100644 testing/web-platform/tests/input-events/input-events-get-target-ranges-backspace.tentative.html create mode 100644 testing/web-platform/tests/input-events/input-events-get-target-ranges-forwarddelete.tentative.html diff --git a/testing/web-platform/meta/input-events/input-events-get-target-ranges-backspace.tentative.html.ini b/testing/web-platform/meta/input-events/input-events-get-target-ranges-backspace.tentative.html.ini new file mode 100644 index 0000000000000..0b2f1c62e9a0c --- /dev/null +++ b/testing/web-platform/meta/input-events/input-events-get-target-ranges-backspace.tentative.html.ini @@ -0,0 +1,86 @@ +[input-events-get-target-ranges-backspace.tentative.html] + [Shift + Backspace at "

abc def[\] ghi

"] + expected: FAIL + + [Control + Backspace at "

abc def[\] ghi

"] + expected: + if (os == "win") or (os == "android"): FAIL + PASS + + [Alt + Backspace at "

abc def[\] ghi

"] + expected: + if (os == "mac") or (os == "win") or (os == "android"): FAIL + PASS + + [Meta + Backspace at "

abc[\] def

"] + expected: FAIL + + [Shift + Backspace at "

abc[\] def

"] + expected: FAIL + + [Control + Backspace at "

abc[\] def

"] + expected: FAIL + + [Alt + Backspace at "

abc[\] def

"] + expected: FAIL + + [Backspace at "

abc

[\] def

"] + expected: FAIL + + [Backspace at "

abc

[\]   def
"] + expected: FAIL + + [Backspace at "
abc

[\]def
ghi

"] + expected: FAIL + + [Backspace at "

a[\]bc

"] + expected: FAIL + + [Backspace at "

abc

[\]def

"] + expected: FAIL + + [Backspace at "

a[\]bc

"] + expected: FAIL + + [Backspace at "

ab[\]c

"] + expected: FAIL + + [Backspace at "

abc

[\]def

"] + expected: FAIL + + [Backspace at "
abc   

[\]def

"] + expected: FAIL + + [Backspace at "

abc[\]

"] + expected: FAIL + + [Backspace at "

abc
[\]def

"] + expected: FAIL + + [Backspace at "

ab[\]c

"] + expected: FAIL + + [Backspace at "

abc{
}def

"] + expected: FAIL + + [Backspace at "

abc

[\] def

"] + expected: FAIL + + [Backspace at "

abc

[\]def

"] + expected: FAIL + + [Backspace at "

abc [

\] def

"] + expected: FAIL + + [Backspace at "

abc

[\]def
"] + expected: FAIL + + [Backspace at "

abc

[\] def

"] + expected: FAIL + + [Backspace at "

ab[\]c

"] + expected: FAIL + + [Backspace at "
abc   

[\]def

"] + expected: FAIL + diff --git a/testing/web-platform/meta/input-events/input-events-get-target-ranges-forwarddelete.tentative.html.ini b/testing/web-platform/meta/input-events/input-events-get-target-ranges-forwarddelete.tentative.html.ini new file mode 100644 index 0000000000000..e773eb2fb25b0 --- /dev/null +++ b/testing/web-platform/meta/input-events/input-events-get-target-ranges-forwarddelete.tentative.html.ini @@ -0,0 +1,88 @@ +[input-events-get-target-ranges-forwarddelete.tentative.html] + [Shift + Delete at "

abc [\]def ghi

"] + expected: + if (os == "mac") or (os == "win"): FAIL + PASS + + [Control + Delete at "

abc [\]def ghi

"] + expected: + if (os == "win") or (os == "android"): FAIL + PASS + + [Alt + Delete at "

abc [\]def ghi

"] + expected: + if (os == "mac") or (os == "android"): FAIL + PASS + + [Meta + Delete at "

abc [\]def

"] + expected: FAIL + + [Shift + Delete at "

abc [\]def

"] + expected: FAIL + + [Alt + Delete at "

abc [\]def

"] + expected: FAIL + + [Control + Delete at "

abc [\]def

"] + expected: FAIL + + [Delete at "

[\]abc

"] + expected: FAIL + + [Delete at "

a[\]bc

"] + expected: FAIL + + [Delete at "

a[\]bc

"] + expected: FAIL + + [Delete at "
abc   [\]

def

"] + expected: FAIL + + [Delete at "
abc[\]

def
ghi

"] + expected: FAIL + + [Delete at "

abc [\]

def

"] + expected: FAIL + + [Delete at "
abc   [\]

def

"] + expected: FAIL + + [Delete at "

ab[\]c

"] + expected: FAIL + + [Delete at "

abc [\]

def

"] + expected: FAIL + + [Delete at "

a[\]bc

"] + expected: FAIL + + [Delete at "

abc[\]

def

"] + expected: FAIL + + [Delete at "

ab[\]c

"] + expected: FAIL + + [Delete at "

abc[\]

def

"] + expected: FAIL + + [Delete at "

abc[\]
def

"] + expected: FAIL + + [Delete at "

abc
{}

def

"] + expected: FAIL + + [Delete at "

abc [\]

def

"] + expected: FAIL + + [Delete at "

abc[\]

   def
"] + expected: FAIL + + [Delete at "

abc{
}def

"] + expected: FAIL + + [Delete at "

abc [

\] def

"] + expected: FAIL + + [Delete at "

abc[\]

def
"] + expected: FAIL + diff --git a/testing/web-platform/tests/input-events/input-events-get-target-ranges-backspace.tentative.html b/testing/web-platform/tests/input-events/input-events-get-target-ranges-backspace.tentative.html new file mode 100644 index 0000000000000..cf512269b07e0 --- /dev/null +++ b/testing/web-platform/tests/input-events/input-events-get-target-ranges-backspace.tentative.html @@ -0,0 +1,811 @@ + + +InputEvent.getTargetRanges() at Backspace + + + + + +
+ diff --git a/testing/web-platform/tests/input-events/input-events-get-target-ranges-forwarddelete.tentative.html b/testing/web-platform/tests/input-events/input-events-get-target-ranges-forwarddelete.tentative.html new file mode 100644 index 0000000000000..3780324cf92bf --- /dev/null +++ b/testing/web-platform/tests/input-events/input-events-get-target-ranges-forwarddelete.tentative.html @@ -0,0 +1,808 @@ + + +InputEvent.getTargetRanges() at Delete (forward delete) + + + + + +
+