Test renewal against same and different server
Merge from Widevine repo of http://go/wvgerrit/102843 The test WvCdmEngineTest.LicenseRenewal is split into two tests. One test verifies that the renewal may be fetched from the server specified in the license. The second test verifies that the renewal may be fetched from the same server that the license was fetched from. These might be the same server, but when we run against an experimental server, a staging server, or UAT Nightly, these will be different. Test: ran the tests Bug: 141438127 Change-Id: Ia11441bd2ba0c6ddb264ee38bfcb5060b9ddb476
This commit is contained in:
@@ -402,14 +402,26 @@ TEST_F(WvCdmEngineTest, LoadKey) {
|
||||
holder.SignAndLoadLicense();
|
||||
}
|
||||
|
||||
TEST_F(WvCdmEngineTest, LicenseRenewal) {
|
||||
// This test generates a renewal and then requests the renewal using the server
|
||||
// url specified in the license. This is what most apps would do, but you should
|
||||
// skip this test when you want to set the license and renewal server on the
|
||||
// command line.
|
||||
TEST_F(WvCdmEngineTest, LicenseRenewalSpecifiedServer) {
|
||||
GenerateKeyRequest(binary_key_id(), kCencMimeType);
|
||||
VerifyNewKeyResponse(config_.license_server(), config_.client_auth());
|
||||
|
||||
GenerateRenewalRequest();
|
||||
VerifyRenewalKeyResponse(
|
||||
server_url_.empty() ? config_.license_server() : server_url_,
|
||||
config_.client_auth());
|
||||
VerifyRenewalKeyResponse(server_url_, config_.client_auth());
|
||||
}
|
||||
|
||||
// This test generates a renewal and then requests the renewal from the same
|
||||
// server from which we requested the original license.
|
||||
TEST_F(WvCdmEngineTest, LicenseRenewalSameServer) {
|
||||
GenerateKeyRequest(binary_key_id(), kCencMimeType);
|
||||
VerifyNewKeyResponse(config_.license_server(), config_.client_auth());
|
||||
|
||||
GenerateRenewalRequest();
|
||||
VerifyRenewalKeyResponse(config_.license_server(), config_.client_auth());
|
||||
}
|
||||
|
||||
TEST_F(WvCdmEngineTest, ParseDecryptHashStringTest) {
|
||||
|
||||
@@ -117,7 +117,9 @@ bool UrlRequest::GetResponse(std::string* message) {
|
||||
}
|
||||
|
||||
ConcatenateChunkedResponse(response, message);
|
||||
LOGV("HTTP response: (%d): %s", message->size(), message->c_str());
|
||||
LOGV("HTTP response from %s://%s:%d%s: (%zd): %s", socket_.scheme().c_str(),
|
||||
socket_.domain_name().c_str(), socket_.port(),
|
||||
socket_.resource_path().c_str(), message->size(), message->c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user