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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-blocked.html

Issue 2102993002: Fix WebSocket to set first party for cookies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO for mkwst 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 // Block third-party cookies.
9 testRunner.setAlwaysAcceptCookies(false);
10 }
11
12 const origin = WS_REMOTE_ORIGIN;
13
14 async_test(t => {
15 setCookie(origin).then(
16 t.step_func(() => {
17 return connectAndGetRequestHeadersFrom(origin);
18 }),
19 t.unreached_func('Failed to set cookie.')
20 ).then(
21 t.step_func(headers => {
22 const cookie = headers['cookie'];
23 assert_equals(cookie, undefined,
24 'headers should not contain any cookie header.');
25 return clear(origin);
26 }),
27 t.unreached_func('Cookie header lookup failed.')
28 ).then(
29 t.done.bind(t),
30 t.unreached_func('Failed to clear cookies.')
31 );
32 }, "Test third-party cookie blocking for WebSockets");
33 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698