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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/resources/set-cookie.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/resources/set-cookie.html b/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/resources/set-cookie.html
new file mode 100644
index 0000000000000000000000000000000000000000..a0a59c11773ad942d5fd6c04dd725a36743ea444
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/resources/set-cookie.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<script src="/websocket/resources/get-request-header.js"></script>
+<script src="/websocket/resources/cookie-test-util.js"></script>
+<script>
+function notifySuccess(value) {
+ window.parent.postMessage('DONE: ' + value, '*');
+}
+
+function notifyFailure(reason) {
+ window.parent.postMessage('FAIL: ' + reason, '*');
+}
+
+let origin = WS_ORIGIN;
+if (location.search == '?remote') {
+ origin = WS_REMOTE_ORIGIN;
+}
+
+setCookie(origin).then(
+ () => connectAndGetRequestHeadersFrom(origin),
+ notifyFailure
+).then(
+ headers => {
+ const cookie = headers['cookie'];
+ return clear(origin).then(() => {
+ notifySuccess(JSON.stringify(cookie));
+ });
+ }
+).catch(
+ notifyFailure
+);
+</script>

Powered by Google App Engine
This is Rietveld 408576698