Bug 1882451 [wpt PR 44825] - Re-do close watcher user activation tests, a=testonly
commita43638ced94e828368201937d05dc213d4706424
authorDomenic Denicola <domenic@chromium.org>
Mon, 4 Mar 2024 18:16:53 +0000 (4 18:16 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Tue, 12 Mar 2024 07:05:47 +0000 (12 07:05 +0000)
tree5e766286ddb598175d6bf3fcff38469b04a82b1f
parent60ebbff9ee72f660a874a84fad80f1899eeea1b7
Bug 1882451 [wpt PR 44825] - Re-do close watcher user activation tests, a=testonly

Automatic update from web-platform-tests
Re-do close watcher user activation tests

The tests were not accurate, because multiple tests in the same file
would result in leftover user activation, corrupting the results.

Additionally, the tests were not exhaustive enough to catch the cases
discussed in https://crbug.com/41484805. Furthermore, the initial
attempt to fix those cases, in
https://chromium-review.googlesource.com/c/chromium/src/+/5187183,
broke our desired invariant, that the number of Android back button
presses/gestures to escape the current page would be at most the
number of user interactions + 2: it made it possible to trap the user
and require infinite back presses/gestures.

The new tests are sufficiently exhaustive and systematic. The test
expectations added here show that we are not currently sending some of
the cancel events that we could, i.e. that issue 41484805 is not
fixed. A future CL will make all the tests pass.

Another bug discovered in this whole process is that the grouping
mechanism interacts poorly with destroying close watchers. Because "is
grouped with previous" is tracked on the close watcher, once the
close watcher is destroyed, groups can get collapsed together. This is
illustrated by the new nynn-destroy.html test failure. A future CL
will fix it.

Bug: 41484805
Change-Id: Iec4ee5f195640cbae60a3b1aa6127cb0f9cf7ba0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5318859
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1267687}

--

wpt-commits: 5512cdbee7c5b5ceafbe5a15eed289aaab0e54f3
wpt-pr: 44825
34 files changed:
testing/web-platform/tests/close-watcher/closewatcher-dialog-popover.html [deleted file]
testing/web-platform/tests/close-watcher/resources/helpers.js
testing/web-platform/tests/close-watcher/user-activation-CloseWatcher.html [deleted file]
testing/web-platform/tests/close-watcher/user-activation-multiple-plus-free.html [deleted file]
testing/web-platform/tests/close-watcher/user-activation-shared.html [deleted file]
testing/web-platform/tests/close-watcher/user-activation/n-activate-preventDefault.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/n-activate.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/n-closerequest-n.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/n-destroy-n.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/n.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/nn-activate-CloseWatcher.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/nn-activate-dialog.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/nn.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/nnn-CloseWatcher-dialog-popover.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/nnn-popovers.html [copied from testing/web-platform/tests/close-watcher/popover-closewatcher-multiple-plus-free.html with 56% similarity]
testing/web-platform/tests/close-watcher/user-activation/nnn.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/ny-activate-preventDefault.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/ny.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/nyn-popovers.html [moved from testing/web-platform/tests/close-watcher/popover-closewatcher-multiple-plus-free.html with 89% similarity]
testing/web-platform/tests/close-watcher/user-activation/nyn.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/nynn-destroy.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/nynn.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/nyyn.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/nyyyn.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/y.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/yn-activate.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/yn.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/ynn.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/yy.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/yyn.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/yyy-CloseWatcher-dialog-popover.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/yyy-activate-CloseWatcher-dialog-popover.html [new file with mode: 0644]
testing/web-platform/tests/close-watcher/user-activation/yyy-popovers.html [moved from testing/web-platform/tests/close-watcher/popover-closewatcher.html with 70% similarity]
testing/web-platform/tests/close-watcher/user-activation/yyy.html [new file with mode: 0644]