Bug 67674 - Some cookie related tests fail on Lion
Summary: Some cookie related tests fail on Lion
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
Depends on:
Reported: 2011-09-06 14:55 PDT by Alexey Proskuryakov
Modified: 2011-09-08 10:17 PDT (History)
4 users (show)

See Also:

proposed fix (3.57 KB, patch)
2011-09-06 15:02 PDT, Alexey Proskuryakov
mrowe: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2011-09-06 14:55:36 PDT
http/tests/security/cookies/third-party-cookie-blocking-user-action.html and http/tests/security/cookies/third-party-cookie-blocking.html fail on Lion, because of a CFNetwork bug.

The issue is that even when NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain policy is used for cookies, CFNetwork allows sites that already have cookies for this domain to set more. The theory is that when a site already has a cookie for you, it can already track you, so letting it set more is OK. This policy tweak was needed for compatibility with some important site.

Unfortunately, even expired cookies are taken into account in that check, so set-a-cookie.php code that makes test cookie expired is insufficient:

    document.cookie = "test_cookie=0; path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT";

This is tracked as a CFNetwork bug <rdar://problem/10080130>, but we should add a workaround, or skip tests. I think that I have a workaround.
Comment 1 Alexey Proskuryakov 2011-09-06 15:02:50 PDT
Created attachment 106495 [details]
proposed fix
Comment 2 jochen 2011-09-06 15:06:24 PDT
the work around looks good to me
Comment 3 Jessie Berlin 2011-09-07 10:06:33 PDT
Comment on attachment 106495 [details]
proposed fix

unofficial r=me!
Comment 4 WebKit Review Bot 2011-09-08 09:55:28 PDT
Comment on attachment 106495 [details]
proposed fix

Rejecting attachment 106495 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
 name: third_party/ots
    url: From('chromium_deps', 'src/third_party/ots')
    should_process: True
    requirements: set(['third_party', 'chromium_deps', './'])
    name: third_party/snappy/src
    url: From('chromium_deps', 'src/third_party/snappy/src')
    should_process: True
    requirements: set(['third_party', 'chromium_deps', './'])

Died at Tools/Scripts/update-webkit-chromium line 80.
No such file or directory at /mnt/git/webkit-commit-queue/Tools/Scripts/webkitdirs.pm line 1929.

Full output: http://queues.webkit.org/results/9622245
Comment 5 Alexey Proskuryakov 2011-09-08 10:17:45 PDT
Manually committed <http://trac.webkit.org/changeset/94765>.