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

Side by Side Diff: chrome/test/data/http/tests/ws.html

Issue 11085039: WebSocket test server migration on browser_tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: protected -> private Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>test ws connection</title>
5 <script type="text/javascript">
6
7 var href = window.location.href;
8 var portBegin = href.lastIndexOf(':') + 1;
9 var portEnd = href.lastIndexOf('/');
10 var port = href.slice(portBegin, portEnd);
11 var scheme = href.indexOf('https') >= 0 ? 'wss' : 'ws';
12 var url = scheme + '://localhost:' + port + '/websocket/tests/echo';
13
14 // Do connection test.
15 var ws = new WebSocket(url);
16
17 ws.onopen = function()
18 {
19 // Set document title to 'PASS'. The test observer catches this title changes
20 // to know the result.
21 document.title = 'PASS';
22 }
23
24 ws.onclose = function()
25 {
26 // Set document title to 'FAIL'.
27 document.title = 'FAIL';
28 }
29
30 </script>
31 </head>
32 </html>
OLDNEW
« no previous file with comments | « chrome/test/data/http/tests/websocket/tests/echo_wsh.py ('k') | chrome/test/data/ssl/wss_close.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698