Bug 156091

Summary: CookieJar should support adding synthetic cookies for developer tools
Product: WebKit Reporter: BJ Burg <bburg>
Component: WebCore Misc.Assignee: BJ Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, aestes, andersca, ap, bburg, beidson, berto, cdumez, cgarcia, commit-queue, danw, darin, dbates, galpeter, gustavo, japhet, joepeck, mcatanzaro, mrobinson, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=156298
Bug Depends on:    
Bug Blocks: 156296, 156298, 156345, 31157, 156090, 156295, 156319    
Attachments:
Description Flags
Proposed Fix
none
For EWS
none
For EWS none

Description BJ Burg 2016-03-31 16:33:13 PDT
.
Comment 1 BJ Burg 2016-03-31 16:34:36 PDT
This is needed to interactively edit cookies through Web Inspector, or add cookies to an ephemeral testing context (that would otherwise have no cookies).
Comment 2 BJ Burg 2016-04-01 17:07:50 PDT
Moving parts:

1. New CookieJar method.
2. New platform method(s) in PlatformCookieJar.
3. New WebCookieManager[Proxy] methods and messages.
4. Hook up inspector / automation to the new method!
Comment 3 Radar WebKit Bug Importer 2016-04-06 11:38:01 PDT
<rdar://problem/25581340>
Comment 4 BJ Burg 2016-04-06 13:53:36 PDT
Created attachment 275816 [details]
Proposed Fix
Comment 5 Alex Christensen 2016-04-06 14:02:30 PDT
Comment on attachment 275816 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=275816&action=review

> Source/WebCore/platform/network/mac/CookieJarMac.mm:269
> +#if !USE(CFNETWORK)

This whole file is inside of !USE(CFNETWORK).  This is not needed.
Comment 6 BJ Burg 2016-04-06 14:04:53 PDT
Comment on attachment 275816 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=275816&action=review

>> Source/WebCore/platform/network/mac/CookieJarMac.mm:269
>> +#if !USE(CFNETWORK)
> 
> This whole file is inside of !USE(CFNETWORK).  This is not needed.

Well, most of it. Oops.
Comment 7 BJ Burg 2016-04-06 16:38:13 PDT
Created attachment 275829 [details]
For EWS
Comment 8 BJ Burg 2016-04-07 09:54:13 PDT
Created attachment 275892 [details]
For EWS
Comment 9 BJ Burg 2016-04-07 11:09:34 PDT
Writing a test will be in a followup. It will use TestWebKitAPI and a new C SPI for WKCookie object and WKCookieManager method. See https://bugs.webkit.org/show_bug.cgi?id=156345.
Comment 10 WebKit Commit Bot 2016-04-07 12:00:54 PDT
Comment on attachment 275892 [details]
For EWS

Clearing flags on attachment: 275892

Committed r199167: <http://trac.webkit.org/changeset/199167>
Comment 11 WebKit Commit Bot 2016-04-07 12:01:01 PDT
All reviewed patches have been landed.  Closing bug.