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

Unified Diff: content/renderer/media/rtc_peer_connection_handler_unittest.cc

Issue 2186853002: WebRTCStats added, retaining type info when surfacing WebRTC stats into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed tommi's comments Created 4 years, 5 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
Index: content/renderer/media/rtc_peer_connection_handler_unittest.cc
diff --git a/content/renderer/media/rtc_peer_connection_handler_unittest.cc b/content/renderer/media/rtc_peer_connection_handler_unittest.cc
index 1032489c6219280751ee5de2cc54828f254b7f0d..42061acb8e307ef4de8055316c270891ca44ac35 100644
--- a/content/renderer/media/rtc_peer_connection_handler_unittest.cc
+++ b/content/renderer/media/rtc_peer_connection_handler_unittest.cc
@@ -73,18 +73,15 @@ class MockRTCStatsResponse : public LocalRTCStatsResponse {
statistic_count_(0) {
}
- size_t addReport(blink::WebString type,
- blink::WebString id,
- double timestamp) override {
+ void addStats(const blink::WebRTCStats& stats) override {
++report_count_;
- return report_count_;
+ for (std::unique_ptr<blink::WebRTCStatsMemberIterator> member(
+ stats.iterator());
+ !member->isEnd(); member->next()) {
+ ++statistic_count_;
+ }
}
- void addStatistic(size_t report,
- blink::WebString name,
- blink::WebString value) override {
- ++statistic_count_;
- }
int report_count() const { return report_count_; }
private:

Powered by Google App Engine
This is Rietveld 408576698