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

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

Issue 1460043002: Don't call the Pass methods of rtc::Buffer, rtc::scoped_ptr, and rtc::ScopedVector (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Restore the Pass methods Created 5 years 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/p2p/base/transportcontroller_unittest.cc ('k') | no next file » | 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
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "webrtc/p2p/base/constants.h" 14 #include "webrtc/p2p/base/constants.h"
15 #include "webrtc/p2p/base/transportdescription.h" 15 #include "webrtc/p2p/base/transportdescription.h"
16 #include "webrtc/p2p/base/transportdescriptionfactory.h" 16 #include "webrtc/p2p/base/transportdescriptionfactory.h"
17 #include "webrtc/base/fakesslidentity.h" 17 #include "webrtc/base/fakesslidentity.h"
18 #include "webrtc/base/gunit.h" 18 #include "webrtc/base/gunit.h"
19 #include "webrtc/base/ssladapter.h" 19 #include "webrtc/base/ssladapter.h"
20 20
21 using rtc::scoped_ptr; 21 using rtc::scoped_ptr;
22 using cricket::TransportDescriptionFactory; 22 using cricket::TransportDescriptionFactory;
23 using cricket::TransportDescription; 23 using cricket::TransportDescription;
24 using cricket::TransportOptions; 24 using cricket::TransportOptions;
25 25
26 class TransportDescriptionFactoryTest : public testing::Test { 26 class TransportDescriptionFactoryTest : public testing::Test {
27 public: 27 public:
28 TransportDescriptionFactoryTest() 28 TransportDescriptionFactoryTest()
29 : cert1_(rtc::RTCCertificate::Create(scoped_ptr<rtc::SSLIdentity>( 29 : cert1_(rtc::RTCCertificate::Create(
30 new rtc::FakeSSLIdentity("User1")).Pass())), 30 scoped_ptr<rtc::SSLIdentity>(new rtc::FakeSSLIdentity("User1")))),
31 cert2_(rtc::RTCCertificate::Create(scoped_ptr<rtc::SSLIdentity>( 31 cert2_(rtc::RTCCertificate::Create(
32 new rtc::FakeSSLIdentity("User2")).Pass())) { 32 scoped_ptr<rtc::SSLIdentity>(new rtc::FakeSSLIdentity("User2")))) {}
33 }
34 33
35 void CheckDesc(const TransportDescription* desc, 34 void CheckDesc(const TransportDescription* desc,
36 const std::string& opt, const std::string& ice_ufrag, 35 const std::string& opt, const std::string& ice_ufrag,
37 const std::string& ice_pwd, const std::string& dtls_alg) { 36 const std::string& ice_pwd, const std::string& dtls_alg) {
38 ASSERT_TRUE(desc != NULL); 37 ASSERT_TRUE(desc != NULL);
39 EXPECT_EQ(!opt.empty(), desc->HasOption(opt)); 38 EXPECT_EQ(!opt.empty(), desc->HasOption(opt));
40 if (ice_ufrag.empty() && ice_pwd.empty()) { 39 if (ice_ufrag.empty() && ice_pwd.empty()) {
41 EXPECT_EQ(static_cast<size_t>(cricket::ICE_UFRAG_LENGTH), 40 EXPECT_EQ(static_cast<size_t>(cricket::ICE_UFRAG_LENGTH),
42 desc->ice_ufrag.size()); 41 desc->ice_ufrag.size());
43 EXPECT_EQ(static_cast<size_t>(cricket::ICE_PWD_LENGTH), 42 EXPECT_EQ(static_cast<size_t>(cricket::ICE_PWD_LENGTH),
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // if |TransportDescriptionOptions::ice_restart| is true. 252 // if |TransportDescriptionOptions::ice_restart| is true.
254 TEST_F(TransportDescriptionFactoryTest, TestIceRestart) { 253 TEST_F(TransportDescriptionFactoryTest, TestIceRestart) {
255 TestIceRestart(false); 254 TestIceRestart(false);
256 } 255 }
257 256
258 // Test that ice ufrag and password is changed in an updated offer and answer 257 // Test that ice ufrag and password is changed in an updated offer and answer
259 // if |TransportDescriptionOptions::ice_restart| is true and DTLS is enabled. 258 // if |TransportDescriptionOptions::ice_restart| is true and DTLS is enabled.
260 TEST_F(TransportDescriptionFactoryTest, TestIceRestartWithDtls) { 259 TEST_F(TransportDescriptionFactoryTest, TestIceRestartWithDtls) {
261 TestIceRestart(true); 260 TestIceRestart(true);
262 } 261 }
OLDNEW
« no previous file with comments | « webrtc/p2p/base/transportcontroller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698