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

Side by Side Diff: webrtc/p2p/base/p2ptransportchannel_unittest.cc

Issue 2988153003: Replace CHECK(x && y) with two separate CHECK() calls (Closed)
Patch Set: fix mistakes Created 3 years, 4 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/modules/video_coding/frame_object.cc ('k') | webrtc/p2p/client/basicportallocator.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 * Copyright 2009 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2009 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 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after
2172 EXPECT_TRUE(GetEndpoint(0)->ready_to_send_); 2172 EXPECT_TRUE(GetEndpoint(0)->ready_to_send_);
2173 EXPECT_EQ(len, SendData(ep1_ch1(), data, len)); 2173 EXPECT_EQ(len, SendData(ep1_ch1(), data, len));
2174 } 2174 }
2175 2175
2176 // Test what happens when we have 2 users behind the same NAT. This can lead 2176 // Test what happens when we have 2 users behind the same NAT. This can lead
2177 // to interesting behavior because the STUN server will only give out the 2177 // to interesting behavior because the STUN server will only give out the
2178 // address of the outermost NAT. 2178 // address of the outermost NAT.
2179 class P2PTransportChannelSameNatTest : public P2PTransportChannelTestBase { 2179 class P2PTransportChannelSameNatTest : public P2PTransportChannelTestBase {
2180 protected: 2180 protected:
2181 void ConfigureEndpoints(Config nat_type, Config config1, Config config2) { 2181 void ConfigureEndpoints(Config nat_type, Config config1, Config config2) {
2182 RTC_CHECK(nat_type >= NAT_FULL_CONE && nat_type <= NAT_SYMMETRIC); 2182 RTC_CHECK_GE(nat_type, NAT_FULL_CONE);
2183 RTC_CHECK_LE(nat_type, NAT_SYMMETRIC);
2183 rtc::NATSocketServer::Translator* outer_nat = 2184 rtc::NATSocketServer::Translator* outer_nat =
2184 nat()->AddTranslator(kPublicAddrs[0], kNatAddrs[0], 2185 nat()->AddTranslator(kPublicAddrs[0], kNatAddrs[0],
2185 static_cast<rtc::NATType>(nat_type - NAT_FULL_CONE)); 2186 static_cast<rtc::NATType>(nat_type - NAT_FULL_CONE));
2186 ConfigureEndpoint(outer_nat, 0, config1); 2187 ConfigureEndpoint(outer_nat, 0, config1);
2187 ConfigureEndpoint(outer_nat, 1, config2); 2188 ConfigureEndpoint(outer_nat, 1, config2);
2188 set_remote_ice_parameter_source(FROM_SETICEPARAMETERS); 2189 set_remote_ice_parameter_source(FROM_SETICEPARAMETERS);
2189 } 2190 }
2190 void ConfigureEndpoint(rtc::NATSocketServer::Translator* nat, 2191 void ConfigureEndpoint(rtc::NATSocketServer::Translator* nat,
2191 int endpoint, Config config) { 2192 int endpoint, Config config) {
2192 RTC_CHECK(config <= NAT_SYMMETRIC); 2193 RTC_CHECK(config <= NAT_SYMMETRIC);
(...skipping 2314 matching lines...) Expand 10 before | Expand all | Expand 10 after
4507 4508
4508 // TCP Relay/Relay is the next. 4509 // TCP Relay/Relay is the next.
4509 VerifyNextPingableConnection(RELAY_PORT_TYPE, RELAY_PORT_TYPE, 4510 VerifyNextPingableConnection(RELAY_PORT_TYPE, RELAY_PORT_TYPE,
4510 TCP_PROTOCOL_NAME); 4511 TCP_PROTOCOL_NAME);
4511 4512
4512 // Finally, Local/Relay will be pinged. 4513 // Finally, Local/Relay will be pinged.
4513 VerifyNextPingableConnection(LOCAL_PORT_TYPE, RELAY_PORT_TYPE); 4514 VerifyNextPingableConnection(LOCAL_PORT_TYPE, RELAY_PORT_TYPE);
4514 } 4515 }
4515 4516
4516 } // namespace cricket { 4517 } // namespace cricket {
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/frame_object.cc ('k') | webrtc/p2p/client/basicportallocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698