diff options
Diffstat (limited to 'pc')
-rw-r--r-- | pc/BUILD.gn | 1 | ||||
-rw-r--r-- | pc/peerconnection_integrationtest.cc | 4 | ||||
-rw-r--r-- | pc/rtcstatscollector_unittest.cc | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 3f00dfaed4..7eee652411 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -485,6 +485,7 @@ if (rtc_include_tests) { ":rtc_pc_base", "../api:libjingle_peerconnection_api", "../api:mock_rtp", + "../api/units:time_delta", "../rtc_base:checks", "../rtc_base:stringutils", "../test:fileutils", diff --git a/pc/peerconnection_integrationtest.cc b/pc/peerconnection_integrationtest.cc index c3a41e4d11..6616243ac1 100644 --- a/pc/peerconnection_integrationtest.cc +++ b/pc/peerconnection_integrationtest.cc @@ -2910,7 +2910,7 @@ TEST_P(PeerConnectionIntegrationTest, // Some things use a time of "0" as a special value, so we need to start out // the fake clock at a nonzero time. // TODO(deadbeef): Fix this. - fake_clock.AdvanceTime(rtc::TimeDelta::FromSeconds(1)); + fake_clock.AdvanceTime(webrtc::TimeDelta::seconds(1)); virtual_socket_server()->set_delay_mean(5); // 5 ms per hop. virtual_socket_server()->UpdateDelayDistribution(); @@ -3786,7 +3786,7 @@ TEST_P(PeerConnectionIntegrationTest, EndToEndConnectionTimeWithTurnTurnPair) { // Some things use a time of "0" as a special value, so we need to start out // the fake clock at a nonzero time. // TODO(deadbeef): Fix this. - fake_clock.AdvanceTime(rtc::TimeDelta::FromSeconds(1)); + fake_clock.AdvanceTime(webrtc::TimeDelta::seconds(1)); static constexpr int media_hop_delay_ms = 50; static constexpr int signaling_trip_delay_ms = 500; diff --git a/pc/rtcstatscollector_unittest.cc b/pc/rtcstatscollector_unittest.cc index f27e953b56..08fa41537a 100644 --- a/pc/rtcstatscollector_unittest.cc +++ b/pc/rtcstatscollector_unittest.cc @@ -18,6 +18,7 @@ #include "api/rtpparameters.h" #include "api/stats/rtcstats_objects.h" #include "api/stats/rtcstatsreport.h" +#include "api/units/time_delta.h" #include "p2p/base/p2pconstants.h" #include "p2p/base/port.h" #include "pc/mediastream.h" @@ -35,7 +36,6 @@ #include "rtc_base/logging.h" #include "rtc_base/ptr_util.h" #include "rtc_base/stringutils.h" -#include "rtc_base/timedelta.h" #include "rtc_base/timeutils.h" using testing::AtLeast; @@ -670,7 +670,7 @@ TEST_F(RTCStatsCollectorTest, CachedStatsReports) { rtc::scoped_refptr<const RTCStatsReport> c = stats_->GetStatsReport(); EXPECT_NE(b.get(), c.get()); // Invalidate cache by advancing time. - fake_clock_.AdvanceTime(rtc::TimeDelta::FromMilliseconds(51)); + fake_clock_.AdvanceTime(TimeDelta::ms(51)); rtc::scoped_refptr<const RTCStatsReport> d = stats_->GetStatsReport(); EXPECT_TRUE(d); EXPECT_NE(c.get(), d.get()); @@ -681,7 +681,7 @@ TEST_F(RTCStatsCollectorTest, MultipleCallbacksWithInvalidatedCacheInBetween) { stats_->stats_collector()->GetStatsReport(RTCStatsObtainer::Create(&a)); stats_->stats_collector()->GetStatsReport(RTCStatsObtainer::Create(&b)); // Cache is invalidated after 50 ms. - fake_clock_.AdvanceTime(rtc::TimeDelta::FromMilliseconds(51)); + fake_clock_.AdvanceTime(TimeDelta::ms(51)); stats_->stats_collector()->GetStatsReport(RTCStatsObtainer::Create(&c)); EXPECT_TRUE_WAIT(a, kGetStatsReportTimeoutMs); EXPECT_TRUE_WAIT(b, kGetStatsReportTimeoutMs); |