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

Unified Diff: content/renderer/media/rtc_video_decoder_unittest.cc

Issue 7461016: Replace VideoDecoder::media_format() with significantly simpler width()/height() methods. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: fixes Created 9 years, 5 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 | « content/renderer/media/rtc_video_decoder.cc ('k') | media/base/filters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_decoder_unittest.cc
diff --git a/content/renderer/media/rtc_video_decoder_unittest.cc b/content/renderer/media/rtc_video_decoder_unittest.cc
index b62db9273ed04373a92fafdbdafa0bcbadc0a822..efe67ed9d397d6e93780c0ed676c54ba2c3e9aa3 100644
--- a/content/renderer/media/rtc_video_decoder_unittest.cc
+++ b/content/renderer/media/rtc_video_decoder_unittest.cc
@@ -46,7 +46,6 @@ class RTCVideoDecoderTest : public testing::Test {
static const PipelineStatistics kStatistics;
RTCVideoDecoderTest() {
- MediaFormat media_format;
decoder_ = new RTCVideoDecoder(&message_loop_, kUrl);
renderer_ = new MockVideoRenderer();
@@ -96,14 +95,9 @@ TEST_F(RTCVideoDecoderTest, Initialize_Successful) {
InitializeDecoderSuccessfully();
// Test that the output media format is an uncompressed video surface that
- // matches the dimensions specified by rtc.
- const MediaFormat& media_format = decoder_->media_format();
- int width = 0;
- int height = 0;
- EXPECT_TRUE(media_format.GetAsInteger(MediaFormat::kWidth, &width));
- EXPECT_EQ(kWidth, width);
- EXPECT_TRUE(media_format.GetAsInteger(MediaFormat::kHeight, &height));
- EXPECT_EQ(kHeight, height);
+ // matches the dimensions specified by RTC.
+ EXPECT_EQ(kWidth, decoder_->width());
+ EXPECT_EQ(kHeight, decoder_->height());
}
TEST_F(RTCVideoDecoderTest, DoSeek) {
@@ -164,13 +158,8 @@ TEST_F(RTCVideoDecoderTest, DoSetSize) {
decoder_->SetSize(new_width, new_height, new_reserved);
- const MediaFormat& media_format = decoder_->media_format();
- int width = 0;
- int height = 0;
- EXPECT_TRUE(media_format.GetAsInteger(MediaFormat::kWidth, &width));
- EXPECT_EQ(new_width, width);
- EXPECT_TRUE(media_format.GetAsInteger(MediaFormat::kHeight, &height));
- EXPECT_EQ(new_height, height);
+ EXPECT_EQ(new_width, decoder_->width());
+ EXPECT_EQ(new_height, decoder_->height());
message_loop_.RunAllPending();
}
« no previous file with comments | « content/renderer/media/rtc_video_decoder.cc ('k') | media/base/filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698