[wpt-sync] Sync PR 63668 - [WebInstallAPI] Restrict navigator.install to secure contexts
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox160 fixed)
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63668 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63668
Details from upstream follow.
Lia Hiscock <liahiscock@microsoft.com> wrote:
[WebInstallAPI] Restrict navigator.install to secure contexts
Apply SecureContext to both navigator.install overloads so the API is
absent from insecure contexts, including HTTPS frames with an insecure
ancestor. Preserve exposure on HTTPS and trustworthy HTTP localhost.Define is_in_secure_context in the binding generator's callback scope.
Secure-gated overload dispatch references this symbol, but the missing
binding previously caused generation to fail.Bug: 333795265
Change-Id: I05ab5417fe55e554918f69c0963861e275756c76
Include-Ci-Only-Tests: chromium.mac:mac26-arm64-rel-tests|browser_tests
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8544380
Reviewed-by: Robert Paveza \<Rob.Paveza@microsoft.com>
Reviewed-by: David Baron \<dbaron@chromium.org>
Commit-Queue: Lia Hiscock \<liahiscock@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1719173}
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=105369
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 5 tests and 3 subtests
Status Summary
Firefox
OK : 2[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: 2
FAIL: 1[GitHub] 17[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 : 2
PASS: 1
FAIL: 2
Safari
OK : 2
PASS: 2
FAIL: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /web-install/navigator-install-bad-inputs.tentative.https.html [wpt.fyi]
- navigator.install(url) rejects with TypeError.:
FAIL - navigator.install(url, manifestId) rejects with TypeError.:
FAIL - navigator.install({}) rejects with TypeError when manifest is missing.:
FAIL - navigator.install({manifest: ""}) rejects with TypeError for empty manifest URL.:
FAIL - navigator.install({manifest: " \t\n "}) rejects with TypeError for a whitespace-only manifest URL.:
FAIL - navigator.install({manifest: "https://["}) rejects with TypeError for invalid manifest URL.:
FAIL - navigator.install({manifest, manifestId: ""}) rejects with TypeError for empty manifestId.:
FAIL - navigator.install({manifest, manifestId: " \t\n "}) rejects with TypeError for whitespace-only manifestId.:
FAIL - navigator.install({manifest, manifestId: "https://["}) rejects with TypeError for invalid manifestId.:
FAIL - navigator.install({installurl}) rejects with TypeError when manifest is missing.:
FAIL
- navigator.install(url) rejects with TypeError.:
- /web-install/navigator-install-defined.tentative.https.html [wpt.fyi]
- navigator.install() is defined.:
FAIL(Chrome:PASS, Safari:FAIL)
- navigator.install() is defined.:
- /web-install/navigator-install-sandboxed-iframe.tentative.https.html [wpt.fyi]
- navigator.install() in sandboxed iframe (allow-scripts) should throw SecurityError.:
FAIL - navigator.install() in sandboxed iframe (allow-scripts allow-same-origin) should throw SecurityError.:
FAIL - navigator.install() in a same-origin iframe should throw InvalidStateError.:
FAIL
- navigator.install() in sandboxed iframe (allow-scripts) should throw SecurityError.:
- /web-install/navigator-install-user-activation.tentative.https.html [wpt.fyi]
- navigator.install() rejects with NotAllowedError without a user activation.:
FAIL - navigator.install({manifest}) rejects with NotAllowedError without a user activation.:
FAIL - navigator.install({manifest, installurl}) ignores installurl and rejects with NotAllowedError without a user activation.:
FAIL
- navigator.install() rejects with NotAllowedError without a user activation.:
Comment 4•1 month ago
|
||
| bugherder | ||
Description
•