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

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

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 std::unique_ptr<FakeDtlsTransport> fake_dtls_transport_; 46 std::unique_ptr<FakeDtlsTransport> fake_dtls_transport_;
47 std::unique_ptr<FakeIceTransport> fake_ice_transport_; 47 std::unique_ptr<FakeIceTransport> fake_ice_transport_;
48 std::unique_ptr<JsepTransport> transport_; 48 std::unique_ptr<JsepTransport> transport_;
49 }; 49 };
50 50
51 // This test verifies channels are created with proper ICE 51 // This test verifies channels are created with proper ICE
52 // ufrag/password after a transport description is applied. 52 // ufrag/password after a transport description is applied.
53 TEST_F(JsepTransportTest, TestChannelIceParameters) { 53 TEST_F(JsepTransportTest, TestChannelIceParameters) {
54 cricket::TransportDescription local_desc(kIceUfrag1, kIcePwd1); 54 cricket::TransportDescription local_desc(kIceUfrag1, kIcePwd1);
55 ASSERT_TRUE(transport_->SetLocalTransportDescription( 55 ASSERT_TRUE(transport_->SetLocalTransportDescription(
56 local_desc, cricket::CA_OFFER, NULL)); 56 local_desc, cricket::CA_OFFER, nullptr));
57 EXPECT_TRUE(SetupChannel()); 57 EXPECT_TRUE(SetupChannel());
58 EXPECT_EQ(cricket::ICEMODE_FULL, fake_ice_transport_->remote_ice_mode()); 58 EXPECT_EQ(cricket::ICEMODE_FULL, fake_ice_transport_->remote_ice_mode());
59 EXPECT_EQ(kIceUfrag1, fake_ice_transport_->ice_ufrag()); 59 EXPECT_EQ(kIceUfrag1, fake_ice_transport_->ice_ufrag());
60 EXPECT_EQ(kIcePwd1, fake_ice_transport_->ice_pwd()); 60 EXPECT_EQ(kIcePwd1, fake_ice_transport_->ice_pwd());
61 61
62 cricket::TransportDescription remote_desc(kIceUfrag1, kIcePwd1); 62 cricket::TransportDescription remote_desc(kIceUfrag1, kIcePwd1);
63 ASSERT_TRUE(transport_->SetRemoteTransportDescription( 63 ASSERT_TRUE(transport_->SetRemoteTransportDescription(
64 remote_desc, cricket::CA_ANSWER, NULL)); 64 remote_desc, cricket::CA_ANSWER, nullptr));
65 EXPECT_EQ(cricket::ICEMODE_FULL, fake_ice_transport_->remote_ice_mode()); 65 EXPECT_EQ(cricket::ICEMODE_FULL, fake_ice_transport_->remote_ice_mode());
66 EXPECT_EQ(kIceUfrag1, fake_ice_transport_->remote_ice_ufrag()); 66 EXPECT_EQ(kIceUfrag1, fake_ice_transport_->remote_ice_ufrag());
67 EXPECT_EQ(kIcePwd1, fake_ice_transport_->remote_ice_pwd()); 67 EXPECT_EQ(kIcePwd1, fake_ice_transport_->remote_ice_pwd());
68 } 68 }
69 69
70 // Verifies that IceCredentialsChanged returns true when either ufrag or pwd 70 // Verifies that IceCredentialsChanged returns true when either ufrag or pwd
71 // changed, and false in other cases. 71 // changed, and false in other cases.
72 TEST_F(JsepTransportTest, TestIceCredentialsChanged) { 72 TEST_F(JsepTransportTest, TestIceCredentialsChanged) {
73 EXPECT_TRUE(cricket::IceCredentialsChanged("u1", "p1", "u2", "p2")); 73 EXPECT_TRUE(cricket::IceCredentialsChanged("u1", "p1", "u2", "p2"));
74 EXPECT_TRUE(cricket::IceCredentialsChanged("u1", "p1", "u2", "p1")); 74 EXPECT_TRUE(cricket::IceCredentialsChanged("u1", "p1", "u2", "p1"));
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 remote_desc.connection_role = param.remote_role; 301 remote_desc.connection_role = param.remote_role;
302 302
303 ASSERT_TRUE(transport_->SetRemoteTransportDescription( 303 ASSERT_TRUE(transport_->SetRemoteTransportDescription(
304 remote_desc, param.remote_action, nullptr)); 304 remote_desc, param.remote_action, nullptr));
305 ASSERT_TRUE(transport_->SetLocalTransportDescription( 305 ASSERT_TRUE(transport_->SetLocalTransportDescription(
306 local_desc, param.local_action, nullptr)); 306 local_desc, param.local_action, nullptr));
307 EXPECT_FALSE( 307 EXPECT_FALSE(
308 transport_->NegotiateRole(param.local_action, &ssl_role, &error_desc)); 308 transport_->NegotiateRole(param.local_action, &ssl_role, &error_desc));
309 } 309 }
310 } 310 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698