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

Side by Side 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: Update testRunner calls to setBlockThirdPartyCookies() 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013, Google Inc. All rights reserved. 1 # Copyright 2013, Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 23 matching lines...) Expand all
34 query = urlparse.urlparse(request.uri)[4] 34 query = urlparse.urlparse(request.uri)[4]
35 max_age = '' 35 max_age = ''
36 if 'clear' in urlparse.parse_qs(query): 36 if 'clear' in urlparse.parse_qs(query):
37 max_age = '; Max-Age=0' 37 max_age = '; Max-Age=0'
38 cookie_values = [ 38 cookie_values = [
39 'ws-domain-local-ip=1; Domain=127.0.0.1' + max_age, 39 'ws-domain-local-ip=1; Domain=127.0.0.1' + max_age,
40 'ws-domain-example-com=1; Domain=example.com' + max_age, 40 'ws-domain-example-com=1; Domain=example.com' + max_age,
41 'ws-path-root=1; Path=/' + max_age, 41 'ws-path-root=1; Path=/' + max_age,
42 'ws-path-foobar=1; Path=/foo/bar' + max_age, 42 'ws-path-foobar=1; Path=/foo/bar' + max_age,
43 'ws=1' + max_age, 43 'ws=1' + max_age,
44 'same-site-strict=1; SameSite=Strict' + max_age,
45 'same-site-lax=1; SameSite=Lax' + max_age
44 ] 46 ]
45 for value in cookie_values: 47 for value in cookie_values:
46 request.extra_headers.append(('Set-Cookie', value)) 48 request.extra_headers.append(('Set-Cookie', value))
47 49
48 50
49 def web_socket_transfer_data(request): 51 def web_socket_transfer_data(request):
50 request.ws_stream.send_message('url = ' + request.uri) 52 request.ws_stream.send_message('url = ' + request.uri)
51 53
52 54
53 # vi:sts=4 sw=4 et 55 # vi:sts=4 sw=4 et
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698