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

Unified Diff: webrtc/media/base/codec_unittest.cc

Issue 2651883010: Adding C++ versions of currently spec'd "RtpParameters" structs. (Closed)
Patch Set: Update unit tests (due to switch from special-case values to rtc::Optional) Created 3 years, 10 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
« no previous file with comments | « webrtc/media/base/codec.cc ('k') | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/codec_unittest.cc
diff --git a/webrtc/media/base/codec_unittest.cc b/webrtc/media/base/codec_unittest.cc
index 77c1fd015fbaeeb45e61f36fadeff2e6193b73e5..5a375fcc833095fd70302627551f71f83d6e94e6 100644
--- a/webrtc/media/base/codec_unittest.cc
+++ b/webrtc/media/base/codec_unittest.cc
@@ -311,14 +311,17 @@ TEST(CodecTest, TestToCodecParameters) {
const VideoCodec v(96, "V");
webrtc::RtpCodecParameters codec_params_1 = v.ToCodecParameters();
EXPECT_EQ(96, codec_params_1.payload_type);
- EXPECT_EQ("V", codec_params_1.mime_type);
- EXPECT_EQ(cricket::kVideoCodecClockrate, codec_params_1.clock_rate);
- EXPECT_EQ(1, codec_params_1.channels);
+ EXPECT_EQ(cricket::MEDIA_TYPE_VIDEO, codec_params_1.kind);
+ EXPECT_EQ("V", codec_params_1.name);
+ EXPECT_EQ(rtc::Optional<int>(cricket::kVideoCodecClockrate),
+ codec_params_1.clock_rate);
+ EXPECT_EQ(rtc::Optional<int>(), codec_params_1.num_channels);
const AudioCodec a(97, "A", 44100, 20000, 2);
webrtc::RtpCodecParameters codec_params_2 = a.ToCodecParameters();
EXPECT_EQ(97, codec_params_2.payload_type);
- EXPECT_EQ("A", codec_params_2.mime_type);
- EXPECT_EQ(44100, codec_params_2.clock_rate);
- EXPECT_EQ(2, codec_params_2.channels);
+ EXPECT_EQ(cricket::MEDIA_TYPE_AUDIO, codec_params_2.kind);
+ EXPECT_EQ("A", codec_params_2.name);
+ EXPECT_EQ(rtc::Optional<int>(44100), codec_params_2.clock_rate);
+ EXPECT_EQ(rtc::Optional<int>(2), codec_params_2.num_channels);
}
« no previous file with comments | « webrtc/media/base/codec.cc ('k') | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698