| Index: third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-blocked.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-blocked.html b/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-blocked.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..78fca21631004fe467a47fc77fa1b7218b2c9155
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/cookies/websocket/third-party-cookie-blocked.html
|
| @@ -0,0 +1,28 @@
|
| +<!DOCTYPE html>
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<script src="/websocket/resources/get-request-header.js"></script>
|
| +<script src="/websocket/resources/cookie-test-util.js"></script>
|
| +<script>
|
| +if (window.testRunner) {
|
| + // Block third-party cookies.
|
| + testRunner.setBlockThirdPartyCookies(true);
|
| +}
|
| +
|
| +const origin = WS_REMOTE_ORIGIN;
|
| +
|
| +promise_test(t => {
|
| + return setCookie(origin).then(
|
| + () => {
|
| + return connectAndGetRequestHeadersFrom(origin);
|
| + }
|
| + ).then(
|
| + headers => {
|
| + const cookie = headers['cookie'];
|
| + assert_equals(cookie, undefined,
|
| + 'headers should not contain any cookie header.');
|
| + return clear(origin);
|
| + }
|
| + );
|
| +}, "Test third-party cookie blocking for WebSockets");
|
| +</script>
|
|
|