Title: [171859] trunk
- Revision
- 171859
- Author
- [email protected]
- Date
- 2014-07-31 09:45:19 -0700 (Thu, 31 Jul 2014)
Log Message
[WK2] Regression tests can't load HTTPS pages with NetworkProcess due to self-signed certificate
https://bugs.webkit.org/show_bug.cgi?id=115282
Reviewed by Sam Weinig.
Tools:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::canAuthenticateAgainstProtectionSpaceInFrame): Return true for any
local host server trust protection space.
(WTR::TestController::didReceiveAuthenticationChallengeInFrame): Respond with a non-empty
credential to server trust challenges.
LayoutTests:
* platform/mac-wk2/TestExpectations: Removed the exceptions listed under this bug.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (171858 => 171859)
--- trunk/LayoutTests/ChangeLog 2014-07-31 16:43:06 UTC (rev 171858)
+++ trunk/LayoutTests/ChangeLog 2014-07-31 16:45:19 UTC (rev 171859)
@@ -1,3 +1,12 @@
+2014-07-31 Dan Bernstein <[email protected]>
+
+ [WK2] Regression tests can't load HTTPS pages with NetworkProcess due to self-signed certificate
+ https://bugs.webkit.org/show_bug.cgi?id=115282
+
+ Reviewed by Sam Weinig.
+
+ * platform/mac-wk2/TestExpectations: Removed the exceptions listed under this bug.
+
2014-07-31 Michał Pakuła vel Rutka <[email protected]>
Unreviewed EFL gardening
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (171858 => 171859)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2014-07-31 16:43:06 UTC (rev 171858)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2014-07-31 16:45:19 UTC (rev 171859)
@@ -628,25 +628,6 @@
[ Mavericks ] storage/domstorage/sessionstorage/private-browsing-affects-storage.html [ Skip ]
[ Mavericks ] storage/websql/private-browsing-noread-nowrite.html [ Skip ]
-# https://bugs.webkit.org/show_bug.cgi?id=115282
-# PPT: https loads fail due to self-signed certificate
-[ Mavericks ] http/tests/appcache/different-https-origin-resource-main.html [ Skip ]
-[ Mavericks ] http/tests/cache/history-only-cached-subresource-loads-max-age-https.html [ Skip ]
-[ Mavericks ] http/tests/misc/dns-prefetch-control.html [ Skip ]
-[ Mavericks ] http/tests/navigation/https-in-page-cache.html [ Skip ]
-[ Mavericks ] http/tests/navigation/ping-cross-origin-from-https.html [ Skip ]
-[ Mavericks ] http/tests/security/contentSecurityPolicy/block-mixed-content-hides-warning.html [ Skip ]
-[ Mavericks ] http/tests/security/contentSecurityPolicy/script-src-star-cross-scheme.html [ Skip ]
-[ Mavericks ] http/tests/security/mixedContent [ Skip ]
-[ Mavericks ] http/tests/security/originHeader/origin-header-for-https.html [ Skip ]
-[ Mavericks ] http/tests/security/referrer-policy-https-always.html [ Skip ]
-[ Mavericks ] http/tests/security/referrer-policy-https-default.html [ Skip ]
-[ Mavericks ] http/tests/security/referrer-policy-https-never.html [ Skip ]
-[ Mavericks ] http/tests/security/referrer-policy-https-origin.html [ Skip ]
-[ Mavericks ] http/tests/security/referrer-policy-redirect-link.html [ Skip ]
-[ Mavericks ] http/tests/security/referrer-policy-redirect.html [ Skip ]
-[ Mavericks ] http/tests/ssl [ Skip ]
-
# testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
[ Mavericks ] http/tests/cookies/third-party-cookie-relaxing.html [ Skip ]
Modified: trunk/Tools/ChangeLog (171858 => 171859)
--- trunk/Tools/ChangeLog 2014-07-31 16:43:06 UTC (rev 171858)
+++ trunk/Tools/ChangeLog 2014-07-31 16:45:19 UTC (rev 171859)
@@ -1,3 +1,16 @@
+2014-07-31 Dan Bernstein <[email protected]>
+
+ [WK2] Regression tests can't load HTTPS pages with NetworkProcess due to self-signed certificate
+ https://bugs.webkit.org/show_bug.cgi?id=115282
+
+ Reviewed by Sam Weinig.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::canAuthenticateAgainstProtectionSpaceInFrame): Return true for any
+ local host server trust protection space.
+ (WTR::TestController::didReceiveAuthenticationChallengeInFrame): Respond with a non-empty
+ credential to server trust challenges.
+
2014-07-31 Tibor Meszaros <[email protected]>
[webkitpy] Make diff_text generate correct diff if there is no newline at the end of file
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (171858 => 171859)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2014-07-31 16:43:06 UTC (rev 171858)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2014-07-31 16:45:19 UTC (rev 171859)
@@ -1198,7 +1198,14 @@
bool TestController::canAuthenticateAgainstProtectionSpaceInFrame(WKPageRef, WKFrameRef, WKProtectionSpaceRef protectionSpace, const void*)
{
- return WKProtectionSpaceGetAuthenticationScheme(protectionSpace) <= kWKProtectionSpaceAuthenticationSchemeHTTPDigest;
+ WKProtectionSpaceAuthenticationScheme authenticationScheme = WKProtectionSpaceGetAuthenticationScheme(protectionSpace);
+
+ if (authenticationScheme == kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) {
+ std::string host = toSTD(adoptWK(WKProtectionSpaceCopyHost(protectionSpace)).get());
+ return host == "localhost" || host == "127.0.0.1";
+ }
+
+ return authenticationScheme <= kWKProtectionSpaceAuthenticationSchemeHTTPDigest;
}
void TestController::didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo)
@@ -1249,6 +1256,18 @@
void TestController::didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge)
{
+ WKProtectionSpaceRef protectionSpace = WKAuthenticationChallengeGetProtectionSpace(authenticationChallenge);
+ WKAuthenticationDecisionListenerRef decisionListener = WKAuthenticationChallengeGetDecisionListener(authenticationChallenge);
+
+ if (WKProtectionSpaceGetAuthenticationScheme(protectionSpace) == kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) {
+ // Any non-empty credential signals to accept the server trust. Since the cross-platform API
+ // doesn't expose a way to create a credential from server trust, we use a password credential.
+
+ WKRetainPtr<WKCredentialRef> credential = adoptWK(WKCredentialCreate(toWK("accept server trust").get(), toWK("").get(), kWKCredentialPersistenceNone));
+ WKAuthenticationDecisionListenerUseCredential(decisionListener, credential.get());
+ return;
+ }
+
String message;
if (!m_handlesAuthenticationChallenges)
message = "didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet\n";
@@ -1256,7 +1275,6 @@
message = String::format("didReceiveAuthenticationChallenge - Responding with %s:%s\n", m_authenticationUsername.utf8().data(), m_authenticationPassword.utf8().data());
m_currentInvocation->outputText(message);
- WKAuthenticationDecisionListenerRef decisionListener = WKAuthenticationChallengeGetDecisionListener(authenticationChallenge);
if (!m_handlesAuthenticationChallenges) {
WKAuthenticationDecisionListenerUseCredential(decisionListener, 0);
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes