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

Unified Diff: media/mojo/services/media_type_converters_unittest.cc

Issue 808633002: Fix MediaTypeConvertersTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/media_type_converters_unittest.cc
diff --git a/media/mojo/services/media_type_converters_unittest.cc b/media/mojo/services/media_type_converters_unittest.cc
index 4d3cc0096a93dd968fb894962360b50c4b2853ff..ecf61880161fc6ec739ef68604c3fd5ce16a4ab9 100644
--- a/media/mojo/services/media_type_converters_unittest.cc
+++ b/media/mojo/services/media_type_converters_unittest.cc
@@ -35,8 +35,9 @@ TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_Normal) {
scoped_refptr<DecoderBuffer> result(ptr.To<scoped_refptr<DecoderBuffer>>());
// Compare.
+ // Note: We intentionally do not serialize the data section of the
+ // DecoderBuffer; no need to check the data here.
EXPECT_EQ(kDataSize, result->data_size());
- EXPECT_EQ(0, memcmp(result->data(), kData, kDataSize));
EXPECT_EQ(kSideDataSize, result->side_data_size());
EXPECT_EQ(0, memcmp(result->side_data(), kSideData, kSideDataSize));
EXPECT_EQ(buffer->timestamp(), result->timestamp());
@@ -77,8 +78,9 @@ TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_KeyFrame) {
scoped_refptr<DecoderBuffer> result(ptr.To<scoped_refptr<DecoderBuffer>>());
// Compare.
+ // Note: We intentionally do not serialize the data section of the
+ // DecoderBuffer; no need to check the data here.
EXPECT_EQ(kDataSize, result->data_size());
- EXPECT_EQ(0, memcmp(result->data(), kData, kDataSize));
EXPECT_TRUE(result->is_key_frame());
}
@@ -104,8 +106,9 @@ TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_EncryptedBuffer) {
scoped_refptr<DecoderBuffer> result(ptr.To<scoped_refptr<DecoderBuffer>>());
// Compare.
+ // Note: We intentionally do not serialize the data section of the
+ // DecoderBuffer; no need to check the data here.
EXPECT_EQ(kDataSize, result->data_size());
- EXPECT_EQ(0, memcmp(result->data(), kData, kDataSize));
EXPECT_TRUE(buffer->decrypt_config()->Matches(*result->decrypt_config()));
// Test empty IV. This is used for clear buffer in an encrypted stream.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698