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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-same-origin-websocket.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-same-origin-websocket.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-same-origin-websocket.html b/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-same-origin-websocket.html
new file mode 100644
index 0000000000000000000000000000000000000000..c93d819f81a26718f9a7afd37a5ab868a39a0e43
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-same-origin-websocket.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+if (window.testRunner) {
+ // Block third-party cookies.
+ testRunner.setBlockThirdPartyCookies(true);
+}
+
+async_test(t => {
+ window.addEventListener(
+ 'message',
+ t.step_func_done(event => {
+ assert_equals(event.data, 'DONE: undefined');
+ }),
+ false);
+}, "Test that third-party cookies are blocked for WebSockets even when the " +
+ "WebSocket's URL's domain is an exact match for the domain of its " +
+ "initiator.");
+</script>
+<!--
+ The iframe is a remote origin. It uses a remote origin for the WebSocket.
+-->
+<iframe src="http://localhost:8000/security/cookies/websocket/resources/set-cookie.html?remote"></iframe>

Powered by Google App Engine
This is Rietveld 408576698