Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7ff6fffca3d5fe5bd4818eae106c0d78c74ed2bb
https://github.com/WebKit/WebKit/commit/7ff6fffca3d5fe5bd4818eae106c0d78c74ed2bb
Author: Ian Gower <[email protected]>
Date: 2026-10-07 (Wed, 07 Oct 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/dedicated-worker.tentative.https-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/fetch.tentative.https-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/iframe.tentative.https.window_include=from-local-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/iframe.tentative.https.window_include=from-loopback-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/iframe.tentative.https.window_include=from-public-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/service-worker-background-fetch.tentative.https-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/service-worker.tentative.https-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/shared-worker.tentative.https-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/websocket.tentative.https-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/webtransport.tentative.https-expected.txt
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/mac-sequoia/TestExpectations
A
LayoutTests/platform/mac-sequoia/imported/w3c/web-platform-tests/fetch/local-network-access/dedicated-worker.tentative.https-expected.txt
A
LayoutTests/platform/mac-sequoia/imported/w3c/web-platform-tests/fetch/local-network-access/service-worker.tentative.https-expected.txt
A
LayoutTests/platform/mac-sequoia/imported/w3c/web-platform-tests/fetch/local-network-access/shared-worker.tentative.https-expected.txt
M LayoutTests/platform/win/TestExpectations
M LayoutTests/resources/testdriver-vendor.js
M Source/WebCore/Modules/fetch/LocalNetworkAccess.cpp
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
M Tools/TestRunnerShared/TestFeatures.cpp
M Tools/TestWebKitAPI/Tests/WebCore/LocalNetworkAccess.cpp
M Tools/WebKitTestRunner/TestController.cpp
Log Message:
-----------
Enable Local Network Access for the imported Local Network Access tests
https://bugs.webkit.org/show_bug.cgi?id=326145
rdar://189043424
Reviewed by Youenn Fablet.
This is Local Network Access feature work:
https://wicg.github.io/local-network-access/
Turn on Local Network Access for tests under local-network-access/.
Teach WebKitTestRunner the local-network and loopback-network permission names,
so
test_driver.set_permission can set them. WebKitTestRunner also answers
permission queries from
popups, and a newly seeded answer replaces the one WebKit recorded.
Running these tests with the feature on exposed a bug: a blob: or data: URL has
no host to resolve,
so the check refused it as an undetermined address space, and a blob: iframe or
fetch needed a
permission it could never be granted. Only a URL whose host maps to an IP
address can be a local
network request, so the check now skips any other scheme.
They also exposed that a frame lost its Local Network Access record as soon as
it started a
navigation, because the record was dropped whenever the frame stopped its
loads. A document
navigating its own frame, as a service worker's WindowClient.navigate() does,
was then judged as an
unknown, insecure client. The record is now dropped only when the frame is
destroyed.
53 of the 66 subtests now pass, covering fetches from documents and dedicated
workers, and iframe
and top-level navigations, with and without permission. The rest fail on what
is not done yet:
WebSocket, WebTransport and background fetch are not checked, shared and
service worker fetches
cannot ask the embedder, and a navigation started from another window is never
offered a prompt
(https://bugs.webkit.org/show_bug.cgi?id=326144). The network process only runs
the checks on Cocoa
ports, so they do not run on GTK, WPE and Windows.
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/dedicated-worker.tentative.https-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/fetch.tentative.https-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/iframe-opener.tentative.https-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/iframe.tentative.https.window_include=from-local-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/iframe.tentative.https.window_include=from-loopback-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/iframe.tentative.https.window_include=from-public-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/service-worker-background-fetch.tentative.https-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/service-worker.tentative.https-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/shared-worker.tentative.https-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/websocket.tentative.https-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/fetch/local-network-access/webtransport.tentative.https-expected.txt:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/mac-sequoia/TestExpectations:
*
LayoutTests/platform/mac-sequoia/imported/w3c/web-platform-tests/fetch/local-network-access/dedicated-worker.tentative.https-expected.txt:
Added.
*
LayoutTests/platform/mac-sequoia/imported/w3c/web-platform-tests/fetch/local-network-access/service-worker.tentative.https-expected.txt:
Added.
*
LayoutTests/platform/mac-sequoia/imported/w3c/web-platform-tests/fetch/local-network-access/shared-worker.tentative.https-expected.txt:
Added.
* LayoutTests/platform/win/TestExpectations:
* LayoutTests/resources/testdriver-vendor.js:
* Source/WebCore/Modules/fetch/LocalNetworkAccess.cpp:
(WebCore::checkLocalNetworkAccess):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::browsingContextRemoved):
(WebKit::NetworkConnectionToWebProcess::clearFrameLoadRecordsForStorageAccess):
* Tools/TestWebKitAPI/Tests/WebCore/LocalNetworkAccess.cpp:
(TestWebKitAPI::TEST(LocalNetworkAccess,
AURLWithoutANetworkHostIsNeverALocalNetworkRequest)):
* Tools/TestRunnerShared/TestFeatures.cpp:
(WTR::shouldEnableLocalNetworkAccess):
(WTR::hardcodedFeaturesBasedOnPathForTest):
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPlatformWebView):
(WTR::TestController::didReceiveScriptMessage):
Canonical link: https://commits.webkit.org/322999@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications