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

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

Issue 2718383002: Rename RTCCodecStats.codec -> mimeType, parameters -> sdpFmtpLine. (Closed)
Patch Set: Created 3 years, 9 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/rtcstatscollector.cc ('k') | webrtc/stats/rtcstats_objects.cc » ('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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 EXPECT_CALL(test_->session(), voice_channel()) 819 EXPECT_CALL(test_->session(), voice_channel())
820 .WillRepeatedly(Return(&voice_channel)); 820 .WillRepeatedly(Return(&voice_channel));
821 EXPECT_CALL(test_->session(), video_channel()) 821 EXPECT_CALL(test_->session(), video_channel())
822 .WillRepeatedly(Return(&video_channel)); 822 .WillRepeatedly(Return(&video_channel));
823 823
824 rtc::scoped_refptr<const RTCStatsReport> report = GetStatsReport(); 824 rtc::scoped_refptr<const RTCStatsReport> report = GetStatsReport();
825 825
826 RTCCodecStats expected_inbound_audio_codec( 826 RTCCodecStats expected_inbound_audio_codec(
827 "RTCCodec_InboundAudio_1", report->timestamp_us()); 827 "RTCCodec_InboundAudio_1", report->timestamp_us());
828 expected_inbound_audio_codec.payload_type = 1; 828 expected_inbound_audio_codec.payload_type = 1;
829 expected_inbound_audio_codec.codec = "audio/opus"; 829 expected_inbound_audio_codec.mime_type = "audio/opus";
830 expected_inbound_audio_codec.clock_rate = 1337; 830 expected_inbound_audio_codec.clock_rate = 1337;
831 831
832 RTCCodecStats expected_outbound_audio_codec( 832 RTCCodecStats expected_outbound_audio_codec(
833 "RTCCodec_OutboundAudio_2", report->timestamp_us()); 833 "RTCCodec_OutboundAudio_2", report->timestamp_us());
834 expected_outbound_audio_codec.payload_type = 2; 834 expected_outbound_audio_codec.payload_type = 2;
835 expected_outbound_audio_codec.codec = "audio/isac"; 835 expected_outbound_audio_codec.mime_type = "audio/isac";
836 expected_outbound_audio_codec.clock_rate = 1338; 836 expected_outbound_audio_codec.clock_rate = 1338;
837 837
838 RTCCodecStats expected_inbound_video_codec( 838 RTCCodecStats expected_inbound_video_codec(
839 "RTCCodec_InboundVideo_3", report->timestamp_us()); 839 "RTCCodec_InboundVideo_3", report->timestamp_us());
840 expected_inbound_video_codec.payload_type = 3; 840 expected_inbound_video_codec.payload_type = 3;
841 expected_inbound_video_codec.codec = "video/H264"; 841 expected_inbound_video_codec.mime_type = "video/H264";
842 expected_inbound_video_codec.clock_rate = 1339; 842 expected_inbound_video_codec.clock_rate = 1339;
843 843
844 RTCCodecStats expected_outbound_video_codec( 844 RTCCodecStats expected_outbound_video_codec(
845 "RTCCodec_OutboundVideo_4", report->timestamp_us()); 845 "RTCCodec_OutboundVideo_4", report->timestamp_us());
846 expected_outbound_video_codec.payload_type = 4; 846 expected_outbound_video_codec.payload_type = 4;
847 expected_outbound_video_codec.codec = "video/VP8"; 847 expected_outbound_video_codec.mime_type = "video/VP8";
848 expected_outbound_video_codec.clock_rate = 1340; 848 expected_outbound_video_codec.clock_rate = 1340;
849 849
850 ASSERT_TRUE(report->Get(expected_inbound_audio_codec.id())); 850 ASSERT_TRUE(report->Get(expected_inbound_audio_codec.id()));
851 EXPECT_EQ(expected_inbound_audio_codec, 851 EXPECT_EQ(expected_inbound_audio_codec,
852 report->Get(expected_inbound_audio_codec.id())->cast_to< 852 report->Get(expected_inbound_audio_codec.id())->cast_to<
853 RTCCodecStats>()); 853 RTCCodecStats>());
854 854
855 ASSERT_TRUE(report->Get(expected_outbound_audio_codec.id())); 855 ASSERT_TRUE(report->Get(expected_outbound_audio_codec.id()));
856 EXPECT_EQ(expected_outbound_audio_codec, 856 EXPECT_EQ(expected_outbound_audio_codec,
857 report->Get(expected_outbound_audio_codec.id())->cast_to< 857 report->Get(expected_outbound_audio_codec.id())->cast_to<
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
2280 rtc::scoped_refptr<FakeRTCStatsCollector> collector_; 2280 rtc::scoped_refptr<FakeRTCStatsCollector> collector_;
2281 }; 2281 };
2282 2282
2283 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) { 2283 TEST_F(RTCStatsCollectorTestWithFakeCollector, ThreadUsageAndResultsMerging) {
2284 collector_->VerifyThreadUsageAndResultsMerging(); 2284 collector_->VerifyThreadUsageAndResultsMerging();
2285 } 2285 }
2286 2286
2287 } // namespace 2287 } // namespace
2288 2288
2289 } // namespace webrtc 2289 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/pc/rtcstatscollector.cc ('k') | webrtc/stats/rtcstats_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698