Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 648bbc69d11cab633939f5036f9642186cd7897b
      
https://github.com/WebKit/WebKit/commit/648bbc69d11cab633939f5036f9642186cd7897b
  Author: Richard Robinson <[email protected]>
  Date:   2026-09-14 (Mon, 14 Sep 2026)

  Changed paths:
    M Source/WTF/wtf/module.modulemap
    M Source/WTF/wtf/spi/cocoa/SecuritySPI.h
    A Source/WebKit/Platform/spi/Cocoa/Network_SPI.swiftinterface
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.mm
    R Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.swift
    A Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPSProxyFramer.swift
    A Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServer.swift
    A Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServerBridging.h
    A Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServerBridging.swift
    A Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServerConnection.swift
    A Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServerCore.swift
    A Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServerRouting.swift
    A Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/TestCertificates.swift
    R Tools/TestWebKitAPI/Helpers/cocoa/HTTPServerBridging.h
    R Tools/TestWebKitAPI/Helpers/cocoa/HTTPServerBridging.swift
    R Tools/TestWebKitAPI/Helpers/cocoa/HTTPServerConnection.swift
    R Tools/TestWebKitAPI/Helpers/cocoa/HTTPServerCore.swift
    R Tools/TestWebKitAPI/Helpers/cocoa/HTTPServerRouting.swift
    M Tools/TestWebKitAPI/PlatformCocoa.cmake
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/TestWebKitAPILibrary/module.modulemap
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EventAttribution.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKContentExtensionStore.mm

  Log Message:
  -----------
  [Swift Testing] Replace the core implementation of HTTPServer with Swift 
(part 2)
https://bugs.webkit.org/show_bug.cgi?id=324100
rdar://187315673

Reviewed by Alex Christensen.

Port the logic for Https, HttpsWithLegacyTLS, HttpsProxy, 
HttpsProxyWithAuthentication, and Http2Raw.

Also move the files into an HTTPServer directory for better organization.

Also fix an existing latent issue in some tests which were reliant on the server
being leaked after being released.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EventAttribution.mm

* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.mm:
(TestWebKitAPI::useSwiftImplementation):
(TestWebKitAPI::HTTPServer::HTTPServer):
(TestWebKitAPI::m_protocol):
(TestWebKitAPI::m_listener): Deleted.
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServer.swift: Renamed from 
Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.swift.
(RouteBuilder.buildBlock(_:)):
(HTTPServer.storage):
(HTTPServer.totalRequests):
(Configuration.address):
(Configuration.localhostAddress):
(Configuration.httpsProxy):
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServerBridging.h: Renamed 
from Tools/TestWebKitAPI/Helpers/cocoa/HTTPServerBridging.h.
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServerBridging.swift: 
Renamed from Tools/TestWebKitAPI/Helpers/cocoa/HTTPServerBridging.swift.
(HTTPServerBridge.port):
(HTTPServerBridge.totalRequests):
(HTTPServerBridge.totalConnections):
(HTTPServerBridge.lastRequestCookies):
(HTTPServerBridge.sawAuthorizationHeader):
(HTTPServerBridge.startListening):
(HTTPServerBridge.cancel):
(HTTPServerBridge.terminateAllConnections):
(HTTPServerBridge.addResponse(_:forPath:)):
(HTTPServerBridge.setResponse(_:forPath:)):
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServerConnection.swift: 
Renamed from Tools/TestWebKitAPI/Helpers/cocoa/HTTPServerConnection.swift.
(NWConnection.receiveBytes(_:)):
(NWConnection.receiveHTTPRequest):
(NWConnection.send(_:)):
(NWConnection.terminate):
(contentLength(in:)):
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServerCore.swift: Renamed 
from Tools/TestWebKitAPI/Helpers/cocoa/HTTPServerCore.swift.
(connections):
(responses):
(port):
(totalConnections):
(totalRequests):
(startListening):
(cancel):
(terminateAllConnections):
(terminateIfNeeded(_:)):
(addResponse(_:for:)):
(setResponse(_:for:)):
(didReceive(_:)):
(respondToRequests(on:)):
(HTTPServerCore.makeParameters(_:identity:verifier:)):
(HTTPServerCore.makeTLSOptions(_:identity:verifier:)):
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPServerRouting.swift: Renamed 
from Tools/TestWebKitAPI/Helpers/cocoa/HTTPServerRouting.swift.
(statusCode):
(headerFields):
(behavior):
(headerFieldsFor304):
(HTTPResponseData.serialize(_:)):
(Error.path):
(Error.cookies):
(Error.authorization):
(Error.body):
(Error.isConditionalRequest):
(Error.headerValue(_:)):
(Error.statusText(_:)):
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/TestCertificates.swift: Added.
(TestCertificates.certificate):
(TestCertificates.identity):
(TestCertificates.identity2):
(TestCertificates.makeIdentity(_:certificate:)):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/TestWebKitAPILibrary/module.modulemap:
* Source/WTF/wtf/module.modulemap:
* Source/WTF/wtf/spi/cocoa/SecuritySPI.h:
* Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer/HTTPSProxyFramer.swift: Added.
(state):
(handleInput(_:definition:)):
(HTTPSProxyFramerImplementation.label):
(HTTPSProxyFramerImplementation.start(_:)):
(HTTPSProxyFramerImplementation.handleOutput(_:message:messageLength:isComplete:)):
(HTTPSProxyFramerImplementation.wakeup(_:)):
(HTTPSProxyFramerImplementation.stop(_:)):
(HTTPSProxyFramerImplementation.cleanup(_:)):
(HTTPSProxyFramer.handleInput(_:)):
(HTTPSProxyWithAuthenticationFramer.handleInput(_:)):
* Tools/TestWebKitAPI/PlatformCocoa.cmake:
* Source/WebKit/Platform/spi/Cocoa/Network_SPI.swiftinterface: Added.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EventAttribution.mm:
(TestWebKitAPI::setupSKAdNetworkTest):
(TestWebKitAPI::TEST(PrivateClickMeasurement, SKAdNetwork)):
(TestWebKitAPI::TEST(PrivateClickMeasurement, SKAdNetworkAboutBlank)):
(TestWebKitAPI::TEST(PrivateClickMeasurement, 
SKAdNetworkWithoutNavigatingToAppStoreLink)):

Canonical link: https://commits.webkit.org/321088@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to