Closed Bug 1655393 Opened 4 years ago Closed 4 years ago

Add `InputEvent.getTargetRanges()` WPT with driver

Categories

(Core :: DOM: Events, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

There is only one manual test of InputEvent.getTargetRanges(). Of course, this is not enough, and in edge cases, other browsers return wrong ranges (e.g., when deleting invisible white-spaces automatically). So, I think that we should create testcases which synthesizes Delete and Backspace with various modifiers, and check whether getTargetRanges() and actually removed range is exactly same or not.

Severity: -- → S3
Priority: -- → P1
Assignee: nobody → masayuki
Status: NEW → ASSIGNED

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:

These new test must be useful when browser vendors discuss the issues.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/12f21ad90937 Add WPT for `InputEvent.getTargetRanges()` r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/24866 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Upstream PR merged by moz-wptsync-bot
No longer blocks: 1609291
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: