[wpt-sync] Sync PR 64218 - [dbsc] Add WPTs and browser tests for session retrieval
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox162 fixed)
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64218 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64218
Details from upstream follow.
amraboelkher <amraboelkher@chromium.org> wrote:
[dbsc] Add WPTs and browser tests for session retrieval
At present the unit tests for DeviceBoundSessionRegistrationObserver use
a fake manager, and the browser tests from part 4 bind the manager by
hand. No test registers a real session and reads it back through the
API.Add five WPTs in device-bound-session-credentials/. The API has an
explainer but no spec yet, so their names carry .tentative.
- registration-observer: the callback gets the observer and each
session's ID, refresh URL and creation time; the first call lists the
sessions that already exist and a later call holds only the new
session; repeated observe() calls neither subscribe twice nor resend
the existing sessions; after disconnect() nothing arrives, and a new
observe() gets the existing sessions again; a session scoped to
another origin of the same site is not seen.- registration-observer-abort: an AbortSignal aborted before or after
observe() stops every later callback, while an observer without a
signal still sees the session, and observe() does not restart the
observer.- registration-observer-cross-subdomain: a site-wide session that a
subdomain registers is seen from the site root.- registration-observer-opaque-origin: the constructor throws a
SecurityError in a sandboxed iframe and does not work in a data:
document.- registration-observer-not-eligible: a credentialless iframe, and an
iframe from the test's origin inside a cross-site iframe, observe
nothing and keep running, because Blink does not ask for the manager
there. The inner iframe shares the test page's origin, so it has a
session it could leak. observer_frame.html is the iframe page; with
?embed= it also holds the inner iframe.Like the rest of the directory, they run in chrome_wpt_tests
(TestLists/chrome.filter), where wptrunner runs chrome with
--enable-experimental-web-platform-features, which turns
DeviceBoundSessionJsApi on through part 4's switch override.The negative checks wait for a later session or a later observer, not
for a fixed time: the network service pushes to a document's observers
in the order they subscribed, on one pipe. Only checks where nothing
can arrive, such as an iframe whose document never binds the manager,
keep a fixed wait.Add browser tests that register a site-wide a.test session with the test
server. The fixture turns on the DeviceBoundSessionJsApi feature, which
turns on the Blink runtime flag through runtime_features.cc.
- A session registered on accounts.a.test is seen on mail.a.test after a
redirect.- An a.test iframe under b.test sees no session, while a top-level
a.test page does.- A credentialless a.test iframe sees no session, and its renderer is
not killed, because Blink does not ask for the manager.- A same-origin iframe sees the session. It commits into the window of
its initial empty document, so this checks that a kept window gets
the commit-time value.- A new a.test page commits, then cookies and site data for a.test are
blocked. The page's first observe() binds the manager after that and
sees no session, and its renderer stays alive: the setting can change
while the page is open, so it never causes a kill.- Incognito and the regular profile each register a session with their
own ID. The regular profile's first callback holds only its own
session, and a second Incognito window sees only the Incognito one.- HttpsPageBindsManager and SameSiteIframeBindsManager, from part 4,
register a session and read it back through the page's observer,
which works only if the browser bound the manager with the frame's
origin and isolation info. The part 4 tests that expect a bad message
still bind by hand, as the comment on BindManager() explains.Part 6 of 6.
Test: run_wpt_tests.py -p chrome external/wpt/device-bound-session-credentials/
Test: content_browsertests --gtest_filter=DeviceBoundSessionJsApi*
Bug: 494489935
Change-Id: If68c369f55c87b5307de53c0687376d76a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8579637
Reviewed-by: Kenichi Ishibashi \<bashi@chromium.org>
Reviewed-by: Jan Wilken Dörrie \<jdoerrie@chromium.org>
Commit-Queue: Amr Aboelkher \<amraboelkher@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1728002}
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=111114
| Assignee | ||
Comment 2•26 days ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 32 tests and 5 subtests
Status Summary
Firefox
OK : 5[GitHub] 6[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: 1[GitHub] 2[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]
FAIL: 12
Chrome
OK : 5
PASS: 1
FAIL: 12
Safari
OK : 5
PASS: 1
FAIL: 12
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /device-bound-session-credentials/allowed-refresh-initiators.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/clear-site-data.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/create-session.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/credentials-matching.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/debug-header.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/empty-response.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/federated-session.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/fetch-no-credentials.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/include-site.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/multiple-credentials.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/multiple-registrations.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/refresh-does-not-send-challenge.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/refresh-replaces-config.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/refresh-with-continue-false.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/registration-no-challenge.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/registration-sends-challenge.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/requests-have-query-params.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/resolving-urls.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/session-cookie-has-no-attributes.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/set-authorization.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/set-early-challenge.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/set-scope-origin.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/set-scope-specification.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/subdomain-registration.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/third-party-registration.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/websockets.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/registration-observer-abort.tentative.https.html [wpt.fyi]
- DeviceBoundSessionRegistrationObserver cleanly halts execution upon AbortSignal cancellation:
FAIL(Chrome:FAIL, Safari:FAIL) - DeviceBoundSessionRegistrationObserver with an already aborted signal never calls back:
FAIL(Chrome:FAIL, Safari:FAIL) - DeviceBoundSessionRegistrationObserver stops calling back once aborted after observe():
FAIL(Chrome:FAIL, Safari:FAIL)
- DeviceBoundSessionRegistrationObserver cleanly halts execution upon AbortSignal cancellation:
- /device-bound-session-credentials/registration-observer-cross-subdomain.tentative.https.html [wpt.fyi]
- A site-scoped session registered on a subdomain is observed by the site root:
FAIL(Chrome:FAIL, Safari:FAIL)
- A site-scoped session registered on a subdomain is observed by the site root:
- /device-bound-session-credentials/registration-observer-not-eligible.tentative.https.html [wpt.fyi]
- A credentialless iframe observes nothing and keeps running:
FAIL(Chrome:FAIL, Safari:FAIL) - An iframe from this origin under a cross-site iframe observes nothing and keeps running:
FAIL(Chrome:FAIL, Safari:FAIL)
- A credentialless iframe observes nothing and keeps running:
- /device-bound-session-credentials/registration-observer-opaque-origin.tentative.https.html [wpt.fyi]
- The constructor throws a SecurityError in a sandboxed iframe:
FAIL(Chrome:FAIL, Safari:FAIL)
- The constructor throws a SecurityError in a sandboxed iframe:
- /device-bound-session-credentials/registration-observer.tentative.https.html [wpt.fyi]
- DeviceBoundSessionRegistrationObserver fires upon session registration in secure context:
FAIL(Chrome:FAIL, Safari:FAIL) - DeviceBoundSessionRegistrationObserver returns existing sessions on attachment and then fires on new registrations:
FAIL(Chrome:FAIL, Safari:FAIL) - DeviceBoundSessionRegistrationObserver handles multiple concurrent observe() invocations gracefully:
FAIL(Chrome:FAIL, Safari:FAIL) - DeviceBoundSessionRegistrationObserver does not see a session scoped to another origin of the same site:
FAIL(Chrome:FAIL, Safari:FAIL) - DeviceBoundSessionRegistrationObserver stops after disconnect() and gets the existing sessions again after a new observe():
FAIL(Chrome:FAIL, Safari:FAIL)
- DeviceBoundSessionRegistrationObserver fires upon session registration in secure context:
Tests Disabled in Gecko Infrastructure
- /device-bound-session-credentials/allowed-refresh-initiators.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/clear-site-data.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/create-session.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/credentials-matching.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/debug-header.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/empty-response.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/federated-session.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/fetch-no-credentials.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/include-site.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/multiple-credentials.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/multiple-registrations.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/refresh-does-not-send-challenge.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/refresh-replaces-config.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/refresh-with-continue-false.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/registration-no-challenge.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/registration-sends-challenge.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/requests-have-query-params.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/resolving-urls.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/session-cookie-has-no-attributes.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/set-authorization.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/set-early-challenge.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/set-scope-origin.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/set-scope-specification.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/subdomain-registration.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/third-party-registration.https.html [wpt.fyi]:
SKIP - /device-bound-session-credentials/websockets.https.html [wpt.fyi]:
SKIP
Comment 4•19 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/297693a38d2a
https://hg.mozilla.org/mozilla-central/rev/306d3495870d
Description
•