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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « webrtc/pc/peerconnection_integrationtest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 int audio_output_level; 218 int audio_output_level;
219 int audio_input_level; 219 int audio_input_level;
220 int bytes_received; 220 int bytes_received;
221 int bytes_sent; 221 int bytes_sent;
222 int available_receive_bandwidth; 222 int available_receive_bandwidth;
223 std::string dtls_cipher; 223 std::string dtls_cipher;
224 std::string srtp_cipher; 224 std::string srtp_cipher;
225 } stats_; 225 } stats_;
226 }; 226 };
227 227
228 // Helper class that just stores the report from the callback.
229 class MockRTCStatsCollectorCallback : public webrtc::RTCStatsCollectorCallback {
230 public:
231 rtc::scoped_refptr<const RTCStatsReport> report() { return report_; }
232
233 bool called() const { return called_; }
234
235 protected:
236 void OnStatsDelivered(
237 const rtc::scoped_refptr<const RTCStatsReport>& report) override {
238 report_ = report;
239 called_ = true;
240 }
241
242 private:
243 bool called_ = false;
244 rtc::scoped_refptr<const RTCStatsReport> report_;
245 };
246
228 } // namespace webrtc 247 } // namespace webrtc
229 248
230 #endif // WEBRTC_PC_TEST_MOCKPEERCONNECTIONOBSERVERS_H_ 249 #endif // WEBRTC_PC_TEST_MOCKPEERCONNECTIONOBSERVERS_H_
OLDNEW
« 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