editing

edit

WPT coverage of the tests of editing at the revision 5602b0f210e3. The tests link to their results in the browsers on wpt.fyi. The tentative tests (experimental features) and the reftests are listed separately from the stable tests.

GroupPassingTestsDisabledPass rate
Stable72127057%
Tentative2661043%
Reftests12050%
All99190052%

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: 33
  • TEST BUG: 53
  • NOT IMPLEMENTED: 23
  • TEST RUNNER: 1

Stable tests

TestResultSubtestsKindDescription
event.htmlFail172 / 180BUG, TEST BUGformatBlock with quasit and insertImage with an empty value fire input in Chrome and Safari only; 5 of the 8 failing subtests fail in every browser: the test expects an input event for commands that do nothing because their value is invalid (createLink, fontSize and formatBlock with an empty value, fontSize with quasit), and Changing selection from handler expects the event at the second editing host although nothing changes the selection; per the specification no event is fired when the action of the command returns false; fontSize with the value 15px is expected to fire input: the browsers parse the value with the legacy font size rules (the leading digits, 15), but the specification returns false for a value that is not a valid floating-point number, and editing/data/fontsize.js (editing/run/fontsize.html) expects 2em, 20pt and 1. to do nothing and return false, which the library passes; accepting the value here would fail these subtests
other/body-should-not-deleted-even-if-empty.htmlPass2 / 2
other/br-tag-not-added-with-inline-root-editable-element.htmlPass1 / 1
other/cefalse-boundaries-deletion.htmlPass3 / 3
other/copy-paste-before-non-editable.htmlFail0 / 1TEST BUGthe copy and the paste work (Select is inserted before something in the Text node and no child node is lost), but the expected markup hard-codes the style attribute of the untouched non-editable span as Blink re-serializes it (style="border: 1px solid gray;", with a trailing semicolon) while the source attribute is style="border: 1px solid gray", which the library leaves as is. Firefox and Safari fail the same assertion.
other/copy-paste-in-styled-inline-editing-host.https.htmlPass1 / 1
other/data_transfer_on_input_event_with_insertfrompaste_type.htmlPass1 / 1
other/delete-at-end-boundary-of-div-followed-by-inline-element-containing-hidden-select-element-with-non-editable-node.htmlFail0 / 1BUGforward delete at the end of <div id="first">First block</div> followed by <span id="second">Second block<select style="visibility:hidden"></select></span>: the test expects only the text to join the block and <span id="second"><select ...></select></span> to stay after it; the library moves the whole following line into the block (<div id="first">First block\n<span id="second">Second block<select ...></select></span></div>), as the block merging of the specification does (Chrome and Safari pass, Firefox fails).
other/delete-at-start-boundary-of-div-containing-hidden-select-element-with-non-editable-node.htmlFail0 / 1BUGBackspace at the start of <div id="second">Second block<select style="visibility:hidden"></select></div>: the test expects only the text to be merged into the previous block and <div id="second"><select ...></select></div> to remain; the library moves every child of the block, including the hidden <select>, and removes the emptied block (<div id="first">First blockSecond block<select ...></select></div>), as the block merging of the specification does (Chrome and Safari pass, Firefox fails).
other/delete-editing-host.htmlPass2 / 2
other/delete-in-inline-editing-host-under-shadow-root.htmlFail0 / 4TEST BUGthe helper of the test selects in the editing host of a shadow tree with Selection.addRange() and checks rangeCount. As the Selection API specifies, addRange() ignores a range whose root is not the document and rangeCount is 0 while the selection is in a shadow tree (it is only exposed by getComposedRanges()), so the helper throws "Failed to set selection to the given ranges" before any key is sent; Chrome and Firefox accept the range, Safari fails as the library does.
other/delete-in-last-definition-list-item-when-parent-list-is-editing-host.htmlFail5 / 16BUGBackspace or Delete in the last empty item of a list nested in a <dl contenteditable> is expected to leave one valid empty item of the host (<dd></dd> or <dd><br></dd>). Backspace only removes the nested list and leaves its item as an invalid child (<dd><li></li></dd>, <li></li> or <dt></dt> directly in the <dl>), as the algorithm of the specification does, and forward delete changes nothing (<dd><ul><li></li></ul></dd>). Only Firefox passes these 11 subtests.
other/delete-in-last-list-item-when-parent-list-is-editing-host.htmlFail12 / 28BUGBackspace or Delete in the last empty item of a list nested in a <ol contenteditable> or <ul contenteditable> is expected to leave one empty <li> of the host. Backspace in <dl><dt>{}</dt></dl> or <dl><dd>{}</dd></dl> converts the item to the default paragraph separator, which is an invalid child of the list (<ol contenteditable><div></div></ol>, as the algorithm of the specification does), and forward delete in any nested list changes nothing (<li><ul><li></li></ul></li>). Only Firefox passes these 16 subtests.
other/delete-in-shadow-hosted-in-body.htmlFail2 / 3TEST BUGfor the <div contenteditable> in the shadow tree of the body (1 of 3 subtests; the <input> and the <textarea> pass): the helper of the test selects in the editing host of a shadow tree with Selection.addRange() and checks rangeCount. As the Selection API specifies, addRange() ignores a range whose root is not the document and rangeCount is 0 while the selection is in a shadow tree (it is only exposed by getComposedRanges()), so the helper throws "Failed to set selection to the given ranges" before any key is sent; Chrome and Firefox accept the range, Safari fails as the library does.
other/delete-without-unwrapping-first-line-of-child-block.htmlFail260 / 300BUG40 of 300 subtests, all about getTargetRanges() of the Backspace and Delete keys (the DOM results pass): when the lines before a child block are deleted (abc<br>{<br><div id="child">]def<br>ghi</div>), the target range is the range of the selection, or the caret extended by one character, which ends in the first Text node of the block ((host, 2) - (#text "def", 0)); the test expects the range of what is removed, ending before the block ((host, 2) - (host, 3)). Only Firefox passes (Chrome fails them, Safari does not report them).
other/delete.htmlFail15 / 16TEST BUG1 of 16 subtests: after Backspace in the last paragraph of <p><tt>x</tt></p><p><tt><br></tt></p><p><tt><br></tt></p> the markup is the expected one, but the test requires the caret in the remaining <tt> ((<tt>, 0), the Gecko behavior); the library leaves it in the paragraph, after the <tt> ((<p>, 1)); Chrome and Safari also fail this subtest.
other/double-click-range-selection-in-floating-list-item.htmlPass2 / 2
other/double-click-range-selection-in-list-item.htmlPass2 / 2
other/editing-div-outside-body.htmlPass55 / 55
other/editing-host-with-only-out-of-flow-child.htmlPass4 / 4
other/empty-elements-insertion-padding.htmlPass1 / 1
other/empty-elements-insertion.htmlFail4 / 5BUG1 of 5 subtests: the press inside an empty <strong> without border, padding nor generated content puts the caret in the adjacent text of the editing host instead of in the empty element (it has no box that the pointer can hit), so the text of insertText is not inserted in the element. Only this subtest fails; it fails in Firefox too.
other/end-key-with-wbr.htmlFail0 / 2BUGin <wbr><wbr><span contenteditable="false">1</span><wbr><wbr><span contenteditable="false">2</span><wbr><wbr> the End key moves the caret from (div, 0) to (div, 6), after the last non-editable span, and the Home key from (div, 8) to (div, 2): the caret does not go past the <wbr> elements at the edges of the line, whereas the test expects the first and last positions of the editing host (only Chrome passes).
other/extra-text-nodes.htmlPass2 / 2
other/fire-selection-change-on-deleting-empty-element.htmlPass1 / 1
other/html-text-copy-paste-of-anchor-with-href-in-content-editable.htmlPass1 / 1
other/inline-editing-host-has-placeholder-with-after-pseudo-element.htmlPass2 / 2
other/inline-editing-host-has-placeholder-with-before-pseudo-element.htmlPass2 / 2
other/insert-br-tag-on-text-node-removal-with-non-editable-elements.htmlPass3 / 3
other/insert-space-at-beginning-of-wrapped-line.htmlPass12 / 12
other/insert-text-with-surrogate-pairs.htmlPass1 / 1
other/inserthtml-do-not-preserve-inline-styles.htmlFail51 / 54TEST BUG3 of 54 subtests (the stylesInserting=hilitecolor variant) fail in every browser: the test compares queryCommandValue("hilitecolor") with "rgb(0, 255, 255))" (two closing parentheses).
other/insertparagraph-in-non-splittable-element.htmlFail11 / 14BUG3 of 14 subtests, which only Firefox passes: with the caret set by script in a <button>, a <caption> or a <legend>, the test expects a line break in the element (<div><button><br>abc</button></div>), where the library splits the enclosing <div> (<div><br></div><div><button>abc</button></div>; for caption and legend, through the table or the fieldset, which is cloned).
other/inserttext-after-bold-in-font-face-monospace.htmlPass1 / 1
other/inserttext-last-mutation.htmlPass64 / 64
other/join-different-white-space-style-left-line-and-right-paragraph.htmlPass2,607 / 2,607
other/join-different-white-space-style-left-paragraph-and-right-line.htmlPass1,455 / 1,455
other/join-different-white-space-style-paragraphs.htmlPass3,456 / 3,456
other/join-pre-and-other-block.htmlPass426 / 426
other/legacy-edit-command.htmlPass120 / 120
other/link-boundaries-insertion.htmlPass2 / 2
other/mathml-html-serializtion-on-copy.htmlFail1 / 4TEST BUGthe copied <math> tree is pasted as MathML elements, with the white space Text nodes that the source has between its elements (<math ...>\n <mrow>\n <mi>x</mi>...); the test expects the innerHTML of the pasted <math> without any white space (<mrow><mi>x</mi><mo>+</mo>...), which is the serialization of the copy of Chrome (only Chrome passes the test).
other/merge-span-with-style-after-backspace-having-contenteditable.htmlFail0 / 1TEST BUGthe two headings are joined and the style of the moved span is preserved, but the expected markup requires the moved <span style="background-color: red;" id="space"> to lose its id attribute, an artifact of Blink and WebKit that rebuild the element from its style. The library moves the node itself, as the specification and Firefox do, and gets ...<span style="background-color: red;" id="space">space</span></h1>.
other/merge-span-with-style-after-forwarddelete-having-contenteditable.htmlPass1 / 1
other/merge-span-with-style-after-pressing-enter-followed-by-backspace-in-contenteditable-div.htmlFail0 / 1TEST BUGEnter then Backspace in <span style="background-color:red;">Back[]space</span> gives the expected structure, but the expected markup requires the style attribute of the second span to be re-serialized by the style engine (background-color: red; with a space) as Blink and WebKit do; the library clones the attribute of the split span verbatim (style="background-color:red;"), as the specification and Firefox do.
other/no-beforeinput-when-no-selection.htmlPass5 / 5
other/non-html-document.htmlPass1 / 1
other/password-bidi-dblclick.htmlPass1 / 1
other/paste-text-after-collapsible-white-space-whose-container-remove-non-first-children.htmlPass2 / 2
other/paste-with-newline-three-times.htmlPass1 / 1
other/paste_text_with_text_transform.htmlError0 / 0TEST BUGthe test asserts at load that window.testRunner, the internal test API of WebKit and Blink, is defined ("This test requires testRunner to read/write clipboard") and uses the non-standard pasteAndMatchStyle command: the harness errors before any subtest, as in Chrome, Firefox and Safari on wpt.fyi.
other/plain-text-copy-paste-of-paragraph-ending-with-non-layed-out-content.htmlPass9 / 9
other/removeformat_background_color.htmlPass6 / 6
other/restoration.htmlPass34 / 34
other/restyle-textcontrol-during-beforeinput.htmlPass2 / 2
other/select-all-and-delete-in-html-element-having-contenteditable.htmlPass12 / 12
other/selectall-in-editinghost.htmlFail3 / 4TEST BUG1 of 4 subtests: when the editing host is focused but the selection has no range, selectAll is expected to select only the content of the focused editing host; the library selects the content of the body, text before the host included, which is what the specification says for selectAll. Chrome and Safari fail this subtest too (only Firefox passes).
other/selectall-without-focus.htmlPass3 / 3
other/selection-change-not-fired-if-selection-set-to-root.htmlPass1 / 1
other/setting-value-of-textcontrol-immediately-after-hidden.htmlPass28 / 28
other/shadow_root_iteration_in_block_style.htmlFail0 / 1TEST BUGremoveFormat with the selection inside the nested editing host <span id="span" contenteditable style="color:red">world</span> is expected to clear the style attribute of that span (style=""), which only Chrome does. The span is the editing host of the selection, hence not editable, and the specification never modifies it: the library keeps style="color:red", as its reference implementation, Firefox and Safari do.
other/typing-around-link-element-after-joining-paragraphs.htmlFail32 / 48BUG16 of 48 subtests (the link contains a <b>: <p><a href style="color:rgb(0, 0, 255)"><b>foo</b></a></p><p><span ...>bar</span></p>): after Backspace or Delete has joined the paragraphs, the typed text is expected in a new <b> after the link (...<b>foo</b></a><b>XY</b><span ...>). The library gives the text the bold of the end of the link with the bold command, whose algorithm (the one of the specification, which reorders the modifiable descendants of the previous sibling) moves the <b> of the link around the link and the text: <p><b><a href ...>foo</a>XY</b><span ...>bar</span></p>. 16 pass in Firefox, 4 of them in Chrome, none in Safari.
other/undo-insertparagraph-after-moving-split-nodes.htmlPass4 / 4
plaintext-only/delete-around-linebreak-or-block-boundary.htmlPass151 / 151
plaintext-only/delete-part-of-white-spaces.htmlPass14 / 14
plaintext-only/forwardDelete-around-linebreak-or-block-boundary.htmlPass151 / 151
plaintext-only/forwardDelete-part-of-white-spaces.htmlPass14 / 14
plaintext-only/insertHTML.htmlPass80 / 80
plaintext-only/insertLineBreak.htmlPass588 / 588
plaintext-only/insertParagraph.htmlPass40 / 40
plaintext-only/insertText.htmlFail204 / 212BUG8 subtests (2 per white-space variant) type text after insertParagraph replaced the whole content of a <b> (<p><b>[AB]</b></p>): the test expects the <b> to be kept in both paragraphs (<p><b><br></b></p><p><b>a</b></p>), in the library, as in the reference algorithm, the deletion of the selection removes the <b> that it empties before the paragraph is split (<p><br></p><p>a</p>); these subtests fail in Chrome, Firefox and Safari too
plaintext-only/nested-with-contenteditable-true.htmlPass56 / 56
plaintext-only/paste-when-nested-with-contenteditable-true.https.htmlPass14 / 14
plaintext-only/paste.https.htmlPass84 / 84
plaintext-only/plaintext-only-in-designMode.htmlPass3 / 3
plaintext-only/styling-commands.htmlPass300 / 300
run/backcolor.htmlPass1,026 / 1,026
run/bold.htmlFail3,039 / 3,048TEST BUGthe 9 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox)
run/caret-navigation-after-removing-line-break.htmlPass2 / 2
run/caret-navigation-around-line-break.htmlPass20 / 20
run/caretnavigation.htmlPass2 / 2
run/createlink-with-selecting-img.htmlPass3 / 3
run/createlink.htmlPass441 / 441
run/delete-list-items-in-table-cell.htmlPass36 / 36
run/delete-to-make-editing-host-empty.htmlPass12 / 12
run/delete.htmlFail7,815 / 7,842BUG, TEST BUG10 of the 47 failing subtests (of 7842) come from behaviors of the browsers that are implemented although the data of the test expect the algorithm of the specification (every browser fails them, 8 with the result of the library in the three browsers): Backspace at the start of a <blockquote> joins its line to the previous one (foo<blockquote>[]bar</blockquote> gives foobar, expected foo<br>bar), two <li> are joined without keeping a <br> between their lines (<ol><li>foo<li>[]bar</ol> gives <ol><li>foobar</li></ol>, expected <ol><li>foo<br>bar</li></ol>; for <ol><li>foo<li>[]bar<br>baz</ol> Chrome and Safari only move the first line, the library moves the item as Firefox), and a paragraph emptied before a list item is removed instead of receiving the content of the item (<ol><li>foo</ol><p>[bar<ol><li>]baz</ol> gives two lists, expected <p>baz</p>).; the other subtests that every browser or two browsers pass: a selection from the end of an empty line to the start of a paragraph is expected to remove the line and keep the paragraph (foo<br><br>{<p>]bar</p> gives foo<br>bar, expected foo<br><p>bar</p>), the space before a deleted no-break space in another Text node is expected to become a no-break space (<b>foo </b>&nbsp;[]bar gives <b>foo </b>bar, expected <b>foo&nbsp;</b>bar), the empty line between two tables in a <font> is not deleted (<table>...</table><br>{}<br><table>...), and Backspace at the start of a <div> that follows a non-editable <span> is expected to delete the span ( <span contenteditable="false">A</span><div>[]&nbsp;; ...</div>), where the library unwraps the <div>.; 12 of the failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on a page where the styleWithCSS or defaultParagraphSeparator command of the test did not run (queryCommandState("stylewithcss") before expected false but got true); they also fail in Chrome and Safari.
run/fontname.htmlFail2,219 / 2,225TEST BUGthe 6 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox)
run/fontsize.htmlFail2,415 / 2,422TEST BUGthe 7 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox)
run/forecolor.htmlFail2,320 / 2,327BUG, TEST BUG<span style=color:brown>fo[o</span><span style=color:#0000ff>b]ar</span> expects the selected characters in one new element between the two spans (<span style="color:rgb(165, 42, 42)">fo</span><font color="#0000ff">ob</font><span style="color:rgb(0, 0, 255)">ar</span>, Chrome and Safari); the library moves o into the second span (<span style="color:rgb(165, 42, 42)">fo</span><span style="color:rgb(0, 0, 255)">obar</span>); 1 of the 7 failing subtests fails in every browser: setting the color of the outer element on [bar] of <span style="color: blue">foo<span style="color: brown">[bar]</span>baz</span> with styleWithCSS off expects the outer span to be split (<span style="color:rgb(0, 0, 255)">foo</span><font color="#0000ff">bar</font><span style="color:rgb(0, 0, 255)">baz</span>); the library only removes the inner span, as the reference algorithm; 5 of the 7 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox)
run/formatblock.htmlFail5,019 / 5,046BUG, TEST BUG4 of the 37 failing subtests pass in every browser (1) or in Chrome and Safari (3): formatBlock on the first heading of an <hgroup> is expected to replace the heading in the <hgroup> (<section><hgroup><blockquote>foo</blockquote><h2>bar</h2></hgroup>..., the library moves the new block out of the <hgroup>), <div>[foo<p>bar]</p></div> is expected to move the first line out of the <div> (<p>foo</p><div><p>bar</p></div>), and queryCommandValue("formatblock") is expected to be empty for a selection over three <p> (<p>[foo<p>bar]<p>baz, the library returns p, as for <p>[foo<p>bar], where the data expects p); formatBlock with <div> in the item of a list that is in a <div> wraps the content of the item: <div><ol><li>[foo]</ol></div> gives <div><ol><li><div>foo</div></li></ol></div>, as for <ol><li>[foo]</ol> (which the data expects), where every browser and the data leave the list unchanged (2 subtests); 11 of the 37 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox); 8 other subtests expect the behaviour of Firefox only (formatBlock returning false in an editing host that cannot contain the block, <span contenteditable> or <p contenteditable>), and 2 that fail in every browser expect queryCommandIndeterm("formatblock") to be true for a selection over the <dt> and the <dd> of a <dl>
run/forwarddelete.htmlFail7,469 / 7,491BUG, TEST BUG8 of the 46 failing subtests (of 7491) come from behaviors of the browsers that are implemented although the data of the test expect the algorithm of the specification (every browser fails them, 7 with the result of the library in the three browsers): forward delete in an empty paragraph or list item before a list removes the empty block and keeps the list (<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol> gives <ol><li>foo</li></ol><ol><li>bar</li></ol>, expected <p>bar</p>; <ol><ol><li>foo</ol><li>{}<br><ol><li>bar</ol></ol> keeps the nested list, as Chrome and Firefox).; the other subtests that every browser or two browsers pass: the line feed that starts a white-space: nowrap line after the deleted character is not removed (<div style=white-space:nowrap>[]f\nbar</div> gives \nbar, expected bar), a selection from the end of an empty line to the start of a paragraph is expected to remove the line and keep the paragraph (foo<br><br>{<p>]bar</p> gives foo<br>bar, expected foo<br><p>bar</p>), and the empty line between two tables in a <font> is not deleted (<table>...</table>{}<br><br><table>...).; 10 of the failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on a page where the styleWithCSS or defaultParagraphSeparator command of the test did not run; they also fail in Chrome and Safari.
run/hilitecolor.htmlFail1,217 / 1,218TEST BUGthe first test expects queryCommandState("stylewithcss") to be false before its commands although the page runs execCommand("styleWithCSS", false, "true") before the tests: only Firefox passes (it ignores a command run while the document has no editing host), Chrome and Safari fail too
run/indent.htmlFail1,323 / 1,329BUG, TEST BUGwith styleWithCSS the data expects what the browsers generate, <p style="margin-left:40px">abc</p> or <blockquote style="margin:0 0 0 40px; border:none; padding:0px">; the library creates a plain <blockquote>, as the specification says (2 subtests that pass in every browser); and <ol><li>foo<ol><li>bar</ol>[baz]</ol> expects the whole item to be indented (<ol><ol><li>foo<ol><li>bar</li></ol>baz</li></ol></ol>, Chrome and Firefox) where the library, as the reference algorithm, moves baz into the nested list; the test of { <span contenteditable="false">A</span> ; <span contenteditable="false">B</span> ; ... } expects one block around the text and the non-editable spans; the library, as the reference algorithm, wraps each ; between the spans in its own <blockquote> (2 subtests that fail in every browser); the first test expects queryCommandState("stylewithcss") to be false before its commands although the page runs execCommand("styleWithCSS", false, "true") before the tests: only Firefox passes (it ignores a command run while the document has no editing host), Chrome and Safari fail too
run/insert-list-items-in-table-cell.htmlFail81 / 112BUG, TEST BUGa selection that covers the cells of two rows wraps the whole table in a list item (<ol><li><table>...</table></li></ol>) where the test expects a list in each cell (only Chrome passes); toggling the list off leaves the text in a <div> in the cell (<td><div>fsdf</div></td>, expected <td>fsdf</td>, Chrome and Firefox); and a <br> inside <b> does not split the cell content in two items (<ol><li>f<b>s<br>d</b>f</li></ol>, only Firefox passes); 26 of the 31 failing subtests expect queryCommandValue("insertOrderedList") to return the state as a string ("false"/"true"), which is what Chrome and Safari return; the command has no value in the specification and the library returns the empty string, as Firefox and the reference implementation
run/inserthorizontalrule.htmlFail1,346 / 1,348TEST BUGfo[o<span contenteditable=false>bar</span>b]az expects the non-editable span of the replaced selection to be kept (fo<hr><span contenteditable="false">bar</span>az), which is the result of the reference algorithm (it never removes a non-editable node); the library deletes the selection with the span, as the browsers do when deleting (fo<hr>az); the test fails in every browser; the first test expects queryCommandState("stylewithcss") to be false before its commands although the page runs execCommand("styleWithCSS", false, "true") before the tests: only Firefox passes (it ignores a command run while the document has no editing host), Chrome and Safari fail too
run/inserthtml.htmlFail1,557 / 1,565BUG, TEST BUG2 of the 8 failing subtests, that only Chrome passes: a <span style=display:none> inserted over the content of a paragraph is followed by a <br>, which keeps the line of the paragraph (expected <p><span style="display:none"></span></p>); 5 subtests expect the behaviour of Firefox only (a <pre> inserted in a <pre> is merged: <pre>12abc34</pre>; content inserted after a <span><br></span> goes into the span), and the first test expects queryCommandState("stylewithcss") to be false before its commands although the page runs execCommand("styleWithCSS", false, "true") before the tests: only Firefox passes (it ignores a command run while the document has no editing host), Chrome and Safari fail too
run/insertimage.htmlFail961 / 962TEST BUGthe first test expects queryCommandState("stylewithcss") to be false before its commands although the page runs execCommand("styleWithCSS", false, "true") before the tests: only Firefox passes (it ignores a command run while the document has no editing host), Chrome and Safari fail too
run/insertlinebreak.htmlFail1,690 / 1,691TEST BUG4 of the 6 failing subtests insert a line break at the end of a <span> in a flex or grid container with white-space:pre and expect a line feed followed by a <br> (<span>abc\n<br></span>); the library inserts two line feeds (<span>abc\n\n</span>, the second one keeps the new line visible); these subtests fail in every browser; the first test expects queryCommandState("stylewithcss") to be false before its commands although the page runs execCommand("styleWithCSS", false, "true") before the tests: only Firefox passes (it ignores a command run while the document has no editing host), Chrome and Safari fail too
run/insertorderedlist.htmlFail1,722 / 1,761BUG, TEST BUG13 subtests that only Chrome passes expect the nested list of a converted item to stay in the item (<ul><li>[foo]<ul><li>bar</ul><li>baz</ul> gives <ol><li>foo<ul><li>bar</li></ul></li></ol><ul><li>baz</li></ul>), where the library, as the reference algorithm, gives <ol><li>foo</li></ol><ul><ul><li>bar</li></ul><li>baz</li></ul>; 3 expect a list created in a <div dir=rtl> to keep the direction on the list or the block (<ol dir="rtl"><li>abc</li></ol>, the library sets it on the item: <ol><li dir="rtl">abc</li></ol>); in an empty <div> or <p> the list is created but the text is inserted beside the empty item (<ol><li></li>abc</ol>, only Firefox passes), and a <div> that only contains a <br> is replaced by the list instead of containing it (3 subtests in total); 3 other subtests are the variant boundaries and the styleWithCSS state that the page enables before the first test; 16 of the 41 failing subtests expect queryCommandValue("insertorderedlist") to return the state as a string ("false" before, "true" after), which is what Chrome and Safari return; the command has no value in the specification and the library returns the empty string, as Firefox and the reference implementation
run/insertparagraph.htmlFail7,165 / 7,195BUG, TEST BUG3 of the 30 failing subtests. 2 subtests that Chrome and Safari pass: <div>[abc]</div> is expected to give <br><div><br></div> (the library replaces the selected text and splits the <div>). 1 passes in Chrome and Firefox (<pre>foo&#10;[]</pre>).; 27 of the 30 failing subtests expect the result of Firefox only (13) or fail in every browser (14), e.g. <span>foo[]</span>, whose data expects <div><span>foo</span></div><div><br></div> where every browser (and the library) clones the span in the new line (<div><span><br></span></div>), and the subtests that come from the split in variants by subtest index (a variant starts in the middle of a test, after the subtests that call execCommand()).
run/inserttext.htmlFail2,993 / 3,009BUG, TEST BUG4 of 16 failing subtests, that two browsers pass: the text typed over a selection that contains all the contents of <b><i> and starts with an image (abc[<b><i><img>def]</i></b>ghi) is expected out of the elements (abcdefghi, Chrome and Firefox), and <div>a<br>{}<span></span><p>c</p></div> expects the text in the next paragraph (Chrome and Safari).; 12 subtests expect the behaviour of Firefox only (10) or fail in every browser (2): e.g. <a href=/>foo[]</a>bar, whose data expects the text in the link (fooa) where the library, as the browsers for the text typed at the end of a link, inserts it after the link; the others are the variant boundaries and the styleWithCSS state that the page enables before the tests.
run/insertunorderedlist.htmlFail2,030 / 2,065BUG, TEST BUG12 subtests that only Chrome passes expect the nested list of a converted item to stay in the item (<ol><li>[foo]<ol><li>bar</ol><li>baz</ol> gives <ul><li>foo<ol><li>bar</li></ol></li></ul><ol><li>baz</li></ol>), where the library, as the reference algorithm, moves the nested list out of the new item; 5 that Chrome and Firefox pass expect the direction of a <div dir=rtl> on the list or the block (the library sets it on the item: <ul><li dir="rtl">abc</li></ul>) and a selection that ends at the start of a third block not to include it (<div>[abc</div><div>def</div><div>]ghi</div> gives three items in the library); in an empty <div> or <p> the list is created but the text is inserted beside the empty item (<ul><li></li>abc</ul>, only Firefox passes), and a <div> that only contains a <br> is replaced by the list instead of containing it (3 subtests in total); 10 of the 37 failing subtests expect queryCommandValue("insertunorderedlist") to return the state as a string ("false" before, "true" after), which is what Chrome and Safari return; the command has no value in the specification and the library returns the empty string, as Firefox and the reference implementation; 4 others are the variant boundaries and the styleWithCSS state that the page enables before the first test
run/italic.htmlFail2,069 / 2,073TEST BUGthe 4 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox)
run/justifycenter.htmlFail6,181 / 6,203TEST BUG21 of the 22 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox); the last test ({ <span contenteditable="false">A</span> ; <span contenteditable="false">B</span> ; <span contenteditable="false">C</span> }) expects one block around the text and the non-editable spans (<div style="text-align:center"> <span contenteditable="false">A</span> ; ...</div>); the library, as the reference algorithm (which never moves a non-editable node), wraps each ; between the spans in its own block; it fails in every browser
run/justifyfull.htmlFail4,745 / 4,762TEST BUG16 of the 17 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox); the last test ({ <span contenteditable="false">A</span> ; <span contenteditable="false">B</span> ; <span contenteditable="false">C</span> }) expects one block around the text and the non-editable spans (<div style="text-align:justify"> <span contenteditable="false">A</span> ; ...</div>); the library, as the reference algorithm (which never moves a non-editable node), wraps each ; between the spans in its own block; it fails in every browser
run/justifyleft.htmlFail2,497 / 2,503TEST BUGthe 6 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox)
run/justifyright.htmlFail4,797 / 4,814TEST BUG16 of the 17 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox); the last test ({ <span contenteditable="false">A</span> ; <span contenteditable="false">B</span> ; <span contenteditable="false">C</span> }) expects one block around the text and the non-editable spans (<div style="text-align:right"> <span contenteditable="false">A</span> ; ...</div>); the library, as the reference algorithm (which never moves a non-editable node), wraps each ; between the spans in its own block; it fails in every browser
run/misc.htmlFail422 / 423TEST BUGthe first test expects queryCommandState("stylewithcss") to be false before its commands although the page runs execCommand("styleWithCSS", false, "true") before the tests: only Firefox passes (it ignores a command run while the document has no editing host), Chrome and Safari fail too
run/multitest.htmlFail9,856 / 10,092BUG, TEST BUGabout 54 subtests, nearly all in the last variant (26 pass in every browser, 15 in Chrome and Firefox, 12 in Chrome and Safari), check the style of the text typed after another command: the line break of insertLineBreak over a selection that ends in inline elements is expected before them (abc<br><b><i>def</i></b>ghi, the library gives abc<b><i><br>def</i></b>ghi), the font elements of several value commands are expected merged in one (<font color="#ff0000" face="monospace" size="7">) or in a fixed order (italic then bold then typing expects <i><b>, the library gives <b><i>), and the text typed after a deletion that joins two blocks is expected in the inline element of the end of the first block (<span style="color:rgb(0, 0, 255)">fooA</span>).; about 156 of the 241 failing subtests expect elements where the library generates CSS ([["bold",""],["inserttext","a"]] on foo[]bar expects foo<b>a</b>bar, the library gives foo<span style="font-weight:bold">a</span>bar): the page runs execCommand("styleWithCSS", false, "true") before the tests but the expectations were generated with the flag off; only Firefox passes 82 of them (it ignores a command run while the document has no editing host), the 74 others fail in every browser (17 of them also expect <s> for strikethrough, 7 <p> separators); 17 other subtests expect <p> where the default paragraph separator is div ([["italic",""],["insertparagraph",""]] on foo[]bar expects <p>foo</p><p>bar</p>): the data was generated with defaultParagraphSeparator left to p by a previous group of tests; they fail in every browser
run/outdent.htmlFail2,544 / 2,550BUG, TEST BUG<blockquote><ol><li>foo<div><ol><li>[bar]</ol></div><li>baz</ol></blockquote> expects the three items in one list (<blockquote><ol><li>foo</li><li>bar</li><li>baz</li></ol></blockquote>), which is what the reference algorithm gives; the library gives <blockquote><div>foo</div><div><ol><li>bar</li></ol></div><ol><li>baz</li></ol></blockquote> (2 subtests, which fail in every browser too); 4 of the 6 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox)
run/removeformat.htmlFail1,831 / 1,832TEST BUGthe first test expects queryCommandState("stylewithcss") to be false before its commands although the page runs execCommand("styleWithCSS", false, "true") before the tests: only Firefox passes (it ignores a command run while the document has no editing host), Chrome and Safari fail too
run/strikethrough.htmlFail2,123 / 2,147BUG, TEST BUG1 of the 24 failing subtests, that Chrome and Safari pass: foo<s>ba[r</s>b]az is expected to remove the decoration of the selected text (foo<s>ba</s>rbaz), the library extends the <s> to the text that follows (foo<s>barb</s>az), as the specification (the selection is not all struck through).; 19 subtests expect the output of one engine: Firefox (and for 2 of them Safari) merges the decorations in one declaration (foo<span style="text-decoration:underline line-through">bar</span>baz, 8 subtests), Chrome serializes text-decoration-line and rewrites <s style="text-decoration: underline"> as <u><strike> (9 subtests, e.g. fo<span style="text-decoration-line:line-through">obarb</span>az where the library serializes text-decoration:line-through), and 5 mix both and fail in every browser; 4 of the 24 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox)
run/subscript.htmlFail1,240 / 1,241TEST BUGthe first test expects queryCommandState("stylewithcss") to be false before its commands although the page runs execCommand("styleWithCSS", false, "true") before the tests: only Firefox passes (it ignores a command run while the document has no editing host), Chrome and Safari fail too
run/superscript.htmlFail1,272 / 1,273TEST BUGthe first test expects queryCommandState("stylewithcss") to be false before its commands although the page runs execCommand("styleWithCSS", false, "true") before the tests: only Firefox passes (it ignores a command run while the document has no editing host), Chrome and Safari fail too
run/typing-text-in-direct-child-of-editing-host.htmlPass16 / 16
run/underline.htmlFail2,136 / 2,147BUG, TEST BUG7 of the 11 failing subtests expect the new decoration to be combined with the one of the selected element in one declaration when styleWithCSS is on (foo<s>[bar]</s>baz expects foo<span style="text-decoration:underline line-through">bar</span>baz, the library gives foo<s><span style="text-decoration:underline">bar</span></s>baz), or the remaining part of a <u> to stay a <u> when the selection ends after it (foo<u>ba[r</u>]baz expects foo<u>ba</u>rbaz, the library recreates it as <span style="text-decoration:underline">, as it must for <u>foo[bar]baz</u> where the data expects spans): 1 passes in every browser, 1 in Firefox and Safari, 5 in Firefox only.; 4 of the 11 failing subtests come from the split in variants by subtest index (?1001-2000...): a variant starts in the middle of a test, after the subtests that call execCommand(), so the result and the states are checked on content that was never modified, and the next test expects the styleWithCSS/defaultParagraphSeparator state left by commands that the variant did not run; the first test of the file also expects styleWithCSS to be off although the page turns it on before the tests (most of them fail in Chrome and Safari too, and half of them in Firefox)
run/undo-redo-after-mutation.htmlPass7 / 7
run/undo-redo.htmlPass69 / 69
run/unlink.htmlPass395 / 395
whitespaces/delete-chars-following-collapsible-white-space.htmlFail38 / 41BUG3 of 41 subtests, that only Firefox passes: when the last characters of a line that ends with a <br> are deleted after a space (<p>abc d[]<br></p> with Backspace, <p>abc def[]<br></p> with Ctrl+Backspace), the space that now ends the line becomes a no-break space before the <br> (<p>abc&nbsp;<br></p>, as in Chrome and Safari); the test accepts <p>abc <br></p> or <p>abc&nbsp;</p>.
whitespaces/delete-last-word-in-inline-block-editing-host.htmlPass1 / 1
whitespaces/delete-word-around-span.htmlPass24 / 24
whitespaces/forwarddelete-chars-following-collapsible-white-space.htmlFail38 / 41BUG3 of 41 subtests, that only Firefox passes: when the last characters of a line that ends with a <br> are deleted after a space (<p>abc d[]<br></p> with Delete, <p>abc def[]<br></p> with Ctrl+Delete), the space that now ends the line becomes a no-break space before the <br> (<p>abc&nbsp;<br></p>, as in Chrome and Safari); the test accepts <p>abc <br></p> or <p>abc&nbsp;</p>.
whitespaces/forwarddelete-word-around-span.htmlPass24 / 24
whitespaces/inserttext-at-end-of-block-when-br-always-block.htmlPass1 / 1
whitespaces/keep-collapsible-white-space-after-web-app-delete-padding-br.htmlPass4 / 4
whitespaces/keep-typed-collapsible-white-space-visible-after-muation.htmlPass2 / 2

Tentative tests

TestResultSubtestsKindDescription
edit-context/edit-context-attach-after-focus.tentative.htmlFail0 / 1NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-basics.tentative.htmlFail0 / 10NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-bidi-caret-association.tentative.htmlError0 / 0NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-delete-whitespace.tentative.htmlFail0 / 1NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-execCommand.tentative.https.htmlFail0 / 4NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-focus.tentative.htmlFail0 / 1NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-inheritability.tentative.htmlError0 / 0NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-input.tentative.htmlFail0 / 14NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-paste-handler-changes-active.tentative.htmlFail0 / 5NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-paste-html.tentative.htmlError0 / 0NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-property.tentative.htmlFail1 / 6NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-selection-outside-host.tentative.htmlError0 / 0NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-textformat.tentative.htmlFail0 / 2NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
edit-context/edit-context-undo-redo.tentative.htmlFail0 / 2NOT IMPLEMENTEDthe EditContext API (EditContext, TextFormat, HTMLElement.editContext, the textupdate/textformatupdate/characterboundsupdate events): EditContext is not defined; these tentative tests only pass in Chrome
other/cloning-attributes-at-splitting-element.tentative.htmlPass60 / 60
other/copy-elements-with-css-vars.tentative.htmlFail1 / 2NOT IMPLEMENTEDthe text/html data written by the copy action is the plain serialization of the selection, without the computed styles inlined: the <span> and the table styled through custom properties are pasted as elements without a style attribute (span.style.getPropertyValue("font-size") is the empty string, expected 18px; color: rgb(0, 0, 255), padding: 12px...). Only Chrome passes.
other/delete-in-child-of-head.tentative.htmlFail28 / 68TEST BUG, NOT IMPLEMENTED32 of the 40 failures also fail in Chrome, Firefox and Safari: joining two <div> of an editable <head> that are separated by an invisible <meta>, <title>, <style>, <script>, <link>, <base> or <template> is expected to keep that element, and a visible <title> followed by a <div> is expected not to be joined; the library deletes the invisible element with the selected range (<head><title>iframe</title><div>abcdef</div></head>), as the delete algorithm of the specification does.; the <title> elements are not treated as unjoinable blocks (8 failures, only Firefox passes): delete or forward delete between two <title style="display:block">, or between a <div> and a visible <title>, merges them (<title>abcdef</title>, <div>abcdef</div>) where the test expects both elements to be kept.
other/delete-in-child-of-html.tentative.htmlFail30 / 46TEST BUG16 of the 18 failures also fail in Chrome, Firefox and Safari: joining a <div> inserted between <head> and <body> with the content of the <body> is expected to move the text into the <body> (<body>abcdef</body>); the library, as the delete algorithm of the specification, moves the content of the body into the <div> and removes the emptied <body> (<head>...</head><div>abcdef</div>).
other/edit-in-textcontrol-immediately-after-hidden.tentative.htmlPass24 / 24
other/editable-state-and-focus-in-assigned-slot-dom.tentative.htmlPass1 / 1
other/editable-state-and-focus-in-shadow-dom-in-designMode.tentative.htmlFail23 / 29BUG6 of 29 subtests. The A typed after Selection.collapse() into the text of the focused <div contenteditable> of a shadow tree is not inserted (2 subtests, Firefox and Safari pass): the selection in the shadow tree has no range.; the Select All shortcut in a shadow tree of a document in design mode (4 subtests, Chrome and Firefox pass): the selection is in the shadow tree, where the library does not expose a range (rangeCount is 0), and the shortcut selects the children of the body ((<body>, 0) - (<body>, 11)) instead of the children of the shadow root or of its editing host.
other/editing-around-select-element.tentative.htmlPass111 / 111
other/editing-style-of-range-around-void-element-child.tentative.htmlFail6 / 8TEST BUG2 of 8 subtests: bold on a range from a text node appended to <meta style="font-weight: bold"> to the middle of the following text is expected to remove the style of the <meta> (<meta><b>b</b>ar), an expectation "based on Chromium" for an edge case according to the test itself. The library, as the specification, only makes the non-bold selected text bold and keeps the attribute (<meta style="font-weight: bold"><b>b</b>ar); Firefox fails the same subtests.
other/exec-command-never-throw-exceptions.tentative.htmlPass6 / 6
other/exec-command-with-text-editor.tentative.htmlFail2,026 / 2,094TEST BUG30 of the 68 failures (10 per variant): the test expects styleWithCSS and defaultParagraphSeparator to be disabled (and to return false, their state staying unchanged) while an <input> or a <textarea> that is not in editable content is focused; only Firefox does that, the library sets the state of the document whatever is focused, as Chrome and Safari do and as the specification says (the miscellaneous commands are always enabled). 6 more expect queryCommandValue("defaultParagraphSeparator") to be p after the command although the test also expects the command to fail (they fail in every browser).; 12 failures: queryCommandEnabled("undo") and queryCommandEnabled("redo") are expected to be true before the test has edited the value (the value was just set by a script, which clears the undo history of the control, as the test itself says). undo passes in Chrome and Safari only, which always enable it in a text control; redo fails in every browser. The undo and the redo themselves work (the value, the selection and the historyUndo/historyRedo input events pass).; 20 failures of the password variant: the test expects cut and copy to be enabled and to cut or copy the selected text of an <input type=password>, and the following paste to insert the text that was copied. No browser copies the text of a password field (the subtests on the value and on the deleteByCut event fail in the three browsers); the library does not enable the commands there.
other/exec-command-without-editable-element.tentative.htmlFail414 / 434TEST BUGthe 20 failures: in a document without editable element the test expects execCommand("styleWithCSS") and execCommand("defaultParagraphSeparator") to return false and to leave the state of the document unchanged; only Firefox does that. The library sets the state, as Chrome and Safari do and as the specification says (the miscellaneous commands are always enabled); 2 of them (queryCommandValue("styleWithCSS") expected to be the string true) fail in every browser.
other/formatblock-preserving-selection.tentative.htmlPass288 / 288
other/indent-preserving-selection.tentative.htmlPass24 / 24
other/input-in-text-control-which-is-also-editing-host.tentative.htmlPass16 / 16
other/insert-list-preserving-selection.tentative.htmlPass92 / 92
other/insert-paragraph-in-void-element.tentative.htmlFail64 / 72TEST BUG8 of 72 subtests fail in every browser: for a caret set in an <embed> or a <wbr> in an <h1>, the second paragraph is expected to be a <div> (<h1><br></h1><div><embed></div>) where the library keeps the heading for the content that follows the caret (<h1><br></h1><h1><embed></h1>), and for a <br> alone in an <li> the test expects a second list item where the library, as the specification for an empty item, moves the item out of the list (<div><br></div>).
other/insert-text-in-void-element.tentative.htmlFail31 / 48BUG17 of 48 subtests, with the caret set by script in a void element that follows an inline element: the text is inserted before the void element (<div>abc<span></span>def<br></div>), where the test expects it at the end of the previous text, before or in the preceding <span> (<div>abcdef<span></span><br></div>, <div><span>abcdef</span><br></div>). 11 pass in Chrome and Safari, 2 in Chrome only, 1 in Firefox only, 3 fail in every browser.
other/insertlinebreak-with-white-space-style.tentative.htmlPass552 / 552
other/insertparagraph-in-child-of-head.tentative.htmlFail24 / 72TEST BUGthe 48 failing subtests fail in Chrome, Firefox and Safari: insertParagraph in a <title>, <style> or <script> styled display:block in an editable <head> is expected to keep the element whole and to insert at most line feeds in it (<title>ab\ncd</title>). The library treats them as inline content of the <head>: it wraps the line in the default paragraph separator and splits the element (<head><div><title>ab</title></div><div><title ...>cd</title></div></head>).
other/insertparagraph-in-child-of-html.tentative.htmlPass72 / 72
other/insertparagraph-in-editing-host-cannot-have-div.tentative.htmlFail360 / 420BUG, TEST BUG60 of 420 subtests, about an element that is a block only by its style in an editing host that cannot contain the paragraph separator (<span> or <p>): <span style="display:block">a[]b</span> is expected to be split in two spans (<span style="display:block">a</span><span style="display:block">b</span>), where the library, which only splits the single-line containers of the specification (div, p, li...), inserts a <br> (or a line feed when white-space preserves it) as Firefox does: 24 subtests pass in Chrome and Safari (host <p>), 24 fail in every browser (host <span>).; 12 of the 60 failing subtests fail in every browser: <div style="display:inline">a[]b</div> without white-space on the div is expected to get a line feed (a\nb) even when the white-space of the editing host is normal, where the library (as the browsers) inserts a <br>.
other/insertparagraph-in-inline-editing-host.tentative.htmlPass880 / 880
other/insertparagraph-with-white-space-style.tentative.htmlPass1,104 / 1,104
other/justify-preserving-selection.tentative.htmlPass160 / 160
other/keeping-attributes-at-joining-elements.tentative.htmlFail208 / 224BUGwhen <div style="font-size:0.8rem">abc</div> and <div style="font-weight:bold">def</div> (or two <li>, <dt>... with these styles) are joined, the restoration of the recorded values of the moved text pushes the font-size of the left block down to its content and removes its style attribute (<div><span style="font-size: 0.8rem;">abc</span><b>def</b></div>), as the algorithm of the specification does. The test expects the left block to keep its attribute, so leftNode.getAttribute("style").includes() throws on null (16 of 224 subtests, all browsers pass).
other/outdent-preserving-selection.tentative.htmlPass62 / 62
other/paste-as-plaintext-data.tentative.https.htmlPass6 / 6
other/paste-clipboard-change.tentative.htmlFail0 / 4NOT IMPLEMENTEDthe test expects a paste to be aborted (nothing is pasted) when a listener of its paste or beforeinput event writes other content to the clipboard; only Chrome does that. The library has no such check and the text of the clipboard is pasted: in the <input> of the id=text variant (Original text in the first subtest, New text in the second one) and in the editing host of the id=contenteditable variant (New text, then Original text).
other/paste-in-list-with-inline-style.tentative.htmlFail0 / 1NOT IMPLEMENTEDthe text/html data written by the copy action is the serialization of the selected range, without the formatting of its ancestors: selecting the text of <span style="font-weight: bold;">copy this</span> copies copy this, which is pasted in the list item as text, where the test expects <span style="font-weight: 700;">copy this</span> (the computed style that Chrome inlines in the copied HTML; only Chrome passes).
other/paste-multiline-text-as-plaintext.tentative.https.htmlPass3 / 3
other/recursive-exec-command-calls.tentative.htmlPass1 / 1
other/removing-inline-style-specified-by-parent-block.tentative.htmlPass12 / 12
other/typing-around-link-element-at-collapsed-selection.tentative.htmlFail234 / 268BUG34 of 268 subtests (variants with a <b> or <i> in the link); none passes in Chrome or Firefox. 16 pass in Safari only: the text typed at a boundary of <a href><b>abc</b></a> is expected in a <b> that is moved around the link (<p><b>XY<a href="about:blank">abc</a></b></p>), where the library keeps the link as it is and gives the text the formatting of the caret (<p><a href="about:blank"><b>abc</b></a><b>XY</b></p>, or <b><i>XY</i><a ...> instead of <b><i>XY<a ...>). 18 fail in every browser (e.g. after the deletion of the character before <a href><b>abc</b></a>, the text is expected in a new <b> around the link: the library inserts it before the link, unformatted).
other/typing-around-link-element-at-non-collapsed-selection.tentative.htmlPass188 / 188
other/typing-space-in-editable-button.tentative.htmlFail3 / 4NOT IMPLEMENTED, TEST RUNNERSelection.collapse() into an editing host does not focus it: in the first subtest the caret is put in <button contenteditable> without focus(), so the Space key is dispatched to the body and no click is fired on the button (Safari fails this subtest too).; the emulated Space key is inserted as text in the editable content when the focused element is an editable <button>: the label of the focused button in <div contenteditable> becomes HelloWorld, where the browsers let the button handle the key (a click is fired and the label is unchanged).
other/typing-space-in-editable-summary.tentative.htmlPass4 / 4
whitespaces/chrome-compat/delete-img.tentative.htmlPass7 / 7
whitespaces/chrome-compat/delete-to-join-blocks.tentative.htmlFail12 / 18TEST BUG6 of 18 subtests expect the structure that only Chrome produces when a child block is joined with the text of its parent (<div>a<div>[]&nbsp;&nbsp;&nbsp;b</div></div> expects the outer <div> to be removed: a&nbsp; &nbsp;b; <div><div>a</div>[]&nbsp;&nbsp;&nbsp;b</div> expects the inner one to be removed); the library keeps the blocks, as Firefox and Safari (the white space is the expected one).
whitespaces/chrome-compat/delete.tentative.htmlPass584 / 584
whitespaces/chrome-compat/forwarddelete-img.tentative.htmlPass7 / 7
whitespaces/chrome-compat/forwarddelete-to-join-blocks.tentative.htmlFail14 / 18TEST BUG4 of the 6 failing subtests (of 18) expect the structure that only Chrome produces when a child block is joined with the text of its parent (<div>a[]<div>&nbsp;&nbsp;&nbsp;b</div></div> expects a&nbsp; &nbsp;b); the library keeps the outer block, as Firefox and Safari.
whitespaces/chrome-compat/forwarddelete.tentative.htmlPass602 / 602
whitespaces/chrome-compat/insert-or-paste-image.tentative.htmlFail12 / 36NOT IMPLEMENTED24 of 36 subtests (8 per variant: insertImage, insertHTML and the paste of a copied <img>; 22 pass in Chrome and Firefox only, 2 in every browser): the white-space normalization of Chromium after an image is inserted over a selection, e.g. the no-break spaces that follow the image are expected untouched or alternated with spaces, where the deletion of the selection writes the canonical space sequence of the specification. The insertions at a caret leave the white space as it is and pass.
whitespaces/chrome-compat/insertlinebreak.tentative.htmlFail1 / 11NOT IMPLEMENTEDthe white-space normalization of Chromium that these tentative tests describe (a sequence starts with a no-break space, then alternates spaces and no-break spaces, and ends with a no-break space at the end of the text node; the text before a deleted or inserted node is not touched): the library rewrites the spaces on both sides of the inserted <br> as canonical space sequences of the specification (a&nbsp;&nbsp;[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b gives a &nbsp;<br> &nbsp; &nbsp; &nbsp; b, expected a&nbsp;&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp;b); every browser passes
whitespaces/chrome-compat/insertparagraph.tentative.htmlPass11 / 11
whitespaces/chrome-compat/inserttext.tentative.htmlFail43 / 223NOT IMPLEMENTED180 of 223 subtests (156 pass in Chrome and Firefox only, 24 in every browser): the white-space normalization of Chromium that these tentative tests describe. A typed space becomes a no-break space when it is next to another white space or at a boundary of its text node, and the other characters are left as they are (a<span>b[]</span>c gives a<span>b&nbsp;</span>c, &nbsp; []b gives &nbsp; &nbsp;b); the library writes the canonical space sequence of the editing specification over the whole run of spaces around the caret, across the inline elements, with a no-break space only where a space would collapse (a<span>b </span>c, &nbsp;&nbsp; b), and converts a typed no-break space as well.

Reftests

TestResultVariantsKindDescription
edit-context/edit-context-canvas-caret.tentative.htmlFail0 / 1NOT IMPLEMENTEDthe EditContext API (EditContext is not defined): the canvas of the test does not become an editing host and focus() does not focus it, so it has no focus ring, unlike the focused canvas of the reference (autofocus tabindex=0, outline: auto)
plaintext-only/backspace-end-of-plaintext-only-pre.htmlPass1 / 1