diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/libwebrtc/net/dcsctp/socket/stream_reset_handler_test.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/net/dcsctp/socket/stream_reset_handler_test.cc')
-rw-r--r-- | third_party/libwebrtc/net/dcsctp/socket/stream_reset_handler_test.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/third_party/libwebrtc/net/dcsctp/socket/stream_reset_handler_test.cc b/third_party/libwebrtc/net/dcsctp/socket/stream_reset_handler_test.cc index 091d717f8a..e675c9bcef 100644 --- a/third_party/libwebrtc/net/dcsctp/socket/stream_reset_handler_test.cc +++ b/third_party/libwebrtc/net/dcsctp/socket/stream_reset_handler_test.cc @@ -48,6 +48,7 @@ using ::testing::Property; using ::testing::Return; using ::testing::SizeIs; using ::testing::UnorderedElementsAre; +using ::webrtc::TimeDelta; using ResponseResult = ReconfigurationResponseParameter::Result; using SkippedStream = AnyForwardTsnChunk::SkippedStream; @@ -57,7 +58,7 @@ constexpr TSN kPeerInitialTsn = MockContext::PeerInitialTsn(); constexpr ReconfigRequestSN kPeerInitialReqSn = ReconfigRequestSN(*kPeerInitialTsn); constexpr uint32_t kArwnd = 131072; -constexpr DurationMs kRto = DurationMs(250); +constexpr TimeDelta kRto = TimeDelta::Millis(250); constexpr std::array<uint8_t, 4> kShortPayload = {1, 2, 3, 4}; @@ -97,12 +98,12 @@ class StreamResetHandlerTest : public testing::Test { }), delayed_ack_timer_(timer_manager_.CreateTimer( "test/delayed_ack", - []() { return absl::nullopt; }, - TimerOptions(DurationMs(0)))), + []() { return TimeDelta::Zero(); }, + TimerOptions(TimeDelta::Zero()))), t3_rtx_timer_(timer_manager_.CreateTimer( "test/t3_rtx", - []() { return absl::nullopt; }, - TimerOptions(DurationMs(0)))), + []() { return TimeDelta::Zero(); }, + TimerOptions(TimeDelta::Zero()))), data_tracker_(std::make_unique<DataTracker>("log: ", delayed_ack_timer_.get(), kPeerInitialTsn)), @@ -115,7 +116,7 @@ class StreamResetHandlerTest : public testing::Test { kMyInitialTsn, kArwnd, producer_, - [](DurationMs rtt_ms) {}, + [](TimeDelta rtt) {}, []() {}, *t3_rtx_timer_, DcSctpOptions())), @@ -129,8 +130,8 @@ class StreamResetHandlerTest : public testing::Test { EXPECT_CALL(ctx_, current_rto).WillRepeatedly(Return(kRto)); } - void AdvanceTime(DurationMs duration) { - callbacks_.AdvanceTime(kRto); + void AdvanceTime(TimeDelta duration) { + callbacks_.AdvanceTime(duration); for (;;) { absl::optional<TimeoutID> timeout_id = callbacks_.GetNextExpiredTimeout(); if (!timeout_id.has_value()) { @@ -204,8 +205,8 @@ class StreamResetHandlerTest : public testing::Test { std::make_unique<ReassemblyQueue>("log: ", kPeerInitialTsn, kArwnd); reasm_->RestoreFromState(state); retransmission_queue_ = std::make_unique<RetransmissionQueue>( - "", &callbacks_, kMyInitialTsn, kArwnd, producer_, - [](DurationMs rtt_ms) {}, []() {}, *t3_rtx_timer_, DcSctpOptions(), + "", &callbacks_, kMyInitialTsn, kArwnd, producer_, [](TimeDelta rtt) {}, + []() {}, *t3_rtx_timer_, DcSctpOptions(), /*supports_partial_reliability=*/true, /*use_message_interleaving=*/false); retransmission_queue_->RestoreFromState(state); |