diff --git a/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp b/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp index 5d24e264..080748d5 100644 --- a/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp +++ b/libwvdrmengine/cdm/core/test/cdm_engine_test.cpp @@ -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) { diff --git a/libwvdrmengine/cdm/core/test/url_request.cpp b/libwvdrmengine/cdm/core/test/url_request.cpp index e33aed8c..7978ef3d 100644 --- a/libwvdrmengine/cdm/core/test/url_request.cpp +++ b/libwvdrmengine/cdm/core/test/url_request.cpp @@ -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; }