Bug 178369 - Add and remove cookie partition accordingly in intermediary redirect requests
Summary: Add and remove cookie partition accordingly in intermediary redirect requests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: John Wilander
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-10-16 17:12 PDT by John Wilander
Modified: 2017-10-17 11:57 PDT (History)
10 users (show)

See Also:


Attachments
Patch (63.61 KB, patch)
2017-10-16 17:23 PDT, John Wilander
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.10 MB, application/zip)
2017-10-16 18:54 PDT, Build Bot
no flags Details
Patch (66.63 KB, patch)
2017-10-16 19:55 PDT, John Wilander
no flags Details | Formatted Diff | Diff
Patch for landing (66.78 KB, patch)
2017-10-17 11:13 PDT, John Wilander
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.