<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[203743] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/203743">203743</a></dd>
<dt>Author</dt> <dd>ddkilzer@apple.com</dd>
<dt>Date</dt> <dd>2016-07-26 15:31:25 -0700 (Tue, 26 Jul 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation
https://bugs.webkit.org/show_bug.cgi?id=156947
<rdar://problem/23325160>
Reviewed by Alex Christensen.
Source/WebCore:
Test: http/tests/xmlhttprequest/auth-reject-protection-space.html
* platform/network/mac/AuthenticationMac.mm:
(-[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:]): Added.
(-[WebCoreAuthenticationClientAsChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]): Added.
Source/WebKit2:
* UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
(WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue):
* UIProcess/API/C/WKAuthenticationDecisionListener.h:
Added new SPI for testing corresponding to calling the completion handler of
WKWebView.didReceiveAuthenticationChallenge with NSURLSessionAuthChallengeRejectProtectionSpace.
Tools:
* DumpRenderTree/TestRunner.cpp:
(TestRunner::TestRunner):
(setRejectsProtectionSpaceAndContinueForAuthenticationChallengesCallback):
* DumpRenderTree/TestRunner.h:
(TestRunner::rejectsProtectionSpaceAndContinueForAuthenticationChallenges):
(TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges):
* DumpRenderTree/mac/ResourceLoadDelegate.mm:
(-[ResourceLoadDelegate webView:resource:didReceiveAuthenticationChallenge:fromDataSource:]):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::queueNonLoadingScript):
(WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveAuthenticationChallenge):
* WebKitTestRunner/TestController.h:
(WTR::TestController::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
Add TestRunner.setRejectsProtectionSpaceAndContinueForAuthenticationChallenges to use for testing.
LayoutTests:
* http/tests/xmlhttprequest/auth-reject-protection-space-expected.txt: Added.
* http/tests/xmlhttprequest/auth-reject-protection-space.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacAuthenticationMacmm">trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKAuthenticationDecisionListenercpp">trunk/Source/WebKit2/UIProcess/API/C/WKAuthenticationDecisionListener.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKAuthenticationDecisionListenerh">trunk/Source/WebKit2/UIProcess/API/C/WKAuthenticationDecisionListener.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeTestRunnercpp">trunk/Tools/DumpRenderTree/TestRunner.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreeTestRunnerh">trunk/Tools/DumpRenderTree/TestRunner.h</a></li>
<li><a href="#trunkToolsDumpRenderTreemacResourceLoadDelegatemm">trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllerh">trunk/Tools/WebKitTestRunner/TestController.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationcpp">trunk/Tools/WebKitTestRunner/TestInvocation.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequestauthrejectprotectionspaceexpectedtxt">trunk/LayoutTests/http/tests/xmlhttprequest/auth-reject-protection-space-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsxmlhttprequestauthrejectprotectionspacehtml">trunk/LayoutTests/http/tests/xmlhttprequest/auth-reject-protection-space.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/LayoutTests/ChangeLog        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-07-26 David Kilzer <ddkilzer@apple.com>
+
+ Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation
+ https://bugs.webkit.org/show_bug.cgi?id=156947
+ <rdar://problem/23325160>
+
+ Reviewed by Alex Christensen.
+
+ * http/tests/xmlhttprequest/auth-reject-protection-space-expected.txt: Added.
+ * http/tests/xmlhttprequest/auth-reject-protection-space.html: Added.
+
</ins><span class="cx"> 2016-07-26 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Parameters to CSSStyleSheet.insertRule() / deleteRule() should be mandatory
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequestauthrejectprotectionspaceexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/auth-reject-protection-space-expected.txt (0 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/auth-reject-protection-space-expected.txt         (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/auth-reject-protection-space-expected.txt        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+Simulating reject protection space and continue for authentication challenge
+ALERT: status: 401
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsxmlhttprequestauthrejectprotectionspacehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/xmlhttprequest/auth-reject-protection-space.html (0 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/xmlhttprequest/auth-reject-protection-space.html         (rev 0)
+++ trunk/LayoutTests/http/tests/xmlhttprequest/auth-reject-protection-space.html        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ testRunner.setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(true);
+}
+var request = new XMLHttpRequest;
+request.onreadystatechange = function () {
+ if (request.readyState === 4) {
+ alert("status: " + request.status);
+ if (window.testRunner);
+ testRunner.notifyDone();
+ }
+};
+request.open('GET', 'resources/basic-auth/basic-auth.php');
+request.send(null);
+</script>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Source/WebCore/ChangeLog        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-07-26 David Kilzer <ddkilzer@apple.com>
+
+ Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation
+ https://bugs.webkit.org/show_bug.cgi?id=156947
+ <rdar://problem/23325160>
+
+ Reviewed by Alex Christensen.
+
+ Test: http/tests/xmlhttprequest/auth-reject-protection-space.html
+
+ * platform/network/mac/AuthenticationMac.mm:
+ (-[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:]): Added.
+ (-[WebCoreAuthenticationClientAsChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]): Added.
+
</ins><span class="cx"> 2016-07-26 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Parameters to CSSStyleSheet.insertRule() / deleteRule() should be mandatory
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacAuthenticationMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -71,6 +71,18 @@
</span><span class="cx"> m_client = 0;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)performDefaultHandlingForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
+{
+ if (m_client)
+ m_client->receivedRequestToPerformDefaultHandling(core(challenge));
+}
+
+- (void)rejectProtectionSpaceAndContinueWithChallenge:(NSURLAuthenticationChallenge *)challenge
+{
+ if (m_client)
+ m_client->receivedChallengeRejection(core(challenge));
+}
+
</ins><span class="cx"> - (void)useCredential:(NSURLCredential *)credential forAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
</span><span class="cx"> {
</span><span class="cx"> if (m_client)
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Source/WebKit2/ChangeLog        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-07-26 David Kilzer <ddkilzer@apple.com>
+
+ Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation
+ https://bugs.webkit.org/show_bug.cgi?id=156947
+ <rdar://problem/23325160>
+
+ Reviewed by Alex Christensen.
+
+ * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
+ (WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue):
+ * UIProcess/API/C/WKAuthenticationDecisionListener.h:
+ Added new SPI for testing corresponding to calling the completion handler of
+ WKWebView.didReceiveAuthenticationChallenge with NSURLSessionAuthChallengeRejectProtectionSpace.
+
</ins><span class="cx"> 2016-07-26 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Payment session does not end if user closes all Safari windows
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKAuthenticationDecisionListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKAuthenticationDecisionListener.cpp (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKAuthenticationDecisionListener.cpp        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKAuthenticationDecisionListener.cpp        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -46,3 +46,8 @@
</span><span class="cx"> {
</span><span class="cx"> toImpl(authenticationListener)->cancel();
</span><span class="cx"> }
</span><ins>+
+void WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue(WKAuthenticationDecisionListenerRef authenticationListener)
+{
+ toImpl(authenticationListener)->rejectProtectionSpaceAndContinue();
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKAuthenticationDecisionListenerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKAuthenticationDecisionListener.h (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKAuthenticationDecisionListener.h        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKAuthenticationDecisionListener.h        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx">
</span><span class="cx"> WK_EXPORT void WKAuthenticationDecisionListenerUseCredential(WKAuthenticationDecisionListenerRef authenticationListener, WKCredentialRef credential);
</span><span class="cx"> WK_EXPORT void WKAuthenticationDecisionListenerCancel(WKAuthenticationDecisionListenerRef authenticationListener);
</span><ins>+WK_EXPORT void WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue(WKAuthenticationDecisionListenerRef);
</ins><span class="cx">
</span><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Tools/ChangeLog        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2016-07-26 David Kilzer <ddkilzer@apple.com>
+
+ Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation
+ https://bugs.webkit.org/show_bug.cgi?id=156947
+ <rdar://problem/23325160>
+
+ Reviewed by Alex Christensen.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::TestRunner):
+ (setRejectsProtectionSpaceAndContinueForAuthenticationChallengesCallback):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner::rejectsProtectionSpaceAndContinueForAuthenticationChallenges):
+ (TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges):
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[ResourceLoadDelegate webView:resource:didReceiveAuthenticationChallenge:fromDataSource:]):
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::queueNonLoadingScript):
+ (WTR::TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::didReceiveAuthenticationChallenge):
+ * WebKitTestRunner/TestController.h:
+ (WTR::TestController::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ Add TestRunner.setRejectsProtectionSpaceAndContinueForAuthenticationChallenges to use for testing.
+
</ins><span class="cx"> 2016-07-26 David Kilzer <ddkilzer@apple.com>
</span><span class="cx">
</span><span class="cx"> check-for-exit-time-destructors should be usable outside Xcode
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeTestRunnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/TestRunner.cpp        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -104,6 +104,7 @@
</span><span class="cx"> , m_globalFlag(false)
</span><span class="cx"> , m_isGeolocationPermissionSet(false)
</span><span class="cx"> , m_geolocationPermission(false)
</span><ins>+ , m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges(false)
</ins><span class="cx"> , m_handlesAuthenticationChallenges(false)
</span><span class="cx"> , m_isPrinting(false)
</span><span class="cx"> , m_deferMainResourceDataLoad(true)
</span><span class="lines">@@ -1064,6 +1065,18 @@
</span><span class="cx"> return JSValueMakeUndefined(context);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static JSValueRef setRejectsProtectionSpaceAndContinueForAuthenticationChallengesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ // Has mac & windows implementation
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
+ controller->setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(JSValueToBoolean(context, arguments[0]));
+
+ return JSValueMakeUndefined(context);
+}
+
</ins><span class="cx"> static JSValueRef setHandlesAuthenticationChallengesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
</span><span class="cx"> {
</span><span class="cx"> // Has mac & windows implementation
</span><span class="lines">@@ -2128,6 +2141,7 @@
</span><span class="cx"> { "setUseDeferredFrameLoading", setUseDeferredFrameLoadingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "setDomainRelaxationForbiddenForURLScheme", setDomainRelaxationForbiddenForURLSchemeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "setGeolocationPermission", setGeolocationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><ins>+ { "setRejectsProtectionSpaceAndContinueForAuthenticationChallenges", setRejectsProtectionSpaceAndContinueForAuthenticationChallengesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</ins><span class="cx"> { "setHandlesAuthenticationChallenges", setHandlesAuthenticationChallengesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "setIconDatabaseEnabled", setIconDatabaseEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx"> { "setAutomaticLinkDetectionEnabled", setAutomaticLinkDetectionEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeTestRunnerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/TestRunner.h (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/TestRunner.h        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Tools/DumpRenderTree/TestRunner.h        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -265,6 +265,9 @@
</span><span class="cx"> bool alwaysAcceptCookies() const { return m_alwaysAcceptCookies; }
</span><span class="cx"> void setAlwaysAcceptCookies(bool);
</span><span class="cx">
</span><ins>+ bool rejectsProtectionSpaceAndContinueForAuthenticationChallenges() const { return m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges; }
+ void setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(bool value) { m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges = value; }
+
</ins><span class="cx"> bool handlesAuthenticationChallenges() const { return m_handlesAuthenticationChallenges; }
</span><span class="cx"> void setHandlesAuthenticationChallenges(bool handlesAuthenticationChallenges) { m_handlesAuthenticationChallenges = handlesAuthenticationChallenges; }
</span><span class="cx">
</span><span class="lines">@@ -408,6 +411,7 @@
</span><span class="cx"> bool m_globalFlag;
</span><span class="cx"> bool m_isGeolocationPermissionSet;
</span><span class="cx"> bool m_geolocationPermission;
</span><ins>+ bool m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges;
</ins><span class="cx"> bool m_handlesAuthenticationChallenges;
</span><span class="cx"> bool m_isPrinting;
</span><span class="cx"> bool m_deferMainResourceDataLoad;
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacResourceLoadDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -195,6 +195,13 @@
</span><span class="cx">
</span><span class="cx"> - (void)webView:(WebView *)wv resource:(id)identifier didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource
</span><span class="cx"> {
</span><ins>+ if (gTestRunner->rejectsProtectionSpaceAndContinueForAuthenticationChallenges()) {
+ printf("Simulating reject protection space and continue for authentication challenge\n");
+
+ [[challenge sender] rejectProtectionSpaceAndContinueWithChallenge:challenge];
+ return;
+ }
+
</ins><span class="cx"> if (!gTestRunner->handlesAuthenticationChallenges()) {
</span><span class="cx"> NSString *string = [NSString stringWithFormat:@"%@ - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet", identifier];
</span><span class="cx"> printf("%s\n", [string UTF8String]);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -199,6 +199,7 @@
</span><span class="cx"> void queueNonLoadingScript(DOMString script);
</span><span class="cx">
</span><span class="cx"> // Authentication
</span><ins>+ void setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(boolean value);
</ins><span class="cx"> void setHandlesAuthenticationChallenges(boolean value);
</span><span class="cx"> void setShouldLogCanAuthenticateAgainstProtectionSpace(boolean value);
</span><span class="cx"> void setAuthenticationUsername(DOMString username);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -907,9 +907,16 @@
</span><span class="cx"> InjectedBundle::singleton().queueNonLoadingScript(scriptWK.get());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void TestRunner::setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(bool value)
+{
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetRejectsProtectionSpaceAndContinueForAuthenticationChallenges"));
+ WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(value));
+ WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), messageBody.get());
+}
+
</ins><span class="cx"> void TestRunner::setHandlesAuthenticationChallenges(bool handlesAuthenticationChallenges)
</span><span class="cx"> {
</span><del>- WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetHandlesAuthenticationChallenge"));
</del><ins>+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetHandlesAuthenticationChallenges"));
</ins><span class="cx"> WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(handlesAuthenticationChallenges));
</span><span class="cx"> WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), messageBody.get());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -164,6 +164,7 @@
</span><span class="cx"> void setPrinting() { m_isPrinting = true; }
</span><span class="cx">
</span><span class="cx"> // Authentication
</span><ins>+ void setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(bool);
</ins><span class="cx"> void setHandlesAuthenticationChallenges(bool);
</span><span class="cx"> void setShouldLogCanAuthenticateAgainstProtectionSpace(bool);
</span><span class="cx"> void setAuthenticationUsername(JSStringRef);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -1611,6 +1611,12 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges) {
+ m_currentInvocation->outputText("Simulating reject protection space and continue for authentication challenge\n");
+ WKAuthenticationDecisionListenerRejectProtectionSpaceAndContinue(decisionListener);
+ return;
+ }
+
</ins><span class="cx"> std::string host = toSTD(adoptWK(WKProtectionSpaceCopyHost(protectionSpace)).get());
</span><span class="cx"> int port = WKProtectionSpaceGetPort(protectionSpace);
</span><span class="cx"> String message = String::format("%s:%d - didReceiveAuthenticationChallenge - ", host.c_str(), port);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.h (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.h        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Tools/WebKitTestRunner/TestController.h        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -125,6 +125,7 @@
</span><span class="cx">
</span><span class="cx"> WorkQueueManager& workQueueManager() { return m_workQueueManager; }
</span><span class="cx">
</span><ins>+ void setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(bool value) { m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges = value; }
</ins><span class="cx"> void setHandlesAuthenticationChallenges(bool value) { m_handlesAuthenticationChallenges = value; }
</span><span class="cx"> void setAuthenticationUsername(String username) { m_authenticationUsername = username; }
</span><span class="cx"> void setAuthenticationPassword(String password) { m_authenticationPassword = password; }
</span><span class="lines">@@ -324,6 +325,7 @@
</span><span class="cx"> bool m_policyDelegateEnabled { false };
</span><span class="cx"> bool m_policyDelegatePermissive { false };
</span><span class="cx">
</span><ins>+ bool m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges { false };
</ins><span class="cx"> bool m_handlesAuthenticationChallenges { false };
</span><span class="cx"> String m_authenticationUsername;
</span><span class="cx"> String m_authenticationPassword;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (203742 => 203743)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2016-07-26 22:04:02 UTC (rev 203742)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2016-07-26 22:31:25 UTC (rev 203743)
</span><span class="lines">@@ -599,9 +599,16 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (WKStringIsEqualToUTF8CString(messageName, "SetHandlesAuthenticationChallenge")) {
</del><ins>+ if (WKStringIsEqualToUTF8CString(messageName, "SetRejectsProtectionSpaceAndContinueForAuthenticationChallenges")) {
</ins><span class="cx"> ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID());
</span><span class="cx"> WKBooleanRef value = static_cast<WKBooleanRef>(messageBody);
</span><ins>+ TestController::singleton().setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(WKBooleanGetValue(value));
+ return;
+ }
+
+ if (WKStringIsEqualToUTF8CString(messageName, "SetHandlesAuthenticationChallenges")) {
+ ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID());
+ WKBooleanRef value = static_cast<WKBooleanRef>(messageBody);
</ins><span class="cx"> TestController::singleton().setHandlesAuthenticationChallenges(WKBooleanGetValue(value));
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>