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

Side by Side Diff: net/data/websocket/multiple-connections.html

Issue 1318973002: Update WebSocketBrowserTest.SSLConnectionLimit test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove comment about needing to update the limit Created 3 years, 4 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <title>WebSocket is not subject to HTTP(S) connection limit</title> 1 <title>WebSocket is not subject to HTTP(S) connection limit</title>
2 <script> 2 <script>
3 var protocol = location.protocol.replace('http', 'ws'); 3 var protocol = location.protocol.replace('http', 'ws');
4 var url = protocol + '//' + location.host + '/echo-with-no-extension'; 4 var url = protocol + '//' + location.host + '/echo-with-no-extension';
5 5
6 // TODO(ricea): The limit for ws: is 255, but wss: gets a limit of 30 6 const SOCKETS_TO_OPEN = 255;
7 // (per-host:port, not ip:port!) because it still uses the HTTP pool code. This
8 // should be fixed at some point. When it is, change this number back to 50 (or
9 // even larger, if it works).
10 const SOCKETS_TO_OPEN = 30;
11 7
12 // PARALLELISM limits the number of connections we try to open simultaneously. 8 // PARALLELISM limits the number of connections we try to open simultaneously.
13 // This avoids triggering the throttling added in http://crrev.com/972963002, 9 // This avoids triggering the throttling added in http://crrev.com/972963002,
14 // which otherwise slows the test down considerably. 10 // which otherwise slows the test down considerably.
15 const PARALLELISM = 2; 11 const PARALLELISM = 2;
16 12
17 var created = 0; 13 var created = 0;
18 var connected = 0; 14 var connected = 0;
19 15
20 function createNewWebSocket() 16 function createNewWebSocket()
(...skipping 15 matching lines...) Expand all
36 }; 32 };
37 } 33 }
38 34
39 for (var i = 0; i < PARALLELISM; ++i) { 35 for (var i = 0; i < PARALLELISM; ++i) {
40 createNewWebSocket(); 36 createNewWebSocket();
41 } 37 }
42 38
43 setTimeout(function() { 39 setTimeout(function() {
44 console.log("Got stuck after " + connected + " socket(s) connected"); 40 console.log("Got stuck after " + connected + " socket(s) connected");
45 document.title = "FAIL"; 41 document.title = "FAIL";
46 }, 5000); 42 }, 11000);
47 </script> 43 </script>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698