input-events-get-target-ranges-backspace.tentative.html | Fail | 132 / 169 | TEST BUG | 37 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.html | Fail | 1,050 / 1,264 | TEST BUG | 214 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.html | Fail | 3 / 5 | TEST BUG | 2 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.html | Fail | 2 / 3 | TEST BUG | 1 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.html | Fail | 139 / 176 | BUG, TEST BUG | 2 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.html | Fail | 260 / 296 | TEST BUG | 36 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.html | Fail | 790 / 880 | TEST BUG | 90 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.html | Fail | 165 / 210 | TEST BUG | 45 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.html | Fail | 0 / 4 | NOT IMPLEMENTED | the 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 |