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

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: fixed remaining style issues 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..3fe529cb45e2fbc0af9e0c21b4be7b9da6645041 100644
--- a/media/crypto/aes_decryptor_unittest.cc
+++ b/media/crypto/aes_decryptor_unittest.cc
@@ -197,7 +197,7 @@ static scoped_refptr<DecoderBuffer> CreateWebMEncryptedBuffer(
data_offset += kWebMIvSize;
}
- encrypted_buffer->SetDecryptConfig(
+ encrypted_buffer->set_decrypt_config(
scoped_ptr<DecryptConfig>(new DecryptConfig(
std::string(reinterpret_cast<const char*>(key_id), key_id_size),
counter_block_str,
@@ -215,7 +215,7 @@ static scoped_refptr<DecoderBuffer> CreateSubsampleEncryptedBuffer(
scoped_refptr<DecoderBuffer> encrypted_buffer =
DecoderBuffer::CopyFrom(data, data_size);
CHECK(encrypted_buffer.get());
- encrypted_buffer->SetDecryptConfig(
+ encrypted_buffer->set_decrypt_config(
scoped_ptr<DecryptConfig>(new DecryptConfig(
std::string(reinterpret_cast<const char*>(key_id), key_id_size),
std::string(reinterpret_cast<const char*>(iv), iv_size),
@@ -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->data_size());
+ EXPECT_EQ(0, memcmp(plain_text, decrypted->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->data_size());
+ EXPECT_NE(0, memcmp(plain_text, decrypted->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->data_size());
+ EXPECT_NE(0, memcmp(plain_text, decrypted->data(), plain_text_size));
}
void DecryptAndExpectToFail(const scoped_refptr<DecoderBuffer>& encrypted) {

Powered by Google App Engine
This is Rietveld 408576698