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

Side by Side 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, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <?php 1 <?php header("Suborigin: foobar"); ?>
2 header("Suborigin: foobar");
3 ?>
4 <!DOCTYPE html> 2 <!DOCTYPE html>
5 <html> 3 <html>
6 <head> 4 <head>
7 <title>Service worker JavaScript API fails from a suborigin</title> 5 <title>WebSocket access is disallowed in suborigins</title>
8 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharness.js"></script>
9 <script src="/resources/testharnessreport.js"></script> 7 <script src="/resources/testharnessreport.js"></script>
10 </head> 8 </head>
9 <body>
11 <script> 10 <script>
12 var expectedError = new DOMException("TEST EXCEPTION", "SecurityError"); 11 var expectedError = new DOMException("TEST EXCEPTION", "SecurityError");
13 assert_throws(expectedError, function() { 12 assert_throws(expectedError, function() {
14 navigator.serviceWorker; 13 var ws = new WebSocket("ws://127.0.0.1:8880/simple");
15 }); 14 });
16 done(); 15 done();
17 </script> 16 </script>
17 </body>
18 </html> 18 </html>
OLDNEW
« 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