| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |