Chromium Code Reviews| 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> |