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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/resources/set-cookie.html

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
(Empty)
1 <!DOCTYPE html>
2 <script src="/websocket/resources/get-request-header.js"></script>
3 <script src="/websocket/resources/cookie-test-util.js"></script>
4 <script>
5 function notifySuccess(value) {
6 window.parent.postMessage('DONE: ' + value, '*');
7 }
8
9 function notifyFailure(reason) {
10 window.parent.postMessage('FAIL: ' + reason, '*');
11 }
12
13 let origin = WS_ORIGIN;
14 if (location.search == '?remote') {
15 origin = WS_REMOTE_ORIGIN;
16 }
17
18 setCookie(origin).then(
19 () => connectAndGetRequestHeadersFrom(origin),
20 notifyFailure
21 ).then(
22 headers => {
23 const cookie = headers['cookie'];
24 return clear(origin).then(() => {
25 notifySuccess(JSON.stringify(cookie));
26 });
27 }
28 ).catch(
29 notifyFailure
30 );
31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698