Bug
1771455 [wpt PR 34230] - Prerender: Notification API no longer cancels prerender, a=testonly
Automatic update from web-platform-tests
Prerender: Notification API no longer cancels prerender
Previously, Notification API's behavior varied from the specification.
https://wicg.github.io/nav-speculation/prerendering.html#patch-notifications
This CL partially fixes this problem, by making notification API return
"default" during prerendering, and defer the corresponding Mojo
interface.
The remaining issue is that the Notification ctor is not deferred yet.
After this CL, the new workflow be like:
1. Web developers call Notification.permission => we return "default" in
the prerendering pages. [Without asking the browser process for the
permission status, as renderer can always return "default" in this case.
So no IPC would be made.
2. Finding Notification.permission returning "default", web pages have
to request permission before making notification.
3. They have to call Notification. requestPermission => this API is
deferred until prerender activation.
4. After prerendering activation, Notification.requestPermission
returns "real value" based on users' decisions. And then, developers
would call Notification() to display notifications.
Tests are updated as well.
Bug:
1280155
Change-Id: Ide70ac5d8a6bb017ba0bb8747a745fcb07145b3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
3672395
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#
1011325}
--
wpt-commits:
7e9df8dcf9218d3ed856aec6fc154b463c7666d1
wpt-pr: 34230