Closed Bug 1574302 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 18470 - Amend test_designMode to accept either empty string or br tag

Categories

(Testing :: geckodriver, task, P4)

task

Tracking

(firefox72 fixed)

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 18470 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/18470
Details from upstream follow.

Julian Kung <juliankung@chromium.org> wrote:

Amend test_designMode to accept either empty string or br tag

This pull request is a continuation of this merged and then reverted pull request.

The innerHTML property should be an empty string according to the W3C spec here: element clear.

The clear should follow the "To clear a content editable element" subroutine, which states:

Set element’s innerHTML IDL attribute to an empty string.

In the reverted PR,I replaced the <br> tag with an empty string. This PR, however, accepts both. This change is necessary because, according to the spec, the element should return an empty string for its innerHTML after its contents are cleared, so the test should be able to pass if the element's innerHTML is an empty string (correct behavior with respect to the spec).

In the closed PR linked above, it's said that all Firefox, Chrome, and Safari show a <br> tag for empty content-editable elements in developer tools. I was able to reproduce this in Firefox but was unable to reproduce it in Chrome (Chrome gave the empty string "" whereas Firefox gave the <br> tag). I did not attempt reproducing in Safari.

Component: web-platform-tests → geckodriver
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a1c2f40ebbc8
[wpt PR 18470] - Amend test_designMode to accept either empty string or br tag, a=testonly
Result changes from PR not available.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.