OLD | NEW |
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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 | 1319 |
1320 // Wait for channel to be ready for sending. | 1320 // Wait for channel to be ready for sending. |
1321 EXPECT_TRUE_WAIT(media_engine_->GetVideoChannel(0)->sending(), 100); | 1321 EXPECT_TRUE_WAIT(media_engine_->GetVideoChannel(0)->sending(), 100); |
1322 uint8_t test_packet[15] = {0}; | 1322 uint8_t test_packet[15] = {0}; |
1323 rtc::PacketOptions options; | 1323 rtc::PacketOptions options; |
1324 options.packet_id = 10; | 1324 options.packet_id = 10; |
1325 media_engine_->GetVideoChannel(0) | 1325 media_engine_->GetVideoChannel(0) |
1326 ->SendRtp(test_packet, sizeof(test_packet), options); | 1326 ->SendRtp(test_packet, sizeof(test_packet), options); |
1327 | 1327 |
1328 const int kPacketTimeout = 2000; | 1328 const int kPacketTimeout = 2000; |
1329 EXPECT_EQ_WAIT(fake_call_.last_sent_packet().packet_id, 10, kPacketTimeout); | 1329 EXPECT_EQ_WAIT(10, fake_call_.last_sent_nonnegative_packet_id(), |
| 1330 kPacketTimeout); |
1330 EXPECT_GT(fake_call_.last_sent_packet().send_time_ms, -1); | 1331 EXPECT_GT(fake_call_.last_sent_packet().send_time_ms, -1); |
1331 } | 1332 } |
1332 | 1333 |
1333 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory. | 1334 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory. |
1334 void AddCNCodecs() { | 1335 void AddCNCodecs() { |
1335 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1); | 1336 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1); |
1336 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1); | 1337 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1); |
1337 | 1338 |
1338 // Add kCNCodec for dtmf test. | 1339 // Add kCNCodec for dtmf test. |
1339 std::vector<cricket::AudioCodec> codecs = | 1340 std::vector<cricket::AudioCodec> codecs = |
(...skipping 3078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4418 } | 4419 } |
4419 | 4420 |
4420 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4421 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4421 // currently fails because upon disconnection and reconnection OnIceComplete is | 4422 // currently fails because upon disconnection and reconnection OnIceComplete is |
4422 // called more than once without returning to IceGatheringGathering. | 4423 // called more than once without returning to IceGatheringGathering. |
4423 | 4424 |
4424 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4425 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4425 WebRtcSessionTest, | 4426 WebRtcSessionTest, |
4426 testing::Values(ALREADY_GENERATED, | 4427 testing::Values(ALREADY_GENERATED, |
4427 DTLS_IDENTITY_STORE)); | 4428 DTLS_IDENTITY_STORE)); |
OLD | NEW |