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

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

Issue 1480233003: Initialize type_preference_ in TestPort. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 | « no previous file | 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 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 last_stun_buf_.reset(); 195 last_stun_buf_.reset();
196 last_stun_msg_.reset(); 196 last_stun_msg_.reset();
197 } 197 }
198 void set_type_preference(int type_preference) { 198 void set_type_preference(int type_preference) {
199 type_preference_ = type_preference; 199 type_preference_ = type_preference;
200 } 200 }
201 201
202 private: 202 private:
203 rtc::scoped_ptr<ByteBuffer> last_stun_buf_; 203 rtc::scoped_ptr<ByteBuffer> last_stun_buf_;
204 rtc::scoped_ptr<IceMessage> last_stun_msg_; 204 rtc::scoped_ptr<IceMessage> last_stun_msg_;
205 int type_preference_; 205 int type_preference_ = 0;
206 }; 206 };
207 207
208 class TestChannel : public sigslot::has_slots<> { 208 class TestChannel : public sigslot::has_slots<> {
209 public: 209 public:
210 // Takes ownership of |p1| (but not |p2|). 210 // Takes ownership of |p1| (but not |p2|).
211 TestChannel(Port* p1) 211 TestChannel(Port* p1)
212 : ice_mode_(ICEMODE_FULL), 212 : ice_mode_(ICEMODE_FULL),
213 port_(p1), 213 port_(p1),
214 complete_count_(0), 214 complete_count_(0),
215 conn_(NULL), 215 conn_(NULL),
(...skipping 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 StartConnectAndStopChannels(&ch1, &ch2); 2488 StartConnectAndStopChannels(&ch1, &ch2);
2489 // Switch the role after all connections are destroyed. 2489 // Switch the role after all connections are destroyed.
2490 EXPECT_TRUE_WAIT(ch2.conn() == nullptr, kTimeout); 2490 EXPECT_TRUE_WAIT(ch2.conn() == nullptr, kTimeout);
2491 port1->SetIceRole(cricket::ICEROLE_CONTROLLED); 2491 port1->SetIceRole(cricket::ICEROLE_CONTROLLED);
2492 port2->SetIceRole(cricket::ICEROLE_CONTROLLING); 2492 port2->SetIceRole(cricket::ICEROLE_CONTROLLING);
2493 2493
2494 // After the connection is destroyed, the port should not be destroyed. 2494 // After the connection is destroyed, the port should not be destroyed.
2495 rtc::Thread::Current()->ProcessMessages(kTimeout); 2495 rtc::Thread::Current()->ProcessMessages(kTimeout);
2496 EXPECT_FALSE(destroyed()); 2496 EXPECT_FALSE(destroyed());
2497 } 2497 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698