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

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

Issue 10854139: Use HttpAuthController in SocketStream (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased and Skipped added browser test on chromeos Created 8 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 unified diff | Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/http/tests/wss.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>test wss connection</title> 4 <title>test ws connection</title>
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 6
7 var href = window.location.href; 7 var href = window.location.href;
8 var portBegin = href.lastIndexOf(':') + 1; 8 var portBegin = href.lastIndexOf(':') + 1;
9 var portEnd = href.lastIndexOf('/'); 9 var portEnd = href.lastIndexOf('/');
10 var port = href.slice(portBegin, portEnd); 10 var port = href.slice(portBegin, portEnd);
11 var url = 'wss://localhost:' + port + '/websocket/tests/echo'; 11 var scheme = href.indexOf('https') >= 0 ? 'wss' : 'ws';
12 var url = scheme + '://localhost:' + port + '/websocket/tests/echo';
12 13
13 // Do connection test. 14 // Do connection test.
14 var ws = new WebSocket(url); 15 var ws = new WebSocket(url);
15 16
16 ws.onopen = function() 17 ws.onopen = function()
17 { 18 {
18 // Set document title to 'PASS'. The test observer catches this title changes 19 // Set document title to 'PASS'. The test observer catches this title changes
19 // to know the result. 20 // to know the result.
20 document.title = 'PASS'; 21 document.title = 'PASS';
21 } 22 }
22 23
23 ws.onclose = function() 24 ws.onclose = function()
24 { 25 {
25 // Set document title to 'FAIL'. 26 // Set document title to 'FAIL'.
26 document.title = 'FAIL'; 27 document.title = 'FAIL';
27 } 28 }
28 29
29 function timeOutCallback()
30 {
31 // Set document title to 'FAIL'.
32 document.title = 'FAIL';
33 }
34
35 setTimeout(timeOutCallback, 3000);
36
37 </script> 30 </script>
38 </head> 31 </head>
39 </html> 32 </html>
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/data/http/tests/wss.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698