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

Unified Diff: webrtc/pc/test/mockpeerconnectionobservers.h

Issue 3008273002: Replace voe_conference_test. (Closed)
Patch Set: rebase Created 3 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/pc/peerconnection_integrationtest.cc ('k') | webrtc/test/call_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/test/mockpeerconnectionobservers.h
diff --git a/webrtc/pc/test/mockpeerconnectionobservers.h b/webrtc/pc/test/mockpeerconnectionobservers.h
index 5367eeb62a11a48445843155cf1fc106ddc02fc2..84c80f8d5d6f0c59422b45ff0211d819acc5dbf0 100644
--- a/webrtc/pc/test/mockpeerconnectionobservers.h
+++ b/webrtc/pc/test/mockpeerconnectionobservers.h
@@ -125,6 +125,8 @@ class MockStatsObserver : public webrtc::StatsObserver {
&stats_.bytes_received);
GetIntValue(r, StatsReport::kStatsValueNameBytesSent,
&stats_.bytes_sent);
+ GetInt64Value(r, StatsReport::kStatsValueNameCaptureStartNtpTimeMs,
+ &stats_.capture_start_ntp_time);
} else if (r->type() == StatsReport::kStatsReportTypeBwe) {
stats_.timestamp = r->timestamp();
GetIntValue(r, StatsReport::kStatsValueNameAvailableReceiveBandwidth,
@@ -163,6 +165,11 @@ class MockStatsObserver : public webrtc::StatsObserver {
return stats_.bytes_sent;
}
+ int64_t CaptureStartNtpTime() const {
+ RTC_CHECK(called_);
+ return stats_.capture_start_ntp_time;
+ }
+
int AvailableReceiveBandwidth() const {
RTC_CHECK(called_);
return stats_.available_receive_bandwidth;
@@ -190,6 +197,17 @@ class MockStatsObserver : public webrtc::StatsObserver {
return v != nullptr;
}
+ bool GetInt64Value(const StatsReport* report,
+ StatsReport::StatsValueName name,
+ int64_t* value) {
+ const StatsReport::Value* v = report->FindValue(name);
+ if (v) {
+ // TODO(tommi): We should really just be using an int here :-/
+ *value = rtc::FromString<int64_t>(v->ToString());
+ }
+ return v != nullptr;
+ }
+
bool GetStringValue(const StatsReport* report,
StatsReport::StatsValueName name,
std::string* value) {
@@ -208,6 +226,7 @@ class MockStatsObserver : public webrtc::StatsObserver {
audio_input_level = 0;
bytes_received = 0;
bytes_sent = 0;
+ capture_start_ntp_time = 0;
available_receive_bandwidth = 0;
dtls_cipher.clear();
srtp_cipher.clear();
@@ -219,6 +238,7 @@ class MockStatsObserver : public webrtc::StatsObserver {
int audio_input_level;
int bytes_received;
int bytes_sent;
+ int64_t capture_start_ntp_time;
int available_receive_bandwidth;
std::string dtls_cipher;
std::string srtp_cipher;
« no previous file with comments | « webrtc/pc/peerconnection_integrationtest.cc ('k') | webrtc/test/call_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698