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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/resources/third-party-iframe.html

Issue 2102993002: Fix WebSocket to set first party for cookies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 6 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/third-party-iframe.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/resources/third-party-iframe.html b/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/resources/third-party-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..cf170effbcfedde157e7514e1a0be4f1d30e61cf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/resources/third-party-iframe.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="../../../../websocket/resources/get-request-header.js"></script>
+<script src="../../../../websocket/resources/cookie-test-util.js"></script>
Mike West 2016/06/28 11:25:37 Nit: Ditto with the `..` bits.
tyoshino (SeeGerritForStatus) 2016/06/30 08:24:13 Done.
+<script>
+function notifySuccess(value) {
+ window.parent.postMessage('DONE', '*');
+}
+
+function notifyFailure(reason) {
+ window.parent.postMessage('FAIL: ' + reason, '*');
+}
+
+setCookie(CROSS_ORIGIN_WS_SERVER).then(
+ () => connectAndGetRequestHeadersFrom(CROSS_ORIGIN_WS_SERVER),
+ notifyFailure
+).then(
+ headers => {
+ const cookie = headers['cookie'];
+ return clear(CROSS_ORIGIN_WS_SERVER).then(() => {
+ if (cookie === undefined) {
+ notifySuccess();
+ } else {
+ notifyFailure('cookie was not undefined: ' + cookie);
+ }
+ });
+ }
+).catch(
+ notifyFailure
+);
+</script>

Powered by Google App Engine
This is Rietveld 408576698