Closed Bug 2080202 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63442 - [Notifications] SW popup capability delegation

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Dan Murphy <dmurph@chromium.org> wrote:

[Notifications] SW popup capability delegation

When handling a notification click, a Service Worker may need an
existing client window to open a popup (e.g. an email preview or chat
compose). Currently, window.open() in the client is blocked by the popup
blocker because the client window lacks transient user activation.

This CL allows the Service Worker to delegate popup capability to a
same-origin WindowClient via client.postMessage(msg, {delegate:
'popup'}). Upon receipt, the client window receives a 1-second transient
popup token enabling window.open(). This is decoupled from window
interaction and gated behind the CapabilityDelegationPopup feature flag.

See https://chromestatus.com/feature/5091965583622144

Bug: 542314185, b:529458813
Test: http/tests/serviceworker/clients-capability-delegation.html
Test: external/wpt/html/capability-delegation/
Test: blink_unittests --gtest_filter=WebFrameTest.CapabilityDelegation*
Change-Id: I43dcdbf25b6585f9fcdb8a49f9810037136aec5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8069089
Reviewed-by: Marijn Kruisselbrink \<mek@chromium.org>
Commit-Queue: Daniel Murphy \<dmurph@chromium.org>
Reviewed-by: Nasko Oskov \<nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1715121}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 7 tests and 1 subtests

Status Summary

Firefox

OK : 1[GitHub] 5[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 9
FAIL: 1[GitHub] 4[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 1

Safari

OK : 1
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.