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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-accepted.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="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4 <script src="/websocket/resources/get-request-header.js"></script>
5 <script src="/websocket/resources/cookie-test-util.js"></script>
6 <script>
7 if (window.testRunner) {
8 // Don't block third-party cookies.
9 testRunner.setBlockThirdPartyCookies(false);
10 }
11
12 const origin = WS_REMOTE_ORIGIN;
13
14 promise_test(t => {
15 return setCookie(origin).then(
16 () => {
17 return connectAndGetRequestHeadersFrom(origin);
18 }
19 ).then(
20 headers => {
21 const cookie = headers['cookie'];
22 assert_not_equals(cookie, undefined,
23 'headers should contain a cookie header.');
24 // Same-site cookies are not included.
25 assert_equals(normalizeCookie(cookie), 'ws-path-root=1; ws=1');
26 return clear(origin);
27 }
28 );
29 }, "Test that third-party cookies are accepted for WebSockets when blocking " +
30 "is disabled.");
31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698