[wpt-sync] Sync PR 23587 - Fix flaky test focus-without-user-activation-tentative.sub.html
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 23587 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/23587
Details from upstream follow.
Charlie Hu <chenleihu@google.com> wrote:
Fix flaky test focus-without-user-activation-tentative.sub.html
Previously the test relies on focus event bubble-up from subframe to
main frame to determine whether there is a focus event in subframe.
However, the bubble-up of focus event can be quite unreliable to
observe.The solution is to directly observe the onfocus event in iframe and
send the result back to main frame using |postMessage|.Besides, use same origin url for subframe instead of cross origin url,
because otherwise autofocus will be blocked no matter the state of
focus-without-user-activation feature policy (https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/dom/element.cc;drc=a2c2b4b601f50fc782d2c5e7e4e089beac30d327;l=530).Bug: 1067482
Change-Id: Ifaa5120350ac828a0ed04271f795360f71803191Reviewed-on: https://chromium-review.googlesource.com/2199708
WPT-Export-Revision: 832169d318853a6298b65aea077e8cbb1003ae22
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Description
•