input-events

edit

WPT coverage of the tests of input-events at the revision c8fa86fb13d4. The tests link to their results in the browsers on wpt.fyi. The tentative tests (experimental features), the reftests and the crash tests are listed separately from the stable tests.

GroupPassingTestsDisabledPass rate
Stable1618089%
Tentative0900%
Reftests000–
Crash tests110100%
All1728061%

Failure reasons

The tests that do not pass (failing or disabled), by kind of reason. A test with several reasons counts once per kind.

  • BUG: 1
  • TEST BUG: 9
  • NOT IMPLEMENTED: 2

Stable tests

TestResultSubtestsKindDescription
contenteditable-insertfrompaste-type-inputevent-data.htmlPass1 / 1
idlharness.window.jsPass13 / 13
input-events-arrow-key-on-number-input-delete-document.htmlPass1 / 1
input-events-arrow-key-on-number-input-prevent-default.htmlPass1 / 1
input-events-arrow-key-on-number-input.htmlPass1 / 1
input-events-cut-paste.htmlPass3 / 3
input-events-delete-selection.htmlPass6 / 6
input-events-exec-command.htmlFail298 / 307TEST BUG3 of the 9 failing subtests: the commands foreColor, backColor and hiliteColor with the value CurrentColor are expected to fire input, but the action of these commands returns false for currentColor as the specification says, and editing/data/forecolor.js (editing/run/forecolor.html) expects forecolor with currentColor to do nothing and return false, which the library passes; 6 of the 9 failing subtests. 3 fail in every browser: the value Reset of foreColor, backColor and hiliteColor is expected as reset in the data of the event, but reset is not a CSS-wide keyword and the test expects the other invalid values as they were given (Invalid-Value). 1 passes in Chrome and Safari: justifyLeft on text whose alignment is already left is expected to wrap it in <div style="text-align: left;">; the justify algorithm only changes the elements whose alignment value differs from the new one, so nothing is wrapped. 2 pass in Chrome only: removeFormat is expected to keep the <div> whose style it removes (<div style="">abc</div>), and indent then outdent to restore that tree
input-events-get-target-ranges-shadow-dom.htmlFail0 / 3NOT IMPLEMENTEDthe user edits of an editing host in a shadow tree fire no beforeinput (the selection of the document cannot be in a shadow tree, so there is no active range to edit), and the target ranges of a synthetic InputEvent are not retargeted out of the shadow trees
input-events-get-target-ranges.htmlPass3 / 3
input-events-spin-button-click-on-number-input-delete-document.htmlPass1 / 1
input-events-spin-button-click-on-number-input-prevent-default.htmlPass1 / 1
input-events-spin-button-click-on-number-input.htmlPass1 / 1
input-events-typing.htmlPass13 / 13
select-event-drag-remove.htmlPass1 / 1
textarea-insertfrompaste-type-inputevent-data-withnewline-atend.htmlPass1 / 1
textarea-insertfrompaste-type-inputevent-data-withnewline-atstart.htmlPass1 / 1
textarea-insertfrompaste-type-inputevent-data.htmlPass1 / 1

Tentative tests

TestResultSubtestsKindDescription
input-events-get-target-ranges-backspace.tentative.htmlFail132 / 169TEST BUG37 of 169 subtests, none of which passes in Chrome or Safari (26 pass in Firefox only, 11 in no browser). 26 target ranges: the range of a deletion that joins two blocks or removes an hr is the range given to the deletion (the caret extended by one character, as Selection.modify()), where the test expects the range of what is removed with the collapsible white space around it (<p>abc </p><p> [] def</p> expects (#text "abc", 3) - (#text "def", 3)), and the range of the deletion of the only character of an inline element is in its Text node (the test expects the range of the element); Input Events only says that the target ranges are the ranges that the event will affect. 5 results: Backspace at the start of the first item of a list converts it to a <div> (the delete command splits the parent of the item and sets its tag name to the default single-line container) where the test expects its line to be joined to the text before the list, and <br><hr> loses only the <hr>. 6 subtests need a selection with several ranges (the selection of table cells), which only Firefox has (the Selection API selection has at most one range)
input-events-get-target-ranges-deleting-in-list-items.tentative.htmlFail1,050 / 1,264TEST BUG214 of 1264 subtests, none of which passes in the three browsers (146 fail in every browser, 26 pass in Chrome and Safari, 24 in Safari only, 16 in Firefox only, 2 in Chrome only). 102 target ranges, 100 of which fail in every browser: the test expects the range of what the deletion removes when two list items are joined (<li>list-item1</li><li>[]list-item2</li> expects (<li>, 1) - (#text "list-item2", 0); the library returns the range given to the deletion, the caret extended by one character or the selection). 112 results where the library gives the result of the specification: the delete-the-selection algorithm moves all the children of the end block, so a list item with two lines is moved as a whole when it is joined to the previous item (Chrome and Safari only move its first line: <li>list-item1list-item2</li><li>second line of list-item2</li>) and a list item whose content is a paragraph keeps it (<li>list-item1<p>list-item2</p></li>; 26 subtests that Chrome and Safari pass); the lists that become adjacent are merged (24 subtests, only Safari passes); the selections that contain non-editable list items or an empty nested list do not keep an empty list item, and a selection that ends in a nested list of the next item removes the nested list (46 subtests that every browser fails); Delete in the empty item of a list, with no following content in the editing host, changes nothing (14 subtests, only Firefox passes); 2 subtests that only Chrome passes
input-events-get-target-ranges-deleting-range-across-editing-host-boundaries.tentative.htmlFail3 / 5TEST BUG2 of 5 subtests, that only Firefox passes: a deletion whose selection crosses non-editable content is expected to have one target range per editable part; the library returns one range, the selection (the Selection API selection has one range, and Input Events does not say to split it); Chrome and Safari fail too
input-events-get-target-ranges-during-and-after-dispatch.tentative.htmlFail2 / 3TEST BUG1 of 3 subtests: the tentative test expects getTargetRanges() to return the same ranges after the dispatch of beforeinput; they are cleared, as input-events-get-target-ranges.html (not tentative) expects and as Chrome does
input-events-get-target-ranges-forwarddelete.tentative.htmlFail139 / 176BUG, TEST BUG2 subtests that fail in every browser: Delete in the empty paragraph of <p>{}<br></p><p contenteditable="false">abc</p><p>def</p> deletes the first character of the paragraph that follows the non-editable one (<p><br></p><p contenteditable="false">abc</p><p>ef</p>, target range (<p>, 0) - (#text "ef", 1)); the test accepts <p>def</p> (which execCommand("forwardDelete") gives) or the content unchanged (which the specification gives), with the range (<p>, 0) - (<div>, 1); 1 subtest that passes in Chrome, Firefox and Safari: Meta+Delete is handled as Delete: the library deletes the next character (deleteContentForward, range (#text, 4) - (#text, 5)) where the browsers give a collapsed target range at the caret ((#text "abc ef s", 4)); the result of this subtest, which depends on the content left by the previous subtests, fails in every browser; 34 of 176 subtests, none of which passes in the three browsers (18 pass in Firefox only, 2 in Chrome and Firefox, 2 in Firefox and Safari, 12 in no browser). 21 target ranges: the range of a deletion that joins two blocks or removes an hr is the range given to the deletion (the caret extended by one character, as Selection.modify()), where the test expects the range of what is removed with the collapsible white space around it (<p>abc []</p><p> def</p> expects (#text "abc", 3) - (#text "def", 3)), the range of the deletion of the only character of an inline element is in its Text node (the test expects the range of the element), the range of a Delete that changes nothing before a table or at the end of a table cell or caption that is followed by other content is not collapsed, and the word deleted by Control+Delete (Firefox and Safari) or Alt+Delete (Chrome and Firefox) is expected with the spaces that follow it (no specification defines the extent of a word deletion); Input Events only says that the target ranges are the ranges that the event will affect. 7 results where the library gives the result of the specification: the text of a list item joined to the text before the list is followed by a <br> (3 subtests), Delete on the empty last line of <p>abc<br>{}<br></p> joins the next paragraph to the first line (<p>abcdef</p>, expected <p>abc<br>def</p> by Chrome and Firefox), the empty <span> of <p><span>{}</span><br></p><p>abc</p> is kept, and the results of Shift+Delete and Meta+Delete, which depend on the content left by the previous subtests, fail in every browser. 6 subtests need a selection with several ranges (table cells), which only Firefox has (the Selection API selection has at most one range)
input-events-get-target-ranges-joining-dl-element-and-another-list.tentative.htmlFail260 / 296TEST BUG36 of 296 subtests, none of which passes in Firefox. 20 results that Chrome and Safari pass: Backspace at the start of a dt or dd that follows another list moves it out of its list as a div (the delete command, for a caret at the start of the first item of a list, splits the parent and converts a dd or dt that is not an allowed child of its new ancestors to the default single-line container) instead of joining it to the last item of the list (<ul><li>list-item1</li></ul><div>list-item2</div>, expected <ul><li>list-item1list-item2</li></ul>), and a selection from a dt to the start of an item of another list moves the content of this item into the dl (delete the selection moves the children of the end block into the start block). 8 target ranges that every browser fails, and 8 subtests whose markup is not valid for the helper of the test (<dt}>: Should match number of open/close markers), which fail in every browser
input-events-get-target-ranges-joining-dl-elements.tentative.htmlFail790 / 880TEST BUG90 of 880 subtests, none of which passes in Firefox. 66 results that Chrome and Safari pass: Backspace at the start of the first dt or dd of a dl that follows another dl moves the item out of its list as a div (the delete command, for a caret at the start of the first item of a list, splits the parent and converts the item to the default single-line container) instead of joining it to the last item of the previous list (<dl><dt>list-item1</dt></dl><div>list-item2</div>, expected <dl><dt>list-item1list-item2</dt></dl>), and a selection that ends at the start of the first item of the second list merges the lists (the lists that become adjacent are merged). 24 target ranges that every browser fails: the range of the selection is returned, where the test expects it to start at the start of the first item or to end before the item
input-events-get-target-ranges-non-collapsed-selection.tentative.htmlFail165 / 210TEST BUG45 of 210 subtests (39 pass only in Firefox, 5 in no browser, 1 in the three browsers). 35 target ranges, 33 of which only Firefox computes: the range is the range of the selection (a boundary point next to a Text node is moved into it), where the test expects it extended over the collapsible white space that is deleted with the selection (<p>abc [</p><p>] def</p> expects (#text "abc", 3) - (#text "def", 3)) or ending after the <br> of an empty block; Input Events only says that the target ranges are the ranges that the event will affect. 9 results that only Firefox passes or that every browser fails: the text of a list item joined to the text before the list is followed by a <br>, which keeps the text after the list on its own line (<div>abc[<ul><li>]def</li></ul>ghi</div> gives <div>abcdef<br>ghi</div>, expected <div>abcdefghi</div>), as the delete-the-selection algorithm when the end block is a descendant of the start block. 1 subtest passes in the three browsers: typing over a selected <hr> between two spaces (<div>abc {<hr>} def</div>) is expected to remove both spaces (abcadef); the library, as the reference implementation (insertText deletes the selection, then canonicalizes the white space around the inserted text), keeps the space that follows (abca def); the deletion with Backspace or Delete passes
input-events-range-exceptions.tentative.htmlFail0 / 4NOT IMPLEMENTEDthe tentative validation of targetRanges by the InputEvent constructor (an IndexSizeError for a StaticRange whose offsets are greater than the length of its nodes), and the tentative clamping of the ranges when the event is dispatched

Crash tests

TestResultVariantsKindDescription
table-selection-crash.htmlPass1 / 1