Fix crypto session metrics test for provision 4.0
[ Merge of http://go/wvgerrit/151311 ] Missing a check for provision 4.0. Note: This CL is merged out of sequence with the CDM repo, resulting in a slightly different CL. [ Conflicting CL http://ag/18244016 ] Test: Native test crypto_session_unittest Bug: 180530495 Bug: 236317198 Change-Id: I79f753ba43098e1a3422c39b9903f57e5df03af2
This commit is contained in:
@@ -96,6 +96,9 @@ TEST_F(CryptoSessionMetricsTest, OpenSessionValidMetrics) {
|
|||||||
} else if (token_type == kClientTokenDrmCert) {
|
} else if (token_type == kClientTokenDrmCert) {
|
||||||
// TODO(blueeyes): Add support for getting the system id from a
|
// TODO(blueeyes): Add support for getting the system id from a
|
||||||
// pre-installed DRM certificate..
|
// pre-installed DRM certificate..
|
||||||
|
} else if (token_type == kClientTokenBootCertChain) {
|
||||||
|
EXPECT_EQ(OEMCrypto_BootCertificateChain,
|
||||||
|
metrics_proto.oemcrypto_provisioning_method().int_value());
|
||||||
} else {
|
} else {
|
||||||
FAIL() << "Unexpected token type: " << token_type;
|
FAIL() << "Unexpected token type: " << token_type;
|
||||||
}
|
}
|
||||||
@@ -134,9 +137,9 @@ TEST_F(CryptoSessionMetricsTest, GetProvisioningTokenValidMetrics) {
|
|||||||
ASSERT_GE(metrics_proto.oemcrypto_get_oem_public_certificate().size(), 1);
|
ASSERT_GE(metrics_proto.oemcrypto_get_oem_public_certificate().size(), 1);
|
||||||
EXPECT_THAT(metrics_proto.oemcrypto_get_oem_public_certificate(0).count(),
|
EXPECT_THAT(metrics_proto.oemcrypto_get_oem_public_certificate(0).count(),
|
||||||
AllOf(Ge(1), Le(2)));
|
AllOf(Ge(1), Le(2)));
|
||||||
|
} else if (token_type == kClientTokenBootCertChain) {
|
||||||
ASSERT_GE(metrics_proto.crypto_session_get_token().size(), 1);
|
EXPECT_EQ(OEMCrypto_BootCertificateChain,
|
||||||
EXPECT_GE(metrics_proto.crypto_session_get_token(0).count(), 1);
|
metrics_proto.oemcrypto_provisioning_method().int_value());
|
||||||
} else {
|
} else {
|
||||||
ASSERT_EQ(0, metrics_proto.crypto_session_get_token().size());
|
ASSERT_EQ(0, metrics_proto.crypto_session_get_token().size());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user