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

Side by Side Diff: net/data/websocket/proxied_request_check.html

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/data/websocket/protocol-test_wsh.py ('k') | net/data/websocket/split_packet_check.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 <title>test proxied ws connection</title>
4 </head>
5 <script type="text/javascript">
6 // Do connection test and check the headers arrive at the WebSocket.
7
8 var protocol = location.protocol.replace('http', 'ws');
9 var url = protocol + '//' + location.host + '/echo-request-headers';
10 var ws = new WebSocket(url);
11
12 ws.onmessage = function(evt)
13 {
14 var headers = JSON.parse(evt.data);
15 for (var name in headers) {
16 // The keys in the serialized data are lower cased.
17 if (name.startsWith('proxy-')) {
18 document.title = 'FAIL';
19 return;
20 }
21 }
22
23 // Set document title to 'PASS'. The test observer catches this title changes
24 // to know the result.
25 document.title = 'PASS';
26 }
27
28 ws.onclose = function()
29 {
30 document.title = 'FAIL';
31 }
32 </script>
OLDNEW
« no previous file with comments | « net/data/websocket/protocol-test_wsh.py ('k') | net/data/websocket/split_packet_check.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698