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

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

Issue 2827643003: Adding integration test for unsignaled inbound RTP stream stats. (Closed)
Patch Set: Created 3 years, 8 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') | no next file » | 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 94996d004f1d8e8fc5c0d5fc26371e1b3a70a8f5..fb4c00419aa3ac043261dd07bc37dfeb8f32865f 100644
--- a/webrtc/pc/test/mockpeerconnectionobservers.h
+++ b/webrtc/pc/test/mockpeerconnectionobservers.h
@@ -225,6 +225,25 @@ class MockStatsObserver : public webrtc::StatsObserver {
} stats_;
};
+// Helper class that just stores the report from the callback.
+class MockRTCStatsCollectorCallback : public webrtc::RTCStatsCollectorCallback {
+ public:
+ rtc::scoped_refptr<const RTCStatsReport> report() { return report_; }
+
+ bool called() const { return called_; }
+
+ protected:
+ void OnStatsDelivered(
+ const rtc::scoped_refptr<const RTCStatsReport>& report) override {
+ report_ = report;
+ called_ = true;
+ }
+
+ private:
+ bool called_ = false;
+ rtc::scoped_refptr<const RTCStatsReport> report_;
+};
+
} // namespace webrtc
#endif // WEBRTC_PC_TEST_MOCKPEERCONNECTIONOBSERVERS_H_
« no previous file with comments | « webrtc/pc/peerconnection_integrationtest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698