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

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 2353033005: Refactoring: move ownership of RtcEventLog from Call to PeerConnection (Closed)
Patch Set: Updated unit tests to use RtcEventLogNullImpl. Created 4 years, 2 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
« webrtc/video/end_to_end_tests.cc ('K') | « webrtc/video/video_quality_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream_tests.cc
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index e6aabb9c89d9cfdc62d936bf8a0cbc1df2666674..f3ecf1f337316df100c4c3d11caf1b55c673fd4a 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -60,7 +60,9 @@ class VideoSendStreamTest : public test::CallTest {
};
TEST_F(VideoSendStreamTest, CanStartStartedStream) {
+ webrtc::RtcEventLogNullImpl event_log;
Call::Config call_config;
+ call_config.event_log = &event_log;
CreateSenderCall(call_config);
test::NullTransport transport;
@@ -72,7 +74,9 @@ TEST_F(VideoSendStreamTest, CanStartStartedStream) {
}
TEST_F(VideoSendStreamTest, CanStopStoppedStream) {
+ webrtc::RtcEventLogNullImpl event_log;
Call::Config call_config;
+ call_config.event_log = &event_log;
CreateSenderCall(call_config);
test::NullTransport transport;
@@ -738,6 +742,7 @@ void VideoSendStreamTest::TestPacketFragmentationSize(VideoFormat format,
Call::Config config;
const int kMinBitrateBps = 30000;
config.bitrate_config.min_bitrate_bps = kMinBitrateBps;
+ config.event_log = &event_log_;
return config;
}
@@ -769,6 +774,7 @@ void VideoSendStreamTest::TestPacketFragmentationSize(VideoFormat format,
EXPECT_TRUE(Wait()) << "Timed out while observing incoming RTP packets.";
}
+ webrtc::RtcEventLogNullImpl event_log_;
std::unique_ptr<internal::TransportAdapter> transport_adapter_;
test::ConfigurableFrameSizeEncoder encoder_;
@@ -1438,7 +1444,10 @@ TEST_F(VideoSendStreamTest,
int last_initialized_frame_height_ GUARDED_BY(&crit_);
};
- CreateSenderCall(Call::Config());
+ webrtc::RtcEventLogNullImpl event_log;
+ Call::Config call_config;
+ call_config.event_log = &event_log;
+ CreateSenderCall(call_config);
test::NullTransport transport;
CreateSendConfig(1, 0, &transport);
EncoderObserver encoder;
@@ -1494,7 +1503,10 @@ TEST_F(VideoSendStreamTest, CanReconfigureToUseStartBitrateAbovePreviousMax) {
int start_bitrate_kbps_ GUARDED_BY(crit_);
};
- CreateSenderCall(Call::Config());
+ webrtc::RtcEventLogNullImpl event_log;
+ Call::Config call_config;
+ call_config.event_log = &event_log;
+ CreateSenderCall(call_config);
test::NullTransport transport;
CreateSendConfig(1, 0, &transport);
@@ -1575,7 +1587,10 @@ TEST_F(VideoSendStreamTest, VideoSendStreamStopSetEncoderRateToZero) {
int bitrate_kbps_ GUARDED_BY(crit_);
};
- CreateSenderCall(Call::Config());
+ webrtc::RtcEventLogNullImpl event_log;
+ Call::Config call_config;
+ call_config.event_log = &event_log;
+ CreateSenderCall(call_config);
test::NullTransport transport;
CreateSendConfig(1, 0, &transport);
@@ -1630,7 +1645,10 @@ TEST_F(VideoSendStreamTest, CapturesTextureAndVideoFrames) {
};
// Initialize send stream.
- CreateSenderCall(Call::Config());
+ webrtc::RtcEventLogNullImpl event_log;
+ Call::Config call_config;
+ call_config.event_log = &event_log;
+ CreateSenderCall(call_config);
test::NullTransport transport;
CreateSendConfig(1, 0, &transport);
@@ -2270,6 +2288,7 @@ TEST_F(VideoSendStreamTest, ReconfigureBitratesSetsEncoderBitratesCorrectly) {
Call::Config GetSenderCallConfig() override {
Call::Config config;
+ config.event_log = &event_log_;
config.bitrate_config.min_bitrate_bps = kMinBitrateKbps * 1000;
config.bitrate_config.start_bitrate_bps = kStartBitrateKbps * 1000;
config.bitrate_config.max_bitrate_bps = kMaxBitrateKbps * 1000;
@@ -2351,6 +2370,7 @@ TEST_F(VideoSendStreamTest, ReconfigureBitratesSetsEncoderBitratesCorrectly) {
WaitForSetRates(kIncreasedStartBitrateKbps);
}
+ webrtc::RtcEventLogNullImpl event_log_;
rtc::Event init_encode_event_;
rtc::Event bitrate_changed_event_;
rtc::CriticalSection crit_;
« webrtc/video/end_to_end_tests.cc ('K') | « webrtc/video/video_quality_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698