OEMCrypto v16.2

Merge from Widevine repo of http://go/wvgerrit/93404

This is the unit tests, reference code, and documentation for
OEMCrypto v16.2. Backwards compatibility should work for a v15
OEMCrypto.

Some review comments will be addressed in future CLs.

Bug: 141247171
Test: Unit tests
Test: Media GTS tests on bonito
Change-Id: I9d427c07580e180c0a4cfdc4a68f538d351c0ddd
This commit is contained in:
Fred Gylys-Colwell
2020-01-18 10:18:50 -08:00
parent 7665614b2e
commit db2050dff1
62 changed files with 2947 additions and 2286 deletions

View File

@@ -439,6 +439,8 @@ TEST_F(CryptoMetricsTest, AllCryptoMetrics) {
crypto_metrics.oemcrypto_set_decrypt_hash_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_resource_rating_tier_.Record(123);
crypto_metrics.oemcrypto_minor_api_version_.Record(234);
crypto_metrics.oemcrypto_maximum_usage_table_header_size_.Record(321);
WvCdmMetrics::CryptoMetrics actual;
crypto_metrics.Serialize(&actual);
@@ -527,6 +529,9 @@ TEST_F(CryptoMetricsTest, AllCryptoMetrics) {
EXPECT_EQ("sandbox", actual.oemcrypto_set_sandbox().string_value());
EXPECT_GT(actual.oemcrypto_set_decrypt_hash_size(), 0);
EXPECT_EQ(123, actual.oemcrypto_resource_rating_tier().int_value());
EXPECT_EQ(234, actual.oemcrypto_minor_api_version().int_value());
EXPECT_EQ(321,
actual.oemcrypto_maximum_usage_table_header_size().int_value());
}
} // namespace metrics