Chromium Code Reviews| Index: webrtc/api/peerconnection_unittest.cc |
| diff --git a/webrtc/api/peerconnection_unittest.cc b/webrtc/api/peerconnection_unittest.cc |
| index 67b4efbc73f8db9670f4f8c8e59343c91329272f..ffaa524b562dad3d34452d464b9e1b54bc39193b 100644 |
| --- a/webrtc/api/peerconnection_unittest.cc |
| +++ b/webrtc/api/peerconnection_unittest.cc |
| @@ -1970,6 +1970,42 @@ TEST_F(P2PTestConductor, EarlyWarmupTest) { |
| kMaxWaitForFramesMs); |
| } |
| +TEST_F(P2PTestConductor, StreamForwardVideoOnly) { |
| + 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()); |
| + 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); |
| + |
| + LOG(INFO) << "XXXXX Echoing stream XXXXX"; |
|
perkj_webrtc
2016/04/08 14:34:07
remove this log
nisse-webrtc
2016/04/11 06:35:39
Deleted locally, should be gone in next upload.
|
| + |
| + // 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. |