Flesh out WebSocket cookie tests to cover cookie policy for third-party resources
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Jul 2018 01:07:38 +0000 (01:07 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Jul 2018 01:07:38 +0000 (01:07 +0000)
commita91004c7b6154dd25329040dfd363aa6a3ac0302
treef37cdaaf63a487341d3b7ce17677a7967cde1425
parent20ce743a0620f8c1a146050d75eec0585fd96133
Flesh out WebSocket cookie tests to cover cookie policy for third-party resources
https://bugs.webkit.org/show_bug.cgi?id=187541
<rdar://problem/42048729>

Reviewed by Alex Christensen.

* http/tests/cookies/resources/cookie-utilities.js:
    Added a function for setting a cookie in a WebSocket handshake.
* http/tests/websocket/tests/hybi/cookie_wsh.py:
(web_socket_do_extra_handshake):
    Now sets the root path for new cookies so that they can be seen by
    for example cookies/resources/echo-cookies.php.
* http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party-expected.txt: Added.
* http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party.html: Added.
* http/tests/websocket/tests/hybi/websocket-blocked-from-setting-cookie-as-third-party-expected.txt: Added.
* http/tests/websocket/tests/hybi/websocket-blocked-from-setting-cookie-as-third-party.html: Added.
* http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior-expected.txt:
* http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html:
    Now tests under the condition where localhost as third-party is
    allowed to set a new cookie as third party. It also makes sure to use
    cookies with the path set to the root so that all cookies are visible.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/cookies/resources/cookie-utilities.js
LayoutTests/http/tests/websocket/tests/hybi/cookie_wsh.py
LayoutTests/http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party.html [new file with mode: 0644]
LayoutTests/http/tests/websocket/tests/hybi/websocket-blocked-from-setting-cookie-as-third-party-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/websocket/tests/hybi/websocket-blocked-from-setting-cookie-as-third-party.html [new file with mode: 0644]
LayoutTests/http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior-expected.txt
LayoutTests/http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html