Bug 1881960 [wpt PR 44774] - DOM: Add WPTs for removing steps, a=testonly
commitdf4d8d7f2fbc7d63f4d26ffdf216b6d5caef55c6
authorDominic Farolino <dom@chromium.org>
Sat, 2 Mar 2024 22:41:57 +0000 (2 22:41 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 4 Mar 2024 09:26:56 +0000 (4 09:26 +0000)
tree0df9fdb0fb3d2c4aea2c74d253d460684472b3a5
parentbeabcc898a865241b9e069bb0df84c88a99def39
Bug 1881960 [wpt PR 44774] - DOM: Add WPTs for removing steps, a=testonly

Automatic update from web-platform-tests
DOM: Add WPTs for removing steps

This CL adds WPTs for removing steps, to ensure that script is never
executed during the removing steps hook [1], which are invoked
synchronously during per-node removal (that is, they are not batched,
but run this way per-node).

This CL:
 1. Augments the existing iframe removing steps WPT, to include
    `pagehide` events. At the time of writing this, all browsers deviate
    from the HTML Standard, and fail this test.
 2. Adds new tests for `<input>` and `<button>` to assert that when they
    are focused and subsequently removed from the DOM, the `blur` event
    is *not* fired, per the HTML Standard. Chromium fails this test,
    while Safari and Firefox pass it.

[1]: https://dom.spec.whatwg.org/#concept-node-remove-ext

Bug: 40150299
Change-Id: I0aa43755ccac8ea432056800c5c4167d8e4460e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5323158
Commit-Queue: Dominic Farolino <dom@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1266801}

--

wpt-commits: 2c931feab8ac744f9bbe3e9550cc2fe85831fc47
wpt-pr: 44774
testing/web-platform/tests/dom/nodes/insertion-removing-steps/blur-event.window.js [new file with mode: 0644]
testing/web-platform/tests/dom/nodes/insertion-removing-steps/insertion-removing-steps-iframe.window.js