OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/media/rtc_peer_connection_handler.h" | 5 #include "content/renderer/media/rtc_peer_connection_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 message_loop->task_runner()->PostTask(FROM_HERE, quit_closure); | 66 message_loop->task_runner()->PostTask(FROM_HERE, quit_closure); |
67 } | 67 } |
68 | 68 |
69 class MockRTCStatsResponse : public LocalRTCStatsResponse { | 69 class MockRTCStatsResponse : public LocalRTCStatsResponse { |
70 public: | 70 public: |
71 MockRTCStatsResponse() | 71 MockRTCStatsResponse() |
72 : report_count_(0), | 72 : report_count_(0), |
73 statistic_count_(0) { | 73 statistic_count_(0) { |
74 } | 74 } |
75 | 75 |
76 size_t addReport(blink::WebString type, | 76 void addStats(const blink::WebRTCStats& stats) override { |
77 blink::WebString id, | |
78 double timestamp) override { | |
79 ++report_count_; | 77 ++report_count_; |
80 return report_count_; | 78 for (std::unique_ptr<blink::WebRTCStatsMemberIterator> member( |
79 stats.iterator()); !member->isEnd(); member->next()) { | |
tommi (sloooow) - chröme
2016/07/27 18:38:40
is this what git cl format did?
hbos_chromium
2016/07/28 08:27:45
No. Done. I ran git cl format now and it put a new
| |
80 ++statistic_count_; | |
81 } | |
81 } | 82 } |
82 | 83 |
83 void addStatistic(size_t report, | |
84 blink::WebString name, | |
85 blink::WebString value) override { | |
86 ++statistic_count_; | |
87 } | |
88 int report_count() const { return report_count_; } | 84 int report_count() const { return report_count_; } |
89 | 85 |
90 private: | 86 private: |
91 int report_count_; | 87 int report_count_; |
92 int statistic_count_; | 88 int statistic_count_; |
93 }; | 89 }; |
94 | 90 |
95 // Mocked wrapper for blink::WebRTCStatsRequest | 91 // Mocked wrapper for blink::WebRTCStatsRequest |
96 class MockRTCStatsRequest : public LocalRTCStatsRequest { | 92 class MockRTCStatsRequest : public LocalRTCStatsRequest { |
97 public: | 93 public: |
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1061 testing::Ref(tracks[0]))); | 1057 testing::Ref(tracks[0]))); |
1062 | 1058 |
1063 std::unique_ptr<blink::WebRTCDTMFSenderHandler> sender( | 1059 std::unique_ptr<blink::WebRTCDTMFSenderHandler> sender( |
1064 pc_handler_->createDTMFSender(tracks[0])); | 1060 pc_handler_->createDTMFSender(tracks[0])); |
1065 EXPECT_TRUE(sender.get()); | 1061 EXPECT_TRUE(sender.get()); |
1066 | 1062 |
1067 StopAllTracks(local_stream); | 1063 StopAllTracks(local_stream); |
1068 } | 1064 } |
1069 | 1065 |
1070 } // namespace content | 1066 } // namespace content |
OLD | NEW |