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

Unified Diff: webrtc/api/peerconnectioninterface_unittest.cc

Issue 1713043002: Late initialize MediaController, for less resource i.e. ProcessThread, usage by PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Missed one comment Created 4 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: webrtc/api/peerconnectioninterface_unittest.cc
diff --git a/webrtc/api/peerconnectioninterface_unittest.cc b/webrtc/api/peerconnectioninterface_unittest.cc
index 2c7cc128adeb03ea463895a84dc7499d98f99c48..6271ed7ea144d1b7cda867ee75439e41ab830562 100644
--- a/webrtc/api/peerconnectioninterface_unittest.cc
+++ b/webrtc/api/peerconnectioninterface_unittest.cc
@@ -2364,6 +2364,12 @@ class PeerConnectionMediaConfigTest : public testing::Test {
scoped_refptr<PeerConnectionInterface> pc(
pcf_->CreatePeerConnection(config, constraints, nullptr, nullptr,
&observer_));
+ {
+ // The MediaController is lazy initialized so in order for the below
+ // expectations not to fail, we need to trigger creation.
+ rtc::scoped_refptr<RtpSenderInterface> sender(
+ pc->CreateSender(MediaStreamTrackInterface::kAudioKind, "foo_id"));
+ }
EXPECT_TRUE(pc.get());
EXPECT_TRUE(pcf_->create_media_controller_called_);
return pcf_->create_media_controller_config_;

Powered by Google App Engine
This is Rietveld 408576698