Fix UniquePtr Calls

This change corrects some problems with the unit tests and make files
for the libcleardrmengine.

Change-Id: Iafd8aae2ecae3885ad4bbfdf9257bce6f62f98dc
This commit is contained in:
Fred Gylys-Colwell
2012-12-21 10:47:41 -08:00
committed by Jeff Tinker
parent fede3bffdd
commit 8ab3b10971
5 changed files with 25 additions and 15 deletions

View File

@@ -39,12 +39,12 @@ TEST(WVCryptoPluginTest, ManagesASession) {
oemCryptoSessionClosed = false;
closedCryptoSession = 0;
UniquePtr<WVCryptoPlugin> plugin = new WVCryptoPlugin();
UniquePtr<WVCryptoPlugin> plugin(new WVCryptoPlugin());
EXPECT_TRUE(oemCryptoSessionOpened) <<
"WVCryptoPlugin did not call OEMCrypto_OpenSession()";
plugin.clear();
plugin.reset();
EXPECT_TRUE(oemCryptoSessionClosed) <<
"WVCryptoPlugin did not call OEMCrypto_CloseSession()";
@@ -53,7 +53,7 @@ TEST(WVCryptoPluginTest, ManagesASession) {
}
TEST(WVCryptoPluginTest, CorrectlyReportsSecureBuffers) {
UniquePtr<WVCryptoPlugin> plugin = new WVCryptoPlugin();
UniquePtr<WVCryptoPlugin> plugin(new WVCryptoPlugin());
EXPECT_FALSE(plugin->requiresSecureDecoderComponent("video/mp4")) <<
"WVCryptoPlugin incorrectly expects a secure video decoder";
@@ -120,7 +120,7 @@ TEST(WVCryptoPluginTest, AttemptsToDecrypt) {
memset(decryptOffsets, 0, sizeof(decryptOffsets));
memset(decryptOutBuffers, 0, sizeof(decryptOutBuffers));
UniquePtr<WVCryptoPlugin> plugin = new WVCryptoPlugin();
UniquePtr<WVCryptoPlugin> plugin(new WVCryptoPlugin());
android::CryptoPlugin::SubSample subSamples[3];
subSamples[0].mNumBytesOfEncryptedData = 16;