Changeset 203743 in webkit
- Timestamp:
- Jul 26, 2016 3:31:25 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r203740 r203743 1 2016-07-26 David Kilzer <ddkilzer@apple.com> 2 3 Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation 4 https://bugs.webkit.org/show_bug.cgi?id=156947 5 <rdar://problem/23325160> 6 7 Reviewed by Alex Christensen. 8 9 * http/tests/xmlhttprequest/auth-reject-protection-space-expected.txt: Added. 10 * http/tests/xmlhttprequest/auth-reject-protection-space.html: Added. 11 1 12 2016-07-26 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r203740 r203743 1 2016-07-26 David Kilzer <ddkilzer@apple.com> 2 3 Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation 4 https://bugs.webkit.org/show_bug.cgi?id=156947 5 <rdar://problem/23325160> 6 7 Reviewed by Alex Christensen. 8 9 Test: http/tests/xmlhttprequest/auth-reject-protection-space.html 10 11 * platform/network/mac/AuthenticationMac.mm: 12 (-[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:]): Added. 13 (-[WebCoreAuthenticationClientAsChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]): Added. 14 1 15 2016-07-26 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm
r180183 r203743 72 72 } 73 73 74 - (void)performDefaultHandlingForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge 75 { 76 if (m_client) 77 m_client->receivedRequestToPerformDefaultHandling(core(challenge)); 78 } 79 80 - (void)rejectProtectionSpaceAndContinueWithChallenge:(NSURLAuthenticationChallenge *)challenge 81 { 82 if (m_client) 83 m_client->receivedChallengeRejection(core(challenge)); 84 } 85 74 86 - (void)useCredential:(NSURLCredential *)credential forAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge 75 87 { -
trunk/Source/WebKit2/ChangeLog
r203741 r203743 1 2016-07-26 David Kilzer <ddkilzer@apple.com> 2 3 Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation 4 https://bugs.webkit.org/show_bug.cgi?id=156947 5 <rdar://problem/23325160> 6 7 Reviewed by Alex Christensen. 8 9 * UIProcess/API/C/WKAuthenticationDecisionListener.cpp: 10 (WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue): 11 * UIProcess/API/C/WKAuthenticationDecisionListener.h: 12 Added new SPI for testing corresponding to calling the completion handler of 13 WKWebView.didReceiveAuthenticationChallenge with NSURLSessionAuthChallengeRejectProtectionSpace. 14 1 15 2016-07-26 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/Source/WebKit2/UIProcess/API/C/WKAuthenticationDecisionListener.cpp
r176829 r203743 47 47 toImpl(authenticationListener)->cancel(); 48 48 } 49 50 void WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue(WKAuthenticationDecisionListenerRef authenticationListener) 51 { 52 toImpl(authenticationListener)->rejectProtectionSpaceAndContinue(); 53 } -
trunk/Source/WebKit2/UIProcess/API/C/WKAuthenticationDecisionListener.h
r168541 r203743 37 37 WK_EXPORT void WKAuthenticationDecisionListenerUseCredential(WKAuthenticationDecisionListenerRef authenticationListener, WKCredentialRef credential); 38 38 WK_EXPORT void WKAuthenticationDecisionListenerCancel(WKAuthenticationDecisionListenerRef authenticationListener); 39 WK_EXPORT void WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue(WKAuthenticationDecisionListenerRef); 39 40 40 41 #ifdef __cplusplus -
trunk/Tools/ChangeLog
r203742 r203743 1 2016-07-26 David Kilzer <ddkilzer@apple.com> 2 3 Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation 4 https://bugs.webkit.org/show_bug.cgi?id=156947 5 <rdar://problem/23325160> 6 7 Reviewed by Alex Christensen. 8 9 * DumpRenderTree/TestRunner.cpp: 10 (TestRunner::TestRunner): 11 (setRejectsProtectionSpaceAndContinueForAuthenticationChallengesCallback): 12 * DumpRenderTree/TestRunner.h: 13 (TestRunner::rejectsProtectionSpaceAndContinueForAuthenticationChallenges): 14 (TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): 15 * DumpRenderTree/mac/ResourceLoadDelegate.mm: 16 (-[ResourceLoadDelegate webView:resource:didReceiveAuthenticationChallenge:fromDataSource:]): 17 * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: 18 * WebKitTestRunner/InjectedBundle/TestRunner.cpp: 19 (WTR::TestRunner::queueNonLoadingScript): 20 (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): 21 * WebKitTestRunner/InjectedBundle/TestRunner.h: 22 * WebKitTestRunner/TestController.cpp: 23 (WTR::TestController::didReceiveAuthenticationChallenge): 24 * WebKitTestRunner/TestController.h: 25 (WTR::TestController::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges): 26 * WebKitTestRunner/TestInvocation.cpp: 27 (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): 28 Add TestRunner.setRejectsProtectionSpaceAndContinueForAuthenticationChallenges to use for testing. 29 1 30 2016-07-26 David Kilzer <ddkilzer@apple.com> 2 31 -
trunk/Tools/DumpRenderTree/TestRunner.cpp
r201404 r203743 105 105 , m_isGeolocationPermissionSet(false) 106 106 , m_geolocationPermission(false) 107 , m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges(false) 107 108 , m_handlesAuthenticationChallenges(false) 108 109 , m_isPrinting(false) … … 1062 1063 controller->setGeolocationPermission(JSValueToBoolean(context, arguments[0])); 1063 1064 1065 return JSValueMakeUndefined(context); 1066 } 1067 1068 static JSValueRef setRejectsProtectionSpaceAndContinueForAuthenticationChallengesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 1069 { 1070 // Has mac & windows implementation 1071 if (argumentCount < 1) 1072 return JSValueMakeUndefined(context); 1073 1074 TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject)); 1075 controller->setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(JSValueToBoolean(context, arguments[0])); 1076 1064 1077 return JSValueMakeUndefined(context); 1065 1078 } … … 2129 2142 { "setDomainRelaxationForbiddenForURLScheme", setDomainRelaxationForbiddenForURLSchemeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2130 2143 { "setGeolocationPermission", setGeolocationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2144 { "setRejectsProtectionSpaceAndContinueForAuthenticationChallenges", setRejectsProtectionSpaceAndContinueForAuthenticationChallengesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2131 2145 { "setHandlesAuthenticationChallenges", setHandlesAuthenticationChallengesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2132 2146 { "setIconDatabaseEnabled", setIconDatabaseEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/TestRunner.h
r201404 r203743 266 266 void setAlwaysAcceptCookies(bool); 267 267 268 bool rejectsProtectionSpaceAndContinueForAuthenticationChallenges() const { return m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges; } 269 void setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(bool value) { m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges = value; } 270 268 271 bool handlesAuthenticationChallenges() const { return m_handlesAuthenticationChallenges; } 269 272 void setHandlesAuthenticationChallenges(bool handlesAuthenticationChallenges) { m_handlesAuthenticationChallenges = handlesAuthenticationChallenges; } … … 409 412 bool m_isGeolocationPermissionSet; 410 413 bool m_geolocationPermission; 414 bool m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges; 411 415 bool m_handlesAuthenticationChallenges; 412 416 bool m_isPrinting; -
trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm
r182017 r203743 196 196 - (void)webView:(WebView *)wv resource:(id)identifier didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource 197 197 { 198 if (gTestRunner->rejectsProtectionSpaceAndContinueForAuthenticationChallenges()) { 199 printf("Simulating reject protection space and continue for authentication challenge\n"); 200 201 [[challenge sender] rejectProtectionSpaceAndContinueWithChallenge:challenge]; 202 return; 203 } 204 198 205 if (!gTestRunner->handlesAuthenticationChallenges()) { 199 206 NSString *string = [NSString stringWithFormat:@"%@ - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet", identifier]; -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
r203075 r203743 200 200 201 201 // Authentication 202 void setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(boolean value); 202 203 void setHandlesAuthenticationChallenges(boolean value); 203 204 void setShouldLogCanAuthenticateAgainstProtectionSpace(boolean value); -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
r203075 r203743 908 908 } 909 909 910 void TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(bool value) 911 { 912 WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetRejectsProtectionSpaceAndContinueForAuthenticationChallenges")); 913 WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(value)); 914 WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), messageBody.get()); 915 } 916 910 917 void TestRunner::setHandlesAuthenticationChallenges(bool handlesAuthenticationChallenges) 911 918 { 912 WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetHandlesAuthenticationChallenge "));919 WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetHandlesAuthenticationChallenges")); 913 920 WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(handlesAuthenticationChallenges)); 914 921 WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), messageBody.get()); -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
r203075 r203743 165 165 166 166 // Authentication 167 void setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(bool); 167 168 void setHandlesAuthenticationChallenges(bool); 168 169 void setShouldLogCanAuthenticateAgainstProtectionSpace(bool); -
trunk/Tools/WebKitTestRunner/TestController.cpp
r203674 r203743 1612 1612 } 1613 1613 1614 if (m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges) { 1615 m_currentInvocation->outputText("Simulating reject protection space and continue for authentication challenge\n"); 1616 WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue(decisionListener); 1617 return; 1618 } 1619 1614 1620 std::string host = toSTD(adoptWK(WKProtectionSpaceCopyHost(protectionSpace)).get()); 1615 1621 int port = WKProtectionSpaceGetPort(protectionSpace); -
trunk/Tools/WebKitTestRunner/TestController.h
r203075 r203743 126 126 WorkQueueManager& workQueueManager() { return m_workQueueManager; } 127 127 128 void setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(bool value) { m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges = value; } 128 129 void setHandlesAuthenticationChallenges(bool value) { m_handlesAuthenticationChallenges = value; } 129 130 void setAuthenticationUsername(String username) { m_authenticationUsername = username; } … … 325 326 bool m_policyDelegatePermissive { false }; 326 327 328 bool m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges { false }; 327 329 bool m_handlesAuthenticationChallenges { false }; 328 330 String m_authenticationUsername; -
trunk/Tools/WebKitTestRunner/TestInvocation.cpp
r203075 r203743 600 600 } 601 601 602 if (WKStringIsEqualToUTF8CString(messageName, "SetHandlesAuthenticationChallenge")) { 602 if (WKStringIsEqualToUTF8CString(messageName, "SetRejectsProtectionSpaceAndContinueForAuthenticationChallenges")) { 603 ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID()); 604 WKBooleanRef value = static_cast<WKBooleanRef>(messageBody); 605 TestController::singleton().setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(WKBooleanGetValue(value)); 606 return; 607 } 608 609 if (WKStringIsEqualToUTF8CString(messageName, "SetHandlesAuthenticationChallenges")) { 603 610 ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID()); 604 611 WKBooleanRef value = static_cast<WKBooleanRef>(messageBody);
Note: See TracChangeset
for help on using the changeset viewer.