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

Unified Diff: media/crypto/aes_decryptor_unittest.cc

Issue 17408005: Refactored DecoderBuffer to use unix_hacker_style naming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@localrefactor
Patch Set: Created 7 years, 6 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
Index: media/crypto/aes_decryptor_unittest.cc
diff --git a/media/crypto/aes_decryptor_unittest.cc b/media/crypto/aes_decryptor_unittest.cc
index b4ff5a77f762ec79ac33964fc4633d7beb549731..ca8dff805d8a5734f52b9f0b1a7e5e331429ee28 100644
--- a/media/crypto/aes_decryptor_unittest.cc
+++ b/media/crypto/aes_decryptor_unittest.cc
@@ -179,7 +179,7 @@ static std::string GenerateCounterBlock(const uint8* iv, int iv_size) {
static scoped_refptr<DecoderBuffer> CreateWebMEncryptedBuffer(
const uint8* data, int data_size,
const uint8* key_id, int key_id_size) {
- scoped_refptr<DecoderBuffer> encrypted_buffer = DecoderBuffer::CopyFrom(
+ scoped_refptr<DecoderBuffer> encrypted_buffer = DecoderBuffer::copy_from(
data, data_size);
CHECK(encrypted_buffer.get());
DCHECK_EQ(kWebMSignalByteSize, 1);
@@ -213,7 +213,7 @@ static scoped_refptr<DecoderBuffer> CreateSubsampleEncryptedBuffer(
int data_offset,
const std::vector<SubsampleEntry>& subsample_entries) {
scoped_refptr<DecoderBuffer> encrypted_buffer =
- DecoderBuffer::CopyFrom(data, data_size);
+ DecoderBuffer::copy_from(data, data_size);
CHECK(encrypted_buffer.get());
encrypted_buffer->SetDecryptConfig(
scoped_ptr<DecryptConfig>(new DecryptConfig(
@@ -275,8 +275,8 @@ class AesDecryptorTest : public testing::Test {
decryptor_.Decrypt(Decryptor::kVideo, encrypted, decrypt_cb_);
ASSERT_TRUE(decrypted.get());
- ASSERT_EQ(plain_text_size, decrypted->GetDataSize());
- EXPECT_EQ(0, memcmp(plain_text, decrypted->GetData(), plain_text_size));
+ ASSERT_EQ(plain_text_size, decrypted->get_data_size());
+ EXPECT_EQ(0, memcmp(plain_text, decrypted->get_data(), plain_text_size));
}
void DecryptAndExpectDataMismatch(
@@ -288,8 +288,8 @@ class AesDecryptorTest : public testing::Test {
decryptor_.Decrypt(Decryptor::kVideo, encrypted, decrypt_cb_);
ASSERT_TRUE(decrypted.get());
- ASSERT_EQ(plain_text_size, decrypted->GetDataSize());
- EXPECT_NE(0, memcmp(plain_text, decrypted->GetData(), plain_text_size));
+ ASSERT_EQ(plain_text_size, decrypted->get_data_size());
+ EXPECT_NE(0, memcmp(plain_text, decrypted->get_data(), plain_text_size));
}
void DecryptAndExpectSizeDataMismatch(
@@ -301,8 +301,8 @@ class AesDecryptorTest : public testing::Test {
decryptor_.Decrypt(Decryptor::kVideo, encrypted, decrypt_cb_);
ASSERT_TRUE(decrypted.get());
- EXPECT_NE(plain_text_size, decrypted->GetDataSize());
- EXPECT_NE(0, memcmp(plain_text, decrypted->GetData(), plain_text_size));
+ EXPECT_NE(plain_text_size, decrypted->get_data_size());
+ EXPECT_NE(0, memcmp(plain_text, decrypted->get_data(), plain_text_size));
}
void DecryptAndExpectToFail(const scoped_refptr<DecoderBuffer>& encrypted) {

Powered by Google App Engine
This is Rietveld 408576698