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

Unified Diff: content/browser/renderer_host/websocket_dispatcher_host_unittest.cc

Issue 972963002: Per-renderer WebSocket throttling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style fixes, bug fixes. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/websocket_dispatcher_host_unittest.cc
diff --git a/content/browser/renderer_host/websocket_dispatcher_host_unittest.cc b/content/browser/renderer_host/websocket_dispatcher_host_unittest.cc
index 0d2e7057bbcef5c0d90dadebc580843114e208bd..0b66297be7b42d96b25b76233a6196b045d93e47 100644
--- a/content/browser/renderer_host/websocket_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/websocket_dispatcher_host_unittest.cc
@@ -33,6 +33,7 @@ class MockWebSocketHost : public WebSocketHost {
MockWebSocketHost(int routing_id,
WebSocketDispatcherHost* dispatcher,
net::URLRequestContext* url_request_context,
+ int delay_in_ms,
WebSocketDispatcherHostTest* owner);
~MockWebSocketHost() override {}
@@ -89,9 +90,9 @@ class WebSocketDispatcherHostTest : public ::testing::Test {
return NULL;
}
- WebSocketHost* CreateWebSocketHost(int routing_id) {
- MockWebSocketHost* host =
- new MockWebSocketHost(routing_id, dispatcher_host_.get(), NULL, this);
+ WebSocketHost* CreateWebSocketHost(int routing_id, int delay_in_ms) {
+ MockWebSocketHost* host = new MockWebSocketHost(
+ routing_id, dispatcher_host_.get(), NULL, delay_in_ms, this);
mock_hosts_.push_back(host);
return host;
}
@@ -101,8 +102,9 @@ MockWebSocketHost::MockWebSocketHost(
int routing_id,
WebSocketDispatcherHost* dispatcher,
net::URLRequestContext* url_request_context,
+ int delay_in_ms,
WebSocketDispatcherHostTest* owner)
- : WebSocketHost(routing_id, dispatcher, url_request_context),
+ : WebSocketHost(routing_id, dispatcher, url_request_context, delay_in_ms),
owner_(owner->GetWeakPtr()) {}
void MockWebSocketHost::GoAway() {

Powered by Google App Engine
This is Rietveld 408576698