[webkit-reviews] review granted: [Bug 215388] Add a "use stored credentials" setting to WKWebView : [Attachment 406408] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 11 13:30:58 PDT 2020
Geoffrey Garen <ggaren at apple.com> has granted Brady Eidson
<beidson at apple.com>'s request for review:
Bug 215388: Add a "use stored credentials" setting to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=215388
Attachment 406408: Patch
https://bugs.webkit.org/attachment.cgi?id=406408&action=review
--- Comment #4 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 406408
--> https://bugs.webkit.org/attachment.cgi?id=406408
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=406408&action=review
r=me
> Tools/TestWebKitAPI/Tests/WebKitCocoa/Preconnect.mm:102
> + // The preconnect to the server will use the default setting of "use the
credential store",
> + // and therefore use the credential-store-blessed NSURLSession.
> + [webView _preconnectToServer:server.request().URL];
> + Util::run(&anyConnections);
> + Util::spinRunLoop(10);
> + EXPECT_FALSE(requested);
> +
> + // Then this request will *not* use the credential store, therefore
using a different NSURLSession
> + // that doesn't know about the above preconnect, triggering a second
connection to the server.
> + webView.get()._canUseCredentialStorage = NO;
> + [webView loadRequest:server.request()];
> + Util::run(&requested);
This test is a little upside-down because it verifies that the *unwanted*
behavior is still possible, rather than verifying that the *wanted* behavior
works as expected. Can you add a test that sets _canUseCredentialStorage up
front and verifies that only one connection is made if you reconnect and then
connect?
More information about the webkit-reviews
mailing list