| Index: third_party/WebKit/LayoutTests/http/tests/websocket/subresource-filter-disallows.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/websocket/subresource-filter-disallows.html b/third_party/WebKit/LayoutTests/http/tests/websocket/subresource-filter-disallows.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2d2c283646631771ba6e0f4fdaef8671545d9445
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/websocket/subresource-filter-disallows.html
|
| @@ -0,0 +1,18 @@
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +<script>
|
| +if (window.testRunner)
|
| + testRunner.setDisallowedSubresourcePathSuffixes(["echo"]);
|
| +
|
| +async_test(t => {
|
| + let ws_allow = new WebSocket("ws://localhost:8880/pong?payload=Hello");
|
| + ws_allow.onopen = t.step_func_done();
|
| +}, "Allow websocket connection without matching rule");
|
| +
|
| +async_test(t => {
|
| + let ws_disallow= new WebSocket("ws://localhost:8880/echo");
|
| + ws_disallow.onclose = t.step_func_done();
|
| + ws_disallow.onopen =
|
| + t.unreached_func("Should not open disallowed web socket connections");
|
| +}, "Filter websocket connection successfully");
|
| +</script>
|
|
|