Fix Port test and supply a legal value for the port type.

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 <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41602}
This commit is contained in:
Tommi 2024-01-23 22:40:29 +01:00 committed by WebRTC LUCI CQ
parent 1b61c7161e
commit 44e4453067

View File

@ -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<TestPort>(&main_, "test", &socket_factory_,
MakeNetwork(addr), 0, 0, username,
password, field_trials);
auto port = std::make_unique<TestPort>(
&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<TestPort> CreateTestPort(const rtc::Network* network,
absl::string_view username,
absl::string_view password) {
auto port = std::make_unique<TestPort>(&main_, "test", &socket_factory_,
network, 0, 0, username, password);
auto port = std::make_unique<TestPort>(&main_, cricket::LOCAL_PORT_TYPE,
&socket_factory_, network, 0, 0,
username, password);
port->SignalRoleConflict.connect(this, &PortTest::OnRoleConflict);
return port;
}