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

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

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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 | « talk/app/webrtc/webrtcsession.cc ('k') | talk/app/webrtc/webrtcsessiondescriptionfactory.cc » ('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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 void InitWithDtls(RTCCertificateGenerationMethod cert_gen_method) { 417 void InitWithDtls(RTCCertificateGenerationMethod cert_gen_method) {
418 rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store; 418 rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store;
419 PeerConnectionInterface::RTCConfiguration configuration; 419 PeerConnectionInterface::RTCConfiguration configuration;
420 if (cert_gen_method == ALREADY_GENERATED) { 420 if (cert_gen_method == ALREADY_GENERATED) {
421 configuration.certificates.push_back( 421 configuration.certificates.push_back(
422 FakeDtlsIdentityStore::GenerateCertificate()); 422 FakeDtlsIdentityStore::GenerateCertificate());
423 } else if (cert_gen_method == DTLS_IDENTITY_STORE) { 423 } else if (cert_gen_method == DTLS_IDENTITY_STORE) {
424 dtls_identity_store.reset(new FakeDtlsIdentityStore()); 424 dtls_identity_store.reset(new FakeDtlsIdentityStore());
425 dtls_identity_store->set_should_fail(false); 425 dtls_identity_store->set_should_fail(false);
426 } else { 426 } else {
427 CHECK(false); 427 RTC_CHECK(false);
428 } 428 }
429 Init(dtls_identity_store.Pass(), configuration); 429 Init(dtls_identity_store.Pass(), configuration);
430 } 430 }
431 431
432 // Init with DTLS with a store that will fail to generate a certificate. 432 // Init with DTLS with a store that will fail to generate a certificate.
433 void InitWithDtlsIdentityGenFail() { 433 void InitWithDtlsIdentityGenFail() {
434 rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store( 434 rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store(
435 new FakeDtlsIdentityStore()); 435 new FakeDtlsIdentityStore());
436 dtls_identity_store->set_should_fail(true); 436 dtls_identity_store->set_should_fail(true);
437 PeerConnectionInterface::RTCConfiguration configuration; 437 PeerConnectionInterface::RTCConfiguration configuration;
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 } 1230 }
1231 1231
1232 void VerifyMultipleAsyncCreateDescriptionIdentityGenFailure( 1232 void VerifyMultipleAsyncCreateDescriptionIdentityGenFailure(
1233 CreateSessionDescriptionRequest::Type type) { 1233 CreateSessionDescriptionRequest::Type type) {
1234 InitWithDtlsIdentityGenFail(); 1234 InitWithDtlsIdentityGenFail();
1235 VerifyMultipleAsyncCreateDescriptionAfterInit(false, type); 1235 VerifyMultipleAsyncCreateDescriptionAfterInit(false, type);
1236 } 1236 }
1237 1237
1238 void VerifyMultipleAsyncCreateDescriptionAfterInit( 1238 void VerifyMultipleAsyncCreateDescriptionAfterInit(
1239 bool success, CreateSessionDescriptionRequest::Type type) { 1239 bool success, CreateSessionDescriptionRequest::Type type) {
1240 CHECK(session_); 1240 RTC_CHECK(session_);
1241 SetFactoryDtlsSrtp(); 1241 SetFactoryDtlsSrtp();
1242 if (type == CreateSessionDescriptionRequest::kAnswer) { 1242 if (type == CreateSessionDescriptionRequest::kAnswer) {
1243 cricket::MediaSessionOptions options; 1243 cricket::MediaSessionOptions options;
1244 scoped_ptr<JsepSessionDescription> offer( 1244 scoped_ptr<JsepSessionDescription> offer(
1245 CreateRemoteOffer(options, cricket::SEC_DISABLED)); 1245 CreateRemoteOffer(options, cricket::SEC_DISABLED));
1246 ASSERT_TRUE(offer.get() != NULL); 1246 ASSERT_TRUE(offer.get() != NULL);
1247 SetRemoteDescriptionWithoutError(offer.release()); 1247 SetRemoteDescriptionWithoutError(offer.release());
1248 } 1248 }
1249 1249
1250 PeerConnectionInterface::RTCOfferAnswerOptions options; 1250 PeerConnectionInterface::RTCOfferAnswerOptions options;
(...skipping 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after
4004 } 4004 }
4005 } 4005 }
4006 4006
4007 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 4007 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
4008 // currently fails because upon disconnection and reconnection OnIceComplete is 4008 // currently fails because upon disconnection and reconnection OnIceComplete is
4009 // called more than once without returning to IceGatheringGathering. 4009 // called more than once without returning to IceGatheringGathering.
4010 4010
4011 INSTANTIATE_TEST_CASE_P( 4011 INSTANTIATE_TEST_CASE_P(
4012 WebRtcSessionTests, WebRtcSessionTest, 4012 WebRtcSessionTests, WebRtcSessionTest,
4013 testing::Values(ALREADY_GENERATED, DTLS_IDENTITY_STORE)); 4013 testing::Values(ALREADY_GENERATED, DTLS_IDENTITY_STORE));
OLDNEW
« no previous file with comments | « talk/app/webrtc/webrtcsession.cc ('k') | talk/app/webrtc/webrtcsessiondescriptionfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698