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_; |