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

Unified Diff: webrtc/api/peerconnection_unittest.cc

Issue 1875713002: New peerconnection test case, for video stream forwarding. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address nits. Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnection_unittest.cc
diff --git a/webrtc/api/peerconnection_unittest.cc b/webrtc/api/peerconnection_unittest.cc
index 99be22f4591ad70e9c232463a5ec0b46d26bfd42..156605c9b9b9679fde7f3042a6067a7806763a96 100644
--- a/webrtc/api/peerconnection_unittest.cc
+++ b/webrtc/api/peerconnection_unittest.cc
@@ -1981,6 +1981,39 @@ TEST_F(P2PTestConductor, EarlyWarmupTest) {
kMaxWaitForFramesMs);
}
+TEST_F(P2PTestConductor, ForwardVideoOnlyStream) {
+ 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() == 1);
+
+ // 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698