RESOLVED FIXED 125576
[WK2][SOUP] Fix handling of cookies when network process is enabled
https://bugs.webkit.org/show_bug.cgi?id=125576
Summary [WK2][SOUP] Fix handling of cookies when network process is enabled
Kwang Yul Seo
Reported 2013-12-11 07:24:16 PST
Initialize the network process with cookie accept policy, persistent storage path and type. Use WebContext::sendToNetworkingProcessRelaunchingIfNecessary instead of WebContext::sendToAllProcessesRelaunchingThemIfNecessary to send SetCookiePersistentStorage message.
Attachments
Patch (10.87 KB, patch)
2013-12-11 07:26 PST, Kwang Yul Seo
no flags
Patch (8.50 KB, patch)
2013-12-11 07:30 PST, Kwang Yul Seo
no flags
Kwang Yul Seo
Comment 1 2013-12-11 07:26:20 PST
WebKit Commit Bot
Comment 2 2013-12-11 07:27:14 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Kwang Yul Seo
Comment 3 2013-12-11 07:30:00 PST
Kwang Yul Seo
Comment 4 2013-12-11 07:37:22 PST
Unfortunately, TestCookieManager.cpp: still fails: TEST: ./Tools/gtk/../../WebKitBuild/Release/Programs/WebKit2APITests/TestCookieManager... (pid=31499) ** ERROR:../../Source/WebKit2/UIProcess/API/gtk/tests/TestCookieManager.cpp:191:void testCookieManagerAcceptPolicy(CookieManagerTest*, gconstpointer): assertion failed (g_strv_length(domains) == 2): (1 == 2) Further investigation shows that: g_assert(test->hasDomain(kFirstPartyDomain)) -> fail g_assert(test->hasDomain(kThirdPartyDomain)) -> pass It seems the test becomes flaky because we can pass testCookieManagerAcceptPolicy by simply reordering the test sequence by moving WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS case to the first.
Carlos Garcia Campos
Comment 5 2013-12-28 01:47:37 PST
Comment on attachment 218963 [details] Patch I've tried it here locally and it works for me: $ Programs/WebKit2APITests/TestCookieManager /webkit2/WebKitCookieManager/accept-policy: OK /webkit2/WebKitCookieManager/delete-cookies: OK /webkit2/WebKitCookieManager/cookies-changed: OK /webkit2/WebKitCookieManager/persistent-storage: OK $ WEBKIT_USE_NETWORK_PROCESS=1 Programs/WebKit2APITests/TestCookieManager /webkit2/WebKitCookieManager/accept-policy: OK /webkit2/WebKitCookieManager/delete-cookies: OK /webkit2/WebKitCookieManager/cookies-changed: OK /webkit2/WebKitCookieManager/persistent-storage: OK
WebKit Commit Bot
Comment 6 2013-12-28 02:14:34 PST
Comment on attachment 218963 [details] Patch Clearing flags on attachment: 218963 Committed r161112: <http://trac.webkit.org/changeset/161112>
WebKit Commit Bot
Comment 7 2013-12-28 02:14:37 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.