Bug 138687 - testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
Summary: testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-12 23:44 PST by Carlos Garcia Campos
Modified: 2015-03-12 11:38 PDT (History)
6 users (show)

See Also:


Attachments
proposed fix (11.45 KB, patch)
2015-03-11 17:41 PDT, Alexey Proskuryakov
cgarcia: review+
Details | Formatted Diff | Diff
patch for landing (13.80 KB, patch)
2015-03-12 10:37 PDT, Alexey Proskuryakov
commit-queue: commit-queue-
Details | Formatted Diff | Diff
patch for landing (13.85 KB, patch)
2015-03-12 10:47 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2014-11-12 23:44:34 PST
Some tests don't pass when running with the network process enabled
Comment 1 Alexey Proskuryakov 2015-03-11 15:58:59 PDT
Related to this, NetworkProcess picks up cookie accept policy from Safari on Mac, so certain tests fail when the Safari preference is not the default one.

I have a fix for both issues.
Comment 2 Alexey Proskuryakov 2015-03-11 17:41:01 PDT
Created attachment 248468 [details]
proposed fix
Comment 3 Alexey Proskuryakov 2015-03-11 17:52:34 PDT
I should probably remove this Gtk expectation, too.

LayoutTests/platform/gtk/TestExpectations:webkit.org/b/138687 http/tests/xmlhttprequest/cross-origin-cookie-storage.html [ Skip ]
Comment 4 Carlos Garcia Campos 2015-03-12 00:34:17 PDT
Comment on attachment 248468 [details]
proposed fix

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

Thanks ap!, this looks good to me, and I confirm this fixes http/tests/xmlhttprequest/cross-origin-cookie-storage.html in GTK+ port. This changes WebCookieManagerProxy.cpp, so I guess I can't r+ this.

> Tools/WebKitTestRunner/TestInvocation.cpp:652
> +        // FIXME: This doesn't synchronously update the policy in WebProcess. This shouldn't affect tests much, because most loading is in NetworkProcess.

I don't get this comment, the message is also async for the network process.
Comment 5 Carlos Garcia Campos 2015-03-12 00:35:08 PDT
Comment on attachment 248468 [details]
proposed fix

Oops, sorry, I removed the flag :-P
Comment 6 Alexey Proskuryakov 2015-03-12 09:16:32 PDT
Actually, you can r+ it - when the patch author is a WebKit2 owner, anyone can r+.

> I don't get this comment, the message is also async for the network process.

Good point, they are both affected. I was thinking of WebProcess primarily because it is blocked in a sync message send, and then continues parsing without an opportunity to handle the message.

I can re-word the comment as:

// FIXME: This updates the policy in WebProcess and in NetworkProcess asynchronously, which might break some tests' expectations.
Comment 7 Carlos Garcia Campos 2015-03-12 09:54:14 PDT
(In reply to comment #6)
> Actually, you can r+ it - when the patch author is a WebKit2 owner, anyone
> can r+.

Ah, I didn't know that, r=me then.

> > I don't get this comment, the message is also async for the network process.
> 
> Good point, they are both affected. I was thinking of WebProcess primarily
> because it is blocked in a sync message send, and then continues parsing
> without an opportunity to handle the message.
> 
> I can re-word the comment as:
> 
> // FIXME: This updates the policy in WebProcess and in NetworkProcess
> asynchronously, which might break some tests' expectations.

That makes more sense :-)
Comment 8 Carlos Garcia Campos 2015-03-12 09:54:48 PDT
Comment on attachment 248468 [details]
proposed fix

Please, remember to unskip the GTK+ test too.
Comment 9 Alexey Proskuryakov 2015-03-12 10:37:11 PDT
Created attachment 248523 [details]
patch for landing
Comment 10 WebKit Commit Bot 2015-03-12 10:38:46 PDT
Comment on attachment 248523 [details]
patch for landing

Rejecting attachment 248523 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'validate-changelog', '--check-oops', '--non-interactive', 248523, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

/Volumes/Data/EWS/WebKit/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://webkit-queues.appspot.com/results/5987861060911104
Comment 11 Alexey Proskuryakov 2015-03-12 10:47:51 PDT
Created attachment 248525 [details]
patch for landing

Annoying. Not sure if we actually have a policy like that.
Comment 12 WebKit Commit Bot 2015-03-12 11:38:42 PDT
Comment on attachment 248525 [details]
patch for landing

Clearing flags on attachment: 248525

Committed r181446: <http://trac.webkit.org/changeset/181446>
Comment 13 WebKit Commit Bot 2015-03-12 11:38:48 PDT
All reviewed patches have been landed.  Closing bug.