Chromium Code Reviews| Index: webrtc/api/peerconnection_unittest.cc |
| diff --git a/webrtc/api/peerconnection_unittest.cc b/webrtc/api/peerconnection_unittest.cc |
| index 99be22f4591ad70e9c232463a5ec0b46d26bfd42..69eb25cf5450b904c82fda9b91c6914eee64d468 100644 |
| --- a/webrtc/api/peerconnection_unittest.cc |
| +++ b/webrtc/api/peerconnection_unittest.cc |
| @@ -1981,6 +1981,40 @@ TEST_F(P2PTestConductor, EarlyWarmupTest) { |
| kMaxWaitForFramesMs); |
| } |
| +TEST_F(P2PTestConductor, StreamForwardVideoOnly) { |
|
perkj_webrtc
2016/04/21 08:18:28
Name ForwardVideoOnlyStream?
nisse-webrtc
2016/04/22 11:13:09
Done.
|
| + ASSERT_TRUE(CreateTestClients()); |
| + // One-way stream |
| + receiving_client()->set_auto_add_stream(false); |
| + // Video only, audio forwarding not expected to work. |
| + initializing_client()->AddMediaStream(false, true); |
| + initializing_client()->Negotiate(); |
| + |
| + ASSERT_TRUE_WAIT(SessionActive(), kMaxWaitForActivationMs); |
| + VerifySessionDescriptions(); |
| + |
| + ASSERT_TRUE (initializing_client()->can_receive_video()); |
|
pbos-webrtc
2016/04/21 13:03:23
git cl format please
nisse-webrtc
2016/04/22 11:13:08
Done.
|
| + ASSERT_TRUE (receiving_client()->can_receive_video()); |
| + |
| + EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceConnectionCompleted, |
| + initializing_client()->ice_connection_state(), |
| + kMaxWaitForFramesMs); |
| + EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceConnectionConnected, |
| + receiving_client()->ice_connection_state(), |
| + kMaxWaitForFramesMs); |
| + |
| + ASSERT_TRUE(receiving_client()->remote_streams()->count() > 0); |
| + EXPECT_TRUE(receiving_client()->remote_streams()->count() == 1); |
|
perkj_webrtc
2016/04/21 08:18:28
nit: ASSERT_TRUE == 1 only.
nisse-webrtc
2016/04/22 11:13:08
Done.
|
| + |
| + // Echo the stream back. |
| + receiving_client()->pc()->AddStream( |
| + receiving_client()->remote_streams()->at(0)); |
| + receiving_client()->Negotiate(); |
| + |
| + EXPECT_TRUE_WAIT( |
| + initializing_client()->VideoFramesReceivedCheck(kEndVideoFrameCount), |
| + kMaxWaitForFramesMs); |
| +} |
| + |
| class IceServerParsingTest : public testing::Test { |
| public: |
| // Convenience for parsing a single URL. |