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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-websocket.php

Issue 2362263003: Disable WebSockets API in suborigins (Closed)
Patch Set: Rebase on ToT Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-websocket.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-dom-access.php b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-websocket.php
similarity index 63%
copy from third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-dom-access.php
copy to third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-websocket.php
index acd1adde48e5ad123577e8bfe66437b732256fac..ce1eb205d9943468cec321f36faf8bcb5e942c40 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-service-worker-dom-access.php
+++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/suborigin-websocket.php
@@ -1,18 +1,18 @@
-<?php
-header("Suborigin: foobar");
-?>
+<?php header("Suborigin: foobar"); ?>
<!DOCTYPE html>
<html>
<head>
-<title>Service worker JavaScript API fails from a suborigin</title>
+<title>WebSocket access is disallowed in suborigins</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
+<body>
<script>
var expectedError = new DOMException("TEST EXCEPTION", "SecurityError");
assert_throws(expectedError, function() {
- navigator.serviceWorker;
+ var ws = new WebSocket("ws://127.0.0.1:8880/simple");
});
done();
</script>
+</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698