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

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

Issue 1845673002: Removing `preference` field from `cricket::Codec`. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing sort order (got reversed when optimizations were made) 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/webrtcsdp_unittest.cc ('k') | webrtc/media/base/codec.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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 // Init with DTLS with a store that will fail to generate a certificate. 443 // Init with DTLS with a store that will fail to generate a certificate.
444 void InitWithDtlsIdentityGenFail() { 444 void InitWithDtlsIdentityGenFail() {
445 rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store( 445 rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store(
446 new FakeDtlsIdentityStore()); 446 new FakeDtlsIdentityStore());
447 dtls_identity_store->set_should_fail(true); 447 dtls_identity_store->set_should_fail(true);
448 Init(std::move(dtls_identity_store)); 448 Init(std::move(dtls_identity_store));
449 } 449 }
450 450
451 void InitWithDtmfCodec() { 451 void InitWithDtmfCodec() {
452 // Add kTelephoneEventCodec for dtmf test. 452 // Add kTelephoneEventCodec for dtmf test.
453 const cricket::AudioCodec kTelephoneEventCodec( 453 const cricket::AudioCodec kTelephoneEventCodec(106, "telephone-event", 8000,
454 106, "telephone-event", 8000, 0, 1, 0); 454 0, 1);
455 std::vector<cricket::AudioCodec> codecs; 455 std::vector<cricket::AudioCodec> codecs;
456 codecs.push_back(kTelephoneEventCodec); 456 codecs.push_back(kTelephoneEventCodec);
457 media_engine_->SetAudioCodecs(codecs); 457 media_engine_->SetAudioCodecs(codecs);
458 desc_factory_->set_audio_codecs(codecs); 458 desc_factory_->set_audio_codecs(codecs);
459 Init(); 459 Init();
460 } 460 }
461 461
462 void SendAudioVideoStream1() { 462 void SendAudioVideoStream1() {
463 send_stream_1_ = true; 463 send_stream_1_ = true;
464 send_stream_2_ = false; 464 send_stream_2_ = false;
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 media_engine_->GetVideoChannel(0) 1306 media_engine_->GetVideoChannel(0)
1307 ->SendRtp(test_packet, sizeof(test_packet), options); 1307 ->SendRtp(test_packet, sizeof(test_packet), options);
1308 1308
1309 const int kPacketTimeout = 2000; 1309 const int kPacketTimeout = 2000;
1310 EXPECT_EQ_WAIT(fake_call_.last_sent_packet().packet_id, 10, kPacketTimeout); 1310 EXPECT_EQ_WAIT(fake_call_.last_sent_packet().packet_id, 10, kPacketTimeout);
1311 EXPECT_GT(fake_call_.last_sent_packet().send_time_ms, -1); 1311 EXPECT_GT(fake_call_.last_sent_packet().send_time_ms, -1);
1312 } 1312 }
1313 1313
1314 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory. 1314 // Adds CN codecs to FakeMediaEngine and MediaDescriptionFactory.
1315 void AddCNCodecs() { 1315 void AddCNCodecs() {
1316 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1, 0); 1316 const cricket::AudioCodec kCNCodec1(102, "CN", 8000, 0, 1);
1317 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1, 0); 1317 const cricket::AudioCodec kCNCodec2(103, "CN", 16000, 0, 1);
1318 1318
1319 // Add kCNCodec for dtmf test. 1319 // Add kCNCodec for dtmf test.
1320 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();; 1320 std::vector<cricket::AudioCodec> codecs = media_engine_->audio_codecs();;
1321 codecs.push_back(kCNCodec1); 1321 codecs.push_back(kCNCodec1);
1322 codecs.push_back(kCNCodec2); 1322 codecs.push_back(kCNCodec2);
1323 media_engine_->SetAudioCodecs(codecs); 1323 media_engine_->SetAudioCodecs(codecs);
1324 desc_factory_->set_audio_codecs(codecs); 1324 desc_factory_->set_audio_codecs(codecs);
1325 } 1325 }
1326 1326
1327 bool VerifyNoCNCodecs(const cricket::ContentInfo* content) { 1327 bool VerifyNoCNCodecs(const cricket::ContentInfo* content) {
(...skipping 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after
4403 } 4403 }
4404 4404
4405 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 4405 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
4406 // currently fails because upon disconnection and reconnection OnIceComplete is 4406 // currently fails because upon disconnection and reconnection OnIceComplete is
4407 // called more than once without returning to IceGatheringGathering. 4407 // called more than once without returning to IceGatheringGathering.
4408 4408
4409 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, 4409 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests,
4410 WebRtcSessionTest, 4410 WebRtcSessionTest,
4411 testing::Values(ALREADY_GENERATED, 4411 testing::Values(ALREADY_GENERATED,
4412 DTLS_IDENTITY_STORE)); 4412 DTLS_IDENTITY_STORE));
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsdp_unittest.cc ('k') | webrtc/media/base/codec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698