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

Side by Side Diff: talk/app/webrtc/peerconnection_unittest.cc

Issue 1538673002: Adding a MediaStream parameter to createSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Just take a string as a parameter, for simplicity. Created 5 years 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 unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/peerconnection.cc ('k') | talk/app/webrtc/peerconnectioninterface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 ASSERT_TRUE(CreateTestClients()); 1790 ASSERT_TRUE(CreateTestClients());
1791 EnableVideoDecoderFactory(); 1791 EnableVideoDecoderFactory();
1792 LocalP2PTest(); 1792 LocalP2PTest();
1793 } 1793 }
1794 1794
1795 // This tests that if we negotiate after calling CreateSender but before we 1795 // This tests that if we negotiate after calling CreateSender but before we
1796 // have a track, then set a track later, frames from the newly-set track are 1796 // have a track, then set a track later, frames from the newly-set track are
1797 // received end-to-end. 1797 // received end-to-end.
1798 TEST_F(P2PTestConductor, EarlyWarmupTest) { 1798 TEST_F(P2PTestConductor, EarlyWarmupTest) {
1799 ASSERT_TRUE(CreateTestClients()); 1799 ASSERT_TRUE(CreateTestClients());
1800 auto audio_sender = initializing_client()->pc()->CreateSender("audio"); 1800 auto audio_sender =
1801 auto video_sender = initializing_client()->pc()->CreateSender("video"); 1801 initializing_client()->pc()->CreateSender("audio", "stream_id");
1802 auto video_sender =
1803 initializing_client()->pc()->CreateSender("video", "stream_id");
1802 initializing_client()->Negotiate(); 1804 initializing_client()->Negotiate();
1803 // Wait for ICE connection to complete, without any tracks. 1805 // Wait for ICE connection to complete, without any tracks.
1804 // Note that the receiving client WILL (in HandleIncomingOffer) create 1806 // Note that the receiving client WILL (in HandleIncomingOffer) create
1805 // tracks, so it's only the initiator here that's doing early warmup. 1807 // tracks, so it's only the initiator here that's doing early warmup.
1806 ASSERT_TRUE_WAIT(SessionActive(), kMaxWaitForActivationMs); 1808 ASSERT_TRUE_WAIT(SessionActive(), kMaxWaitForActivationMs);
1807 VerifySessionDescriptions(); 1809 VerifySessionDescriptions();
1808 EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceConnectionCompleted, 1810 EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceConnectionCompleted,
1809 initializing_client()->ice_connection_state(), 1811 initializing_client()->ice_connection_state(),
1810 kMaxWaitForFramesMs); 1812 kMaxWaitForFramesMs);
1811 EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceConnectionConnected, 1813 EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceConnectionConnected,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 server.urls.push_back("stun:hostname"); 1992 server.urls.push_back("stun:hostname");
1991 server.urls.push_back("turn:hostname"); 1993 server.urls.push_back("turn:hostname");
1992 servers.push_back(server); 1994 servers.push_back(server);
1993 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_configurations_, 1995 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_configurations_,
1994 &turn_configurations_)); 1996 &turn_configurations_));
1995 EXPECT_EQ(1U, stun_configurations_.size()); 1997 EXPECT_EQ(1U, stun_configurations_.size());
1996 EXPECT_EQ(1U, turn_configurations_.size()); 1998 EXPECT_EQ(1U, turn_configurations_.size());
1997 } 1999 }
1998 2000
1999 #endif // if !defined(THREAD_SANITIZER) 2001 #endif // if !defined(THREAD_SANITIZER)
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnection.cc ('k') | talk/app/webrtc/peerconnectioninterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698