Bug 178369

Summary: Add and remove cookie partition accordingly in intermediary redirect requests
Product: WebKit Reporter: John Wilander <wilander>
Component: WebKit2Assignee: John Wilander <wilander>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, buildbot, cdumez, commit-queue, dbates, japhet, rniwa, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
none
Patch
none
Patch for landing none

Description John Wilander 2017-10-16 17:12:14 PDT
We need to add and remove cookie partition through redirects. Otherwise the setting from the data task creation sticks.
Comment 1 John Wilander 2017-10-16 17:12:33 PDT
<rdar://problem/34467603>
Comment 2 John Wilander 2017-10-16 17:23:37 PDT
Created attachment 323961 [details]
Patch
Comment 3 Build Bot 2017-10-16 17:24:46 PDT
Attachment 323961 [details] did not pass style-queue:


ERROR: Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:202:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
Total errors found: 1 in 32 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 John Wilander 2017-10-16 17:26:25 PDT
The style error is due to deliberate aligning in the comment on rules for when to switch partition.
Comment 5 Build Bot 2017-10-16 18:54:06 PDT
Comment on attachment 323961 [details]
Patch

Attachment 323961 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/4876879

New failing tests:
http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html
Comment 6 Build Bot 2017-10-16 18:54:08 PDT
Created attachment 323969 [details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 7 John Wilander 2017-10-16 19:55:40 PDT
Created attachment 323976 [details]
Patch
Comment 8 John Wilander 2017-10-16 19:57:03 PDT
Test failure on El Cap since cookie partitioning is not supported there. Changed test expectations to only enable the new tests on iOS and macOS High Sierra.
Comment 9 Build Bot 2017-10-16 19:57:55 PDT
Attachment 323976 [details] did not pass style-queue:


ERROR: Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:202:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
Total errors found: 1 in 35 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Brent Fulgham 2017-10-17 09:13:39 PDT
Comment on attachment 323976 [details]
Patch

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

Looks good. Please correct the minor style issues I mentioned before landing.

> Source/WebCore/ChangeLog:14
> +            by the TestRunner.

You should mention that you removed an unimplemented method declaration (for completeness).

> Source/WebCore/loader/ResourceLoadObserver.h:-56
> -    WEBCORE_EXPORT void setShouldThrottleObserverNotifications(bool);

I wish the compiler warned about declarations with no implementations.

> LayoutTests/http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html:5
> +    <script src="../../resources/js-test-pre.js"></script>

Can this just be "js-test.js"?

> LayoutTests/http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html:10
> +

I think we prefer to do:

jsTestIsAsync = true;

nowadays.

> LayoutTests/http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html:102
> +                testRunner.notifyDone();

I think this should be finishJSTest();.
Comment 11 John Wilander 2017-10-17 11:13:29 PDT
Created attachment 324031 [details]
Patch for landing
Comment 12 John Wilander 2017-10-17 11:13:53 PDT
Thanks for the review, Brent! All comments addressed.
Comment 13 WebKit Commit Bot 2017-10-17 11:57:25 PDT
Comment on attachment 324031 [details]
Patch for landing

Clearing flags on attachment: 324031

Committed r223565: <https://trac.webkit.org/changeset/223565>
Comment 14 WebKit Commit Bot 2017-10-17 11:57:27 PDT
All reviewed patches have been landed.  Closing bug.