From 44e4453067ae2f27c3c571e9b4747b4e9ca7d885 Mon Sep 17 00:00:00 2001 From: Tommi Date: Tue, 23 Jan 2024 22:40:29 +0100 Subject: [PATCH] Fix Port test and supply a legal value for the port type. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This isn't a problem right now but will be when we move away from using a free string as the storage type. Bug: none Change-Id: I12c2de416f9fce13a8284e7d36fa3c2081453299 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335880 Reviewed-by: Björn Terelius Commit-Queue: Björn Terelius Auto-Submit: Tomas Gunnarsson Cr-Commit-Position: refs/heads/main@{#41602} --- p2p/base/port_unittest.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/p2p/base/port_unittest.cc b/p2p/base/port_unittest.cc index de35d94259..ab3ff86fd1 100644 --- a/p2p/base/port_unittest.cc +++ b/p2p/base/port_unittest.cc @@ -825,9 +825,9 @@ class PortTest : public ::testing::Test, public sigslot::has_slots<> { absl::string_view username, absl::string_view password, const webrtc::FieldTrialsView* field_trials = nullptr) { - auto port = std::make_unique(&main_, "test", &socket_factory_, - MakeNetwork(addr), 0, 0, username, - password, field_trials); + auto port = std::make_unique( + &main_, cricket::LOCAL_PORT_TYPE, &socket_factory_, MakeNetwork(addr), + 0, 0, username, password, field_trials); port->SignalRoleConflict.connect(this, &PortTest::OnRoleConflict); return port; } @@ -845,8 +845,9 @@ class PortTest : public ::testing::Test, public sigslot::has_slots<> { std::unique_ptr CreateTestPort(const rtc::Network* network, absl::string_view username, absl::string_view password) { - auto port = std::make_unique(&main_, "test", &socket_factory_, - network, 0, 0, username, password); + auto port = std::make_unique(&main_, cricket::LOCAL_PORT_TYPE, + &socket_factory_, network, 0, 0, + username, password); port->SignalRoleConflict.connect(this, &PortTest::OnRoleConflict); return port; }