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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/websocket/workers/resources/cookie-ws-to-ws.js

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 importScripts('../../resources/get-request-header.js'); 1 importScripts('../../resources/get-request-header.js');
2 2
3 if (self.postMessage) 3 if (self.postMessage)
4 runTests(); 4 runTests();
5 else 5 else
6 onconnect = handleConnect; 6 onconnect = handleConnect;
7 7
8 function handleConnect(event) 8 function handleConnect(event)
9 { 9 {
10 self.postMessage = function (message) { 10 self.postMessage = function (message) {
(...skipping 30 matching lines...) Expand all
41 function echoCookie() { 41 function echoCookie() {
42 return connectAndGetRequestHeader('cookie'); 42 return connectAndGetRequestHeader('cookie');
43 } 43 }
44 44
45 function runTests() 45 function runTests()
46 { 46 {
47 setCookie() 47 setCookie()
48 .then(echoCookie) 48 .then(echoCookie)
49 .then( 49 .then(
50 function (cookie) { 50 function (cookie) {
51 if (cookie != 'ws-domain-local-ip=1; ws-path-root=1; ws=1') 51 if (cookie != 'ws-domain-local-ip=1; ws-path-root=1; ws=1; same-site -strict=1; same-site-lax=1')
52 return Promise.reject('Echoed cookie is incorrect'); 52 return Promise.reject('Echoed cookie is incorrect: ' + cookie);
53 53
54 postMessage("DONE"); 54 postMessage("DONE");
55 } 55 }
56 ).catch( 56 ).catch(
57 function (reason) { 57 function (reason) {
58 postMessage('FAIL: ' + reason); 58 postMessage('FAIL: ' + reason);
59 } 59 }
60 ); 60 );
61 } 61 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/websocket/set-cookie_wsh.py ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698