Source release 17.1.0

This commit is contained in:
John "Juce" Bruce
2022-07-07 17:14:31 -07:00
parent 8c17574083
commit 694cf6fb25
2233 changed files with 272026 additions and 223371 deletions

View File

@@ -1,35 +1,31 @@
// Copyright 2017 Google Inc. All Rights Reserved.
// Copyright 2017 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine License
// Agreement.
//
// Unit tests for the metrics collections,
// EngineMetrics, SessionMetrics and CryptoMetrics.
#include "metrics_collections.h"
#include <sstream>
#include <gtest/gtest.h>
#include "device_files.h"
#include "gmock/gmock.h"
#include "google/protobuf/text_format.h"
#include "gtest/gtest.h"
#include "log.h"
#include "string_conversions.h"
#include "wv_cdm_types.h"
#include "wv_metrics.pb.h"
namespace wvcdm {
namespace metrics {
using drm_metrics::WvCdmMetrics;
namespace {
const char kSessionId1[] = "session_id_1";
const char kSessionId2[] = "session_id_2";
} // anonymous namespace
namespace wvcdm {
namespace metrics {
} // namespace
// TODO(blueeyes): Improve this implementation by supporting full message
// API In CDM. That allows us to use MessageDifferencer.
class EngineMetricsTest : public ::testing::Test {
};
class EngineMetricsTest : public ::testing::Test {};
TEST_F(EngineMetricsTest, AllEngineMetrics) {
EngineMetrics engine_metrics;
@@ -78,16 +74,16 @@ TEST_F(EngineMetricsTest, AllEngineMetrics) {
EXPECT_GT(actual.engine_metrics().cdm_engine_decrypt_time_us_size(), 0);
EXPECT_GT(actual.engine_metrics().cdm_engine_find_session_for_key_size(), 0);
EXPECT_GT(
actual.engine_metrics()
.cdm_engine_generate_key_request_time_us_size(), 0);
EXPECT_GT(
actual.engine_metrics()
.cdm_engine_get_provisioning_request_time_us_size(), 0);
actual.engine_metrics().cdm_engine_generate_key_request_time_us_size(),
0);
EXPECT_GT(actual.engine_metrics()
.cdm_engine_get_provisioning_request_time_us_size(),
0);
EXPECT_GT(actual.engine_metrics().cdm_engine_get_usage_info_time_us_size(),
0);
EXPECT_GT(
actual.engine_metrics()
.cdm_engine_handle_provisioning_response_time_us_size(), 0);
EXPECT_GT(actual.engine_metrics()
.cdm_engine_handle_provisioning_response_time_us_size(),
0);
EXPECT_GT(actual.engine_metrics().cdm_engine_open_key_set_session_size(), 0);
EXPECT_GT(actual.engine_metrics().cdm_engine_open_session_size(), 0);
EXPECT_GT(actual.engine_metrics().cdm_engine_query_key_status_time_us_size(),
@@ -105,9 +101,9 @@ TEST_F(EngineMetricsTest, AllEngineMetrics) {
actual.engine_metrics().app_package_name().string_value());
EXPECT_EQ("test cdm version",
actual.engine_metrics().cdm_engine_cdm_version().string_value());
EXPECT_EQ(100,
actual.engine_metrics()
.cdm_engine_creation_time_millis().int_value());
EXPECT_EQ(
100,
actual.engine_metrics().cdm_engine_creation_time_millis().int_value());
}
TEST_F(EngineMetricsTest, EngineAndCryptoMetrics) {
@@ -120,8 +116,8 @@ TEST_F(EngineMetricsTest, EngineAndCryptoMetrics) {
CryptoMetrics* crypto_metrics = engine_metrics.GetCryptoMetrics();
crypto_metrics->crypto_session_get_device_unique_id_.Increment(NO_ERROR);
crypto_metrics->crypto_session_generic_decrypt_
.Record(2.0, NO_ERROR, Pow2Bucket(1025), kEncryptionAlgorithmAesCbc128);
crypto_metrics->crypto_session_generic_decrypt_.Record(
2.0, NO_ERROR, Pow2Bucket(1025), kEncryptionAlgorithmAesCbc128);
WvCdmMetrics actual_metrics;
engine_metrics.Serialize(&actual_metrics);
@@ -133,29 +129,38 @@ TEST_F(EngineMetricsTest, EngineAndCryptoMetrics) {
ASSERT_EQ(1,
actual_metrics.engine_metrics().cdm_engine_add_key_time_us_size());
EXPECT_EQ(2, actual_metrics.engine_metrics()
.cdm_engine_add_key_time_us(0)
.attributes().error_code());
ASSERT_EQ(1,
actual_metrics.engine_metrics().cdm_engine_close_session_size());
.cdm_engine_add_key_time_us(0)
.attributes()
.error_code());
ASSERT_EQ(1, actual_metrics.engine_metrics().cdm_engine_close_session_size());
EXPECT_EQ(UNKNOWN_ERROR, actual_metrics.engine_metrics()
.cdm_engine_close_session(0)
.attributes().error_code());
ASSERT_EQ(1, actual_metrics.engine_metrics().crypto_metrics()
.crypto_session_get_device_unique_id_size());
EXPECT_EQ(1, actual_metrics.engine_metrics().crypto_metrics()
.crypto_session_get_device_unique_id(0)
.count());
EXPECT_EQ(NO_ERROR, actual_metrics.engine_metrics().crypto_metrics()
.crypto_session_get_device_unique_id(0)
.attributes().error_code());
ASSERT_EQ(1, actual_metrics.engine_metrics().crypto_metrics()
.crypto_session_generic_decrypt_time_us_size());
EXPECT_EQ(2.0, actual_metrics.engine_metrics().crypto_metrics()
.crypto_session_generic_decrypt_time_us(0)
.mean());
EXPECT_EQ(NO_ERROR, actual_metrics.engine_metrics().crypto_metrics()
.crypto_session_generic_decrypt_time_us(0)
.attributes().error_code());
.cdm_engine_close_session(0)
.attributes()
.error_code());
ASSERT_EQ(1, actual_metrics.engine_metrics()
.crypto_metrics()
.crypto_session_get_device_unique_id_size());
EXPECT_EQ(1, actual_metrics.engine_metrics()
.crypto_metrics()
.crypto_session_get_device_unique_id(0)
.count());
EXPECT_EQ(NO_ERROR, actual_metrics.engine_metrics()
.crypto_metrics()
.crypto_session_get_device_unique_id(0)
.attributes()
.error_code());
ASSERT_EQ(1, actual_metrics.engine_metrics()
.crypto_metrics()
.crypto_session_generic_decrypt_time_us_size());
EXPECT_EQ(2.0, actual_metrics.engine_metrics()
.crypto_metrics()
.crypto_session_generic_decrypt_time_us(0)
.mean());
EXPECT_EQ(NO_ERROR, actual_metrics.engine_metrics()
.crypto_metrics()
.crypto_session_generic_decrypt_time_us(0)
.attributes()
.error_code());
}
TEST_F(EngineMetricsTest, EmptyEngineMetrics) {
@@ -186,8 +191,8 @@ TEST_F(EngineMetricsTest, EngineMetricsWithSessions) {
engine_metrics.AddSession();
session_metrics_2->SetSessionId(kSessionId2);
// Record a CryptoMetrics metric in the session.
session_metrics_2->GetCryptoMetrics()->crypto_session_generic_decrypt_
.Record(2.0, NO_ERROR, Pow2Bucket(1025), kEncryptionAlgorithmAesCbc128);
session_metrics_2->GetCryptoMetrics()->crypto_session_generic_decrypt_.Record(
2.0, NO_ERROR, Pow2Bucket(1025), kEncryptionAlgorithmAesCbc128);
WvCdmMetrics actual_metrics;
engine_metrics.Serialize(&actual_metrics);
@@ -201,7 +206,8 @@ TEST_F(EngineMetricsTest, EngineMetricsWithSessions) {
actual_metrics.session_metrics(0).session_id().string_value());
EXPECT_EQ(kSessionId2,
actual_metrics.session_metrics(1).session_id().string_value());
EXPECT_EQ(1, actual_metrics.session_metrics(1).crypto_metrics()
EXPECT_EQ(1, actual_metrics.session_metrics(1)
.crypto_metrics()
.crypto_session_generic_decrypt_time_us_size());
}
@@ -259,8 +265,7 @@ TEST_F(EngineMetricsTest, EngineMetricsConsolidateSessionsNoSessions) {
ASSERT_EQ(0, actual_metrics.session_metrics_size());
}
class SessionMetricsTest : public ::testing::Test {
};
class SessionMetricsTest : public ::testing::Test {};
TEST_F(SessionMetricsTest, AllSessionMetrics) {
SessionMetrics session_metrics;
@@ -275,11 +280,13 @@ TEST_F(SessionMetricsTest, AllSessionMetrics) {
2.0, kKeyRequestTypeInitial);
session_metrics.oemcrypto_build_info_.Record("test build info");
session_metrics.license_sdk_version_.Record("test license sdk version");
session_metrics.license_service_version_.Record("test license service version");
session_metrics.license_service_version_.Record(
"test license service version");
session_metrics.drm_certificate_key_type_.Record(1);
// Record a CryptoMetrics metric in the session.
session_metrics.GetCryptoMetrics()->crypto_session_generic_decrypt_
.Record(2.0, NO_ERROR, Pow2Bucket(1025), kEncryptionAlgorithmAesCbc128);
session_metrics.GetCryptoMetrics()->crypto_session_generic_decrypt_.Record(
2.0, NO_ERROR, Pow2Bucket(1025), kEncryptionAlgorithmAesCbc128);
WvCdmMetrics::SessionMetrics actual;
session_metrics.Serialize(&actual);
@@ -297,6 +304,7 @@ TEST_F(SessionMetricsTest, AllSessionMetrics) {
actual.license_service_version().string_value().c_str());
EXPECT_GT(
actual.crypto_metrics().crypto_session_generic_decrypt_time_us_size(), 0);
EXPECT_EQ(1, actual.drm_certificate_key_type().int_value());
}
TEST_F(SessionMetricsTest, EmptySessionMetrics) {
@@ -313,32 +321,30 @@ TEST_F(SessionMetricsTest, EmptySessionMetrics) {
EXPECT_EQ(0, actual_metrics.cdm_session_restore_usage_session_size());
}
class CryptoMetricsTest : public ::testing::Test {
};
class CryptoMetricsTest : public ::testing::Test {};
TEST_F(CryptoMetricsTest, AllCryptoMetrics) {
CryptoMetrics crypto_metrics;
// Crypto session metrics.
crypto_metrics.crypto_session_delete_all_usage_reports_.Increment(NO_ERROR);
crypto_metrics.crypto_session_delete_multiple_usage_information_
.Increment(NO_ERROR);
crypto_metrics.crypto_session_generic_decrypt_
.Record(2.0, NO_ERROR, Pow2Bucket(1025), kEncryptionAlgorithmAesCbc128);
crypto_metrics.crypto_session_generic_encrypt_
.Record(2.0, NO_ERROR, Pow2Bucket(1025), kEncryptionAlgorithmAesCbc128);
crypto_metrics.crypto_session_generic_sign_
.Record(2.0, NO_ERROR, Pow2Bucket(1025), kSigningAlgorithmHmacSha256);
crypto_metrics.crypto_session_generic_verify_
.Record(2.0, NO_ERROR, Pow2Bucket(1025), kSigningAlgorithmHmacSha256);
crypto_metrics.crypto_session_delete_multiple_usage_information_.Increment(
NO_ERROR);
crypto_metrics.crypto_session_generic_decrypt_.Record(
2.0, NO_ERROR, Pow2Bucket(1025), kEncryptionAlgorithmAesCbc128);
crypto_metrics.crypto_session_generic_encrypt_.Record(
2.0, NO_ERROR, Pow2Bucket(1025), kEncryptionAlgorithmAesCbc128);
crypto_metrics.crypto_session_generic_sign_.Record(
2.0, NO_ERROR, Pow2Bucket(1025), kSigningAlgorithmHmacSha256);
crypto_metrics.crypto_session_generic_verify_.Record(
2.0, NO_ERROR, Pow2Bucket(1025), kSigningAlgorithmHmacSha256);
crypto_metrics.crypto_session_get_device_unique_id_.Increment(NO_ERROR);
crypto_metrics.crypto_session_get_token_.Increment(NO_ERROR);
crypto_metrics.crypto_session_life_span_.Record(1.0);
crypto_metrics.crypto_session_load_certificate_private_key_
.Record(1.0, NO_ERROR);
crypto_metrics.crypto_session_load_certificate_private_key_.Record(1.0,
NO_ERROR);
crypto_metrics.crypto_session_open_.Record(1.0, NO_ERROR, kLevelDefault);
crypto_metrics.crypto_session_update_usage_information_
.Record(1.0, NO_ERROR);
crypto_metrics.crypto_session_update_usage_information_.Record(1.0, NO_ERROR);
crypto_metrics.crypto_session_usage_information_support_.Record(true);
crypto_metrics.crypto_session_security_level_.Record(kSecurityLevelL2);
@@ -357,90 +363,89 @@ TEST_F(CryptoMetricsTest, AllCryptoMetrics) {
// Oem crypto metrics.
crypto_metrics.oemcrypto_api_version_.Record(123);
crypto_metrics.oemcrypto_close_session_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_copy_buffer_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_deactivate_usage_entry_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_decrypt_cenc_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_delete_usage_entry_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_delete_usage_table_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_derive_keys_from_session_key_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_force_delete_usage_entry_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_generate_derived_keys_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_generate_nonce_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_generate_rsa_signature_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_generate_signature_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_generic_decrypt_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_generic_encrypt_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_generic_sign_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_generic_verify_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_get_device_id_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_get_key_data_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_close_session_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_copy_buffer_.Record(1.0, OEMCrypto_ERROR_INIT_FAILED,
Pow2Bucket(1025));
crypto_metrics.oemcrypto_deactivate_usage_entry_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_decrypt_cenc_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_delete_usage_entry_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_delete_usage_table_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_derive_keys_from_session_key_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_force_delete_usage_entry_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_generate_derived_keys_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_generate_nonce_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_generate_rsa_signature_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_generate_signature_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_generic_decrypt_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_generic_encrypt_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_generic_sign_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_generic_verify_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_get_device_id_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_get_key_data_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED, Pow2Bucket(1025));
crypto_metrics.oemcrypto_max_number_of_sessions_.Record(7);
crypto_metrics.oemcrypto_number_of_open_sessions_.Record(5);
crypto_metrics.oemcrypto_get_oem_public_certificate_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_get_oem_public_certificate_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_provisioning_method_.Record(OEMCrypto_Keybox);
crypto_metrics.oemcrypto_get_random_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_initialize_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_get_random_.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_initialize_.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_is_anti_rollback_hw_present_.Record(true);
crypto_metrics.oemcrypto_is_keybox_valid_.Record(true);
crypto_metrics.oemcrypto_load_device_rsa_key_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_load_device_drm_key_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_load_keys_.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_refresh_keys_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_refresh_keys_.Record(1.0,
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_report_usage_.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_rewrap_device_rsa_key_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_rewrap_device_rsa_key_30_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_rewrap_device_rsa_key_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_rewrap_device_rsa_key_30_.Record(
1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_security_patch_level_.Record(123);
crypto_metrics.oemcrypto_select_key_
.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_update_usage_table_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_create_usage_table_header_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_load_usage_table_header_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_shrink_usage_table_header_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_create_new_usage_entry_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_load_usage_entry_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_move_entry_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_create_old_usage_entry_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_copy_old_usage_entry_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_select_key_.Record(1.0, OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_update_usage_table_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_create_usage_table_header_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_load_usage_table_header_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_shrink_usage_table_header_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_create_new_usage_entry_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_load_usage_entry_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_move_entry_.Increment(OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_create_old_usage_entry_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_copy_old_usage_entry_.Increment(
OEMCrypto_ERROR_INIT_FAILED);
crypto_metrics.oemcrypto_set_sandbox_.Record("sandbox");
crypto_metrics.oemcrypto_set_decrypt_hash_
.Increment(OEMCrypto_ERROR_INIT_FAILED);
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);
crypto_metrics.oemcrypto_watermarking_support_.Record(
OEMCrypto_WatermarkingAlwaysOn);
crypto_metrics.oemcrypto_production_readiness_.Record(OEMCrypto_SUCCESS);
WvCdmMetrics::CryptoMetrics actual;
crypto_metrics.Serialize(&actual);
@@ -509,7 +514,7 @@ TEST_F(CryptoMetricsTest, AllCryptoMetrics) {
EXPECT_GT(actual.oemcrypto_initialize_time_us_size(), 0);
EXPECT_EQ(true, actual.oemcrypto_is_anti_rollback_hw_present().int_value());
EXPECT_EQ(true, actual.oemcrypto_is_keybox_valid().int_value());
EXPECT_GT(actual.oemcrypto_load_device_rsa_key_time_us_size(), 0);
EXPECT_GT(actual.oemcrypto_load_device_drm_key_time_us_size(), 0);
EXPECT_GT(actual.oemcrypto_load_keys_time_us_size(), 0);
EXPECT_GT(actual.oemcrypto_refresh_keys_time_us_size(), 0);
EXPECT_GT(actual.oemcrypto_report_usage_size(), 0);
@@ -532,7 +537,10 @@ TEST_F(CryptoMetricsTest, AllCryptoMetrics) {
EXPECT_EQ(234, actual.oemcrypto_minor_api_version().int_value());
EXPECT_EQ(321,
actual.oemcrypto_maximum_usage_table_header_size().int_value());
EXPECT_EQ(static_cast<int>(OEMCrypto_WatermarkingAlwaysOn),
actual.oemcrypto_watermarking_support().int_value());
EXPECT_EQ(static_cast<int>(OEMCrypto_SUCCESS),
actual.oemcrypto_production_readiness().int_value());
}
} // namespace metrics
} // namespace wvcdm