Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: b66901d110655e63b24e80f32f4b19cd69f0ab52 https://github.com/WebKit/WebKit/commit/b66901d110655e63b24e80f32f4b19cd69f0ab52 Author: Matthew Finkel <sys...@apple.com> Date: 2024-01-26 (Fri, 26 Jan 2024)
Changed paths: M LayoutTests/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https.html M Source/WebCore/page/Page.cpp M Source/WebCore/page/Page.h M Source/WebCore/page/PageConfiguration.h M Source/WebCore/page/csp/ContentSecurityPolicy.cpp M Source/WebKit/Shared/WebPageCreationParameters.h M Source/WebKit/Shared/WebPageCreationParameters.serialization.in M Source/WebKit/UIProcess/API/APIPageConfiguration.h M Source/WebKit/UIProcess/API/C/WKPageConfigurationRef.cpp M Source/WebKit/UIProcess/API/C/WKPageConfigurationRef.h M Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm M Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h M Source/WebKit/UIProcess/WebPageProxy.cpp M Source/WebKit/WebProcess/WebPage/WebPage.cpp M Source/WebKitLegacy/mac/WebView/WebView.mm M Source/WebKitLegacy/mac/WebView/WebViewPrivate.h M Tools/DumpRenderTree/TestOptions.cpp M Tools/DumpRenderTree/TestOptions.h M Tools/DumpRenderTree/mac/DumpRenderTree.mm M Tools/TestRunnerShared/TestFeatures.cpp M Tools/TestRunnerShared/TestFeatures.h M Tools/WebKitTestRunner/TestController.cpp M Tools/WebKitTestRunner/TestOptions.cpp M Tools/WebKitTestRunner/TestOptions.h M Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm Log Message: ----------- Set insecure/secure ports for upgrading requests in LayoutTests https://bugs.webkit.org/show_bug.cgi?id=267872 rdar://121388492 Reviewed by Alex Christensen. Some requests are "upgradable" from insecure to secure (e.g., HTTP -> HTTPS) by the engine before the resource is loaded. Currently, the only way to test this is by using a URL with the insecure scheme but using the secure port (e.g., http: and port 443). This change adds the capability to test this behavior while using URLs that are valid. A current example of this is for testing requests where the document's CSP declared the 'upgrade-insecure-requests' policy. In the future, this will help with testing upgrading mixed-content. * LayoutTests/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https.html: * Source/WebCore/page/Page.cpp: (WebCore::Page::setPortsForUpgradingInsecureSchemeForTesting): (WebCore::Page::portsForUpgradingInsecureSchemeForTesting const): * Source/WebCore/page/Page.h: * Source/WebCore/page/PageConfiguration.h: * Source/WebCore/page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::upgradeInsecureRequestIfNeeded const): * Source/WebKit/Shared/WebPageCreationParameters.h: * Source/WebKit/Shared/WebPageCreationParameters.serialization.in: * Source/WebKit/UIProcess/API/APIPageConfiguration.h: (API::PageConfiguration::setPortsForUpgradingInsecureSchemeForTesting): (API::PageConfiguration::portsForUpgradingInsecureSchemeForTesting const): * Source/WebKit/UIProcess/API/C/WKPageConfigurationRef.cpp: (WKPageConfigurationSetPortsForUpgradingInsecureSchemeForTesting): * Source/WebKit/UIProcess/API/C/WKPageConfigurationRef.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration _portsForUpgradingInsecureSchemeForTesting]): (-[WKWebViewConfiguration _setPortsForUpgradingInsecureSchemeForTesting:]): * Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::m_historyItemClient): * Source/WebKitLegacy/mac/WebView/WebView.mm: (-[WebView _setPortsForUpgradingInsecureSchemeForTesting:withSecurePort:]): * Source/WebKitLegacy/mac/WebView/WebViewPrivate.h: * Tools/DumpRenderTree/TestOptions.cpp: (WTR::TestOptions::keyTypeMapping): (WTR::TestOptions::uint16TestRunnerFeatureValue const): * Tools/DumpRenderTree/TestOptions.h: (WTR::TestOptions::insecureUpgradePort const): (WTR::TestOptions::secureUpgradePort const): * Tools/DumpRenderTree/mac/DumpRenderTree.mm: (runTest): * Tools/TestRunnerShared/TestFeatures.cpp: (WTR::merge): (WTR::operator==): (WTR::shouldSetDefaultPortsForWTR): (WTR::shouldSetDefaultPortsForWPT): (WTR::hardcodedFeaturesBasedOnPathForTest): (WTR::parseUInt16TestHeaderValue): (WTR::parseTestHeaderFeature): * Tools/TestRunnerShared/TestFeatures.h: * Tools/WebKitTestRunner/TestController.cpp: (WTR::TestController::generatePageConfiguration): * Tools/WebKitTestRunner/TestOptions.cpp: (WTR::TestOptions::defaults): (WTR::TestOptions::keyTypeMapping): (WTR::TestOptions::uint16TestRunnerFeatureValue const): * Tools/WebKitTestRunner/TestOptions.h: (WTR::TestOptions::insecureUpgradePort const): (WTR::TestOptions::secureUpgradePort const): * Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::platformCreateWebView): Canonical link: https://commits.webkit.org/273568@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes