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

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

Issue 1848083002: Change the size of the ICE ufrag to 4 bytes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Modified the constants in unit tests based on new ICE_UFRAG_LENGTH. Created 4 years, 7 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/p2p/base/port_unittest.cc ('k') | webrtc/p2p/client/basicportallocator_unittest.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 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 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 <memory> 11 #include <memory>
12 12
13 #include "webrtc/base/gunit.h" 13 #include "webrtc/base/gunit.h"
14 #include "webrtc/base/thread.h" 14 #include "webrtc/base/thread.h"
15 #include "webrtc/p2p/base/fakeportallocator.h" 15 #include "webrtc/p2p/base/fakeportallocator.h"
16 #include "webrtc/p2p/base/portallocator.h" 16 #include "webrtc/p2p/base/portallocator.h"
17 17
18 static const char kContentName[] = "test content"; 18 static const char kContentName[] = "test content";
19 // Based on ICE_UFRAG_LENGTH 19 // Based on ICE_UFRAG_LENGTH
20 static const char kIceUfrag[] = "TESTICEUFRAG0000"; 20 static const char kIceUfrag[] = "UF00";
21 // Based on ICE_PWD_LENGTH 21 // Based on ICE_PWD_LENGTH
22 static const char kIcePwd[] = "TESTICEPWD00000000000000"; 22 static const char kIcePwd[] = "TESTICEPWD00000000000000";
23 static const char kTurnUsername[] = "test"; 23 static const char kTurnUsername[] = "test";
24 static const char kTurnPassword[] = "test"; 24 static const char kTurnPassword[] = "test";
25 25
26 class PortAllocatorTest : public testing::Test, public sigslot::has_slots<> { 26 class PortAllocatorTest : public testing::Test, public sigslot::has_slots<> {
27 public: 27 public:
28 PortAllocatorTest() { 28 PortAllocatorTest() {
29 allocator_.reset( 29 allocator_.reset(
30 new cricket::FakePortAllocator(rtc::Thread::Current(), nullptr)); 30 new cricket::FakePortAllocator(rtc::Thread::Current(), nullptr));
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 std::unique_ptr<cricket::FakePortAllocatorSession> session( 196 std::unique_ptr<cricket::FakePortAllocatorSession> session(
197 static_cast<cricket::FakePortAllocatorSession*>( 197 static_cast<cricket::FakePortAllocatorSession*>(
198 allocator_->TakePooledSession(kContentName, 1, kIceUfrag, kIcePwd) 198 allocator_->TakePooledSession(kContentName, 1, kIceUfrag, kIcePwd)
199 .release())); 199 .release()));
200 EXPECT_EQ(1, session->transport_info_update_count()); 200 EXPECT_EQ(1, session->transport_info_update_count());
201 EXPECT_EQ(kContentName, session->content_name()); 201 EXPECT_EQ(kContentName, session->content_name());
202 EXPECT_EQ(1, session->component()); 202 EXPECT_EQ(1, session->component());
203 EXPECT_EQ(kIceUfrag, session->ice_ufrag()); 203 EXPECT_EQ(kIceUfrag, session->ice_ufrag());
204 EXPECT_EQ(kIcePwd, session->ice_pwd()); 204 EXPECT_EQ(kIcePwd, session->ice_pwd());
205 } 205 }
OLDNEW
« no previous file with comments | « webrtc/p2p/base/port_unittest.cc ('k') | webrtc/p2p/client/basicportallocator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698