Modify QueryStatusL3 test to allow for L3 devices

[ Merge of http://go/wvgerrit/17501 ]

Widevine request_license_tests were written with the expectation that
devices would by default be enabled for security level 1 and fallback
to level 3 if needed. Some devices such as seed are L3 only and results
in failures in the QueryStatusL3 test. This CL corrects the test's
expectation.

b/26902214

Change-Id: Ie84554337cd3716d120f67e592888af0cde719c7
This commit is contained in:
Rahul Frias
2016-04-13 10:30:07 -07:00
parent 91059f1d81
commit c535436bab

View File

@@ -2605,6 +2605,12 @@ TEST_F(WvCdmRequestLicenseTest, QueryStatusL3) {
ASSERT_FALSE(ss.fail());
EXPECT_TRUE(ss.eof());
std::string default_security_level;
EXPECT_EQ(
wvcdm::NO_ERROR,
decryptor_.QueryStatus(kLevelDefault, wvcdm::QUERY_KEY_SECURITY_LEVEL,
&default_security_level));
EXPECT_EQ(wvcdm::NO_ERROR, decryptor_.QueryStatus(
kLevel3, wvcdm::QUERY_KEY_SYSTEM_ID, &value));
ss.clear();
@@ -2613,7 +2619,9 @@ TEST_F(WvCdmRequestLicenseTest, QueryStatusL3) {
ss >> system_id;
ASSERT_FALSE(ss.fail());
EXPECT_TRUE(ss.eof());
if (default_security_level != wvcdm::QUERY_VALUE_SECURITY_LEVEL_L3) {
EXPECT_NE(default_system_id, system_id);
}
EXPECT_EQ(wvcdm::NO_ERROR,
decryptor_.QueryStatus(kLevel3, wvcdm::QUERY_KEY_PROVISIONING_ID,