Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/websocket/set-cookie_wsh.py

Issue 2102993002: Fix WebSocket to set first party for cookies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/websocket/set-cookie_wsh.py
diff --git a/third_party/WebKit/LayoutTests/http/tests/websocket/set-cookie_wsh.py b/third_party/WebKit/LayoutTests/http/tests/websocket/set-cookie_wsh.py
index 355cb2b1d2fbd5f1e4fa12e9c4d6fe2a391f906f..3a58c6135919a80cfd876d91270c6fd6a9a44bdc 100644
--- a/third_party/WebKit/LayoutTests/http/tests/websocket/set-cookie_wsh.py
+++ b/third_party/WebKit/LayoutTests/http/tests/websocket/set-cookie_wsh.py
@@ -35,16 +35,17 @@ def web_socket_do_extra_handshake(request):
max_age = ''
if 'clear' in urlparse.parse_qs(query):
max_age = '; Max-Age=0'
- request.extra_headers.append(
- ('Set-Cookie', 'WK-WebSocket-test-domain-pass=1; Domain=127.0.0.1' + max_age))
- request.extra_headers.append(
- ('Set-Cookie', 'WK-WebSocket-test-domain-fail=1; Domain=example.com' + max_age))
- request.extra_headers.append(
- ('Set-Cookie', 'WK-WebSocket-test-path-pass=1; Path=/' + max_age))
- request.extra_headers.append(
- ('Set-Cookie', 'WK-WebSocket-test-path-fail=1; Path=/foo/bar' + max_age))
- request.extra_headers.append(('Set-Cookie',
- 'WK-WebSocket-test=1' + max_age))
+ cookies = [
+ 'WK-WebSocket-test-domain-pass=1; Domain=127.0.0.1' + max_age,
+ 'WK-WebSocket-test-domain-fail=1; Domain=example.com' + max_age,
+ 'WK-WebSocket-test-path-pass=1; Path=/' + max_age,
+ 'WK-WebSocket-test-path-fail=1; Path=/foo/bar' + max_age,
+ 'WK-WebSocket-test=1' + max_age,
+ 'same-site-strict=1; SameSite=Strict' + max_age,
+ 'same-site-lax=1; SameSite=Lax' + max_age
+ ]
+ for value in cookies:
+ request.extra_headers.append(('Set-Cookie', value))
def web_socket_transfer_data(request):

Powered by Google App Engine
This is Rietveld 408576698