Commit 9904df6a authored by xhwang's avatar xhwang Committed by Commit bot

Fix MediaTypeConvertersTest.

Currently we are not serializing the data of a DecoderBuffer. The data will be
serialized into a separate DataPipe. Therefore, drop the data check in
MediaTypeConvertersTest.

See r307328 for details.

BUG=392236
TEST=This CL fixing failing tests.

Review URL: https://codereview.chromium.org/808633002

Cr-Commit-Position: refs/heads/master@{#308482}
parent f3e59936
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment