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

Side by Side Diff: webrtc/api/webrtcsession_unittest.cc

Issue 1903393004: Added network thread to rtc::BaseChannel (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix flakiness of WebRtcSessionTest.TestPacketOptionsAndOnPacketSent Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | webrtc/media/base/fakemediaengine.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 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 } 1309 }
1310 1310
1311 void TestPacketOptions() { 1311 void TestPacketOptions() {
1312 media_controller_.reset( 1312 media_controller_.reset(
1313 new cricket::FakeMediaController(channel_manager_.get(), &fake_call_)); 1313 new cricket::FakeMediaController(channel_manager_.get(), &fake_call_));
1314 LoopbackNetworkConfiguration config; 1314 LoopbackNetworkConfiguration config;
1315 LoopbackNetworkManager loopback_network_manager(this, config); 1315 LoopbackNetworkManager loopback_network_manager(this, config);
1316 1316
1317 SetupLoopbackCall(); 1317 SetupLoopbackCall();
1318 1318
1319 // Wait for channel to be ready for sending.
1320 EXPECT_TRUE_WAIT(media_engine_->GetVideoChannel(0)->sending(), 100);
1319 uint8_t test_packet[15] = {0}; 1321 uint8_t test_packet[15] = {0};
1320 rtc::PacketOptions options; 1322 rtc::PacketOptions options;
1321 options.packet_id = 10; 1323 options.packet_id = 10;
1322 media_engine_->GetVideoChannel(0) 1324 media_engine_->GetVideoChannel(0)
1323 ->SendRtp(test_packet, sizeof(test_packet), options); 1325 ->SendRtp(test_packet, sizeof(test_packet), options);
1324 1326
1325 const int kPacketTimeout = 2000; 1327 const int kPacketTimeout = 2000;
1326 EXPECT_EQ_WAIT(fake_call_.last_sent_packet().packet_id, 10, kPacketTimeout); 1328 EXPECT_EQ_WAIT(fake_call_.last_sent_packet().packet_id, 10, kPacketTimeout);
1327 EXPECT_GT(fake_call_.last_sent_packet().send_time_ms, -1); 1329 EXPECT_GT(fake_call_.last_sent_packet().send_time_ms, -1);
1328 } 1330 }
(...skipping 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after
4404 } 4406 }
4405 4407
4406 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 4408 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
4407 // currently fails because upon disconnection and reconnection OnIceComplete is 4409 // currently fails because upon disconnection and reconnection OnIceComplete is
4408 // called more than once without returning to IceGatheringGathering. 4410 // called more than once without returning to IceGatheringGathering.
4409 4411
4410 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, 4412 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests,
4411 WebRtcSessionTest, 4413 WebRtcSessionTest,
4412 testing::Values(ALREADY_GENERATED, 4414 testing::Values(ALREADY_GENERATED,
4413 DTLS_IDENTITY_STORE)); 4415 DTLS_IDENTITY_STORE));
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | webrtc/media/base/fakemediaengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698