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

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

Issue 1956453003: Relanding: Implement RTCConfiguration.iceCandidatePoolSize. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing uninitialized variable (noticed by msan) 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.cc ('k') | webrtc/p2p/base/portallocator.h » ('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 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 2568 matching lines...) Expand 10 before | Expand all | Expand 10 after
2579 std::unique_ptr<Port> tcp_port(CreateTcpPort(kLocalAddr1)); 2579 std::unique_ptr<Port> tcp_port(CreateTcpPort(kLocalAddr1));
2580 EXPECT_TRUE(tcp_port->SupportsProtocol(TCP_PROTOCOL_NAME)); 2580 EXPECT_TRUE(tcp_port->SupportsProtocol(TCP_PROTOCOL_NAME));
2581 EXPECT_TRUE(tcp_port->SupportsProtocol(SSLTCP_PROTOCOL_NAME)); 2581 EXPECT_TRUE(tcp_port->SupportsProtocol(SSLTCP_PROTOCOL_NAME));
2582 EXPECT_FALSE(tcp_port->SupportsProtocol(UDP_PROTOCOL_NAME)); 2582 EXPECT_FALSE(tcp_port->SupportsProtocol(UDP_PROTOCOL_NAME));
2583 2583
2584 std::unique_ptr<Port> turn_port( 2584 std::unique_ptr<Port> turn_port(
2585 CreateTurnPort(kLocalAddr1, nat_socket_factory1(), PROTO_UDP, PROTO_UDP)); 2585 CreateTurnPort(kLocalAddr1, nat_socket_factory1(), PROTO_UDP, PROTO_UDP));
2586 EXPECT_TRUE(turn_port->SupportsProtocol(UDP_PROTOCOL_NAME)); 2586 EXPECT_TRUE(turn_port->SupportsProtocol(UDP_PROTOCOL_NAME));
2587 EXPECT_FALSE(turn_port->SupportsProtocol(TCP_PROTOCOL_NAME)); 2587 EXPECT_FALSE(turn_port->SupportsProtocol(TCP_PROTOCOL_NAME));
2588 } 2588 }
2589
2590 // Test that SetIceParameters updates the component, ufrag and password
2591 // on both the port itself and its candidates.
2592 TEST_F(PortTest, TestSetIceParameters) {
2593 std::unique_ptr<TestPort> port(
2594 CreateTestPort(kLocalAddr1, "ufrag1", "password1"));
2595 port->PrepareAddress();
2596 EXPECT_EQ(1UL, port->Candidates().size());
2597 port->SetIceParameters(1, "ufrag2", "password2");
2598 EXPECT_EQ(1, port->component());
2599 EXPECT_EQ("ufrag2", port->username_fragment());
2600 EXPECT_EQ("password2", port->password());
2601 const Candidate& candidate = port->Candidates()[0];
2602 EXPECT_EQ(1, candidate.component());
2603 EXPECT_EQ("ufrag2", candidate.username());
2604 EXPECT_EQ("password2", candidate.password());
2605 }
OLDNEW
« no previous file with comments | « webrtc/p2p/base/port.cc ('k') | webrtc/p2p/base/portallocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698