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

Side by Side Diff: webrtc/api/rtcstatscollector_unittest.cc

Issue 2373503002: rtc_stats: Update code to remove chromium style warnings suppression. (Closed)
Patch Set: Addressed comments and rebase with master Created 4 years, 2 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 | « no previous file | webrtc/api/stats/rtcstats.h » ('j') | 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 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2016 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 std::unique_ptr<cricket::ChannelManager> channel_manager_; 133 std::unique_ptr<cricket::ChannelManager> channel_manager_;
134 std::unique_ptr<webrtc::MediaControllerInterface> media_controller_; 134 std::unique_ptr<webrtc::MediaControllerInterface> media_controller_;
135 MockWebRtcSession session_; 135 MockWebRtcSession session_;
136 MockPeerConnection pc_; 136 MockPeerConnection pc_;
137 137
138 std::vector<rtc::scoped_refptr<DataChannel>> data_channels_; 138 std::vector<rtc::scoped_refptr<DataChannel>> data_channels_;
139 }; 139 };
140 140
141 class RTCTestStats : public RTCStats { 141 class RTCTestStats : public RTCStats {
142 public: 142 public:
143 WEBRTC_RTCSTATS_DECL();
144
143 RTCTestStats(const std::string& id, int64_t timestamp_us) 145 RTCTestStats(const std::string& id, int64_t timestamp_us)
144 : RTCStats(id, timestamp_us), 146 : RTCStats(id, timestamp_us),
145 dummy_stat("dummyStat") {} 147 dummy_stat("dummyStat") {}
146 148
147 WEBRTC_RTCSTATS_IMPL(RTCStats, RTCTestStats,
148 &dummy_stat);
149
150 RTCStatsMember<int32_t> dummy_stat; 149 RTCStatsMember<int32_t> dummy_stat;
151 }; 150 };
152 151
153 const char RTCTestStats::kType[] = "test-stats"; 152 WEBRTC_RTCSTATS_IMPL(RTCTestStats, RTCStats, "test-stats",
153 &dummy_stat);
154 154
155 // Overrides the stats collection to verify thread usage and that the resulting 155 // Overrides the stats collection to verify thread usage and that the resulting
156 // partial reports are merged. 156 // partial reports are merged.
157 class FakeRTCStatsCollector : public RTCStatsCollector, 157 class FakeRTCStatsCollector : public RTCStatsCollector,
158 public RTCStatsCollectorCallback { 158 public RTCStatsCollectorCallback {
159 public: 159 public:
160 static rtc::scoped_refptr<FakeRTCStatsCollector> Create( 160 static rtc::scoped_refptr<FakeRTCStatsCollector> Create(
161 PeerConnection* pc, 161 PeerConnection* pc,
162 int64_t cache_lifetime_us) { 162 int64_t cache_lifetime_us) {
163 return rtc::scoped_refptr<FakeRTCStatsCollector>( 163 return rtc::scoped_refptr<FakeRTCStatsCollector>(
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 rtc::scoped_refptr<FakeRTCStatsCollector> collector_; 593 rtc::scoped_refptr<FakeRTCStatsCollector> collector_;
594 }; 594 };
595 595
596 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) { 596 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) {
597 collector_->VerifyThreadUsageAndResultsMerging(); 597 collector_->VerifyThreadUsageAndResultsMerging();
598 } 598 }
599 599
600 } // namespace 600 } // namespace
601 601
602 } // namespace webrtc 602 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/stats/rtcstats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698