Bug 67674

Summary: Some cookie related tests fail on Lion
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Tools / TestsAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, jberlin, jochen, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed fix mrowe: review+, webkit.review.bot: commit-queue-

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>.