Index: webrtc/api/peerconnectioninterface_unittest.cc |
diff --git a/webrtc/api/peerconnectioninterface_unittest.cc b/webrtc/api/peerconnectioninterface_unittest.cc |
index 701ab3c001e6ab1cc08fd2ad9046314dca5e8707..d2d565b0f7882d39f849b661150f23fd219794e8 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_; |