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

Unified Diff: webrtc/modules/congestion_controller/include/mock/mock_send_side_congestion_controller.h

Issue 2834663003: Allow mocking SendSideCongestionController for Call tests. (Closed)
Patch Set: rebase Created 3 years, 7 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: webrtc/modules/congestion_controller/include/mock/mock_send_side_congestion_controller.h
diff --git a/webrtc/modules/congestion_controller/include/mock/mock_send_side_congestion_controller.h b/webrtc/modules/congestion_controller/include/mock/mock_send_side_congestion_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..e71ec8fff4ce14ced47fb4e383b1b78b166ff505
--- /dev/null
+++ b/webrtc/modules/congestion_controller/include/mock/mock_send_side_congestion_controller.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_SEND_SIDE_CONGESTION_CONTROLLER_H_
+#define WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_SEND_SIDE_CONGESTION_CONTROLLER_H_
+
+#include "webrtc/modules/congestion_controller/include/send_side_congestion_controller.h"
+#include "webrtc/test/gmock.h"
+
+namespace webrtc {
+namespace test {
+
+class MockSendSideCongestionController : public SendSideCongestionController {
+ public:
+ MockSendSideCongestionController(const Clock* clock,
+ RtcEventLog* event_log,
+ PacketRouter* packet_router)
+ : SendSideCongestionController(clock,
+ nullptr /* observer */,
+ event_log,
+ packet_router) {}
+
+ MOCK_METHOD3(SetBweBitrates,
+ void(int min_bitrate_bps,
+ int start_bitrate_bps,
+ int max_bitrate_bps));
+};
+
+} // namespace test
+} // namespace webrtc
+
+#endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_INCLUDE_MOCK_MOCK_SEND_SIDE_CONGESTION_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698