Source release 17.1.2
This commit is contained in:
39
core/test/message_dumper.h
Normal file
39
core/test/message_dumper.h
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright 2023 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
|
||||
#ifndef WVCDM_CORE_TEST_MESSAGE_DUMPER_H_
|
||||
#define WVCDM_CORE_TEST_MESSAGE_DUMPER_H_
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "wv_cdm_types.h"
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
class MessageDumper : public ::testing::Environment {
|
||||
// This dumps messages to a file so that the data can easily be turned
|
||||
// into golden data tests for the ODK library.
|
||||
public:
|
||||
~MessageDumper() override {}
|
||||
void SetUp() override;
|
||||
void TearDown() override;
|
||||
|
||||
static void DumpLicenseRequest(const CdmKeyRequest& request);
|
||||
static void DumpLicense(const std::string& response);
|
||||
static void DumpRenewalRequest(const CdmKeyRequest& request);
|
||||
static void DumpRenewal(const std::string& response);
|
||||
static void DumpProvisioningRequest(const CdmProvisioningRequest& request);
|
||||
static void DumpProvisioning(const CdmProvisioningResponse& response);
|
||||
static std::ofstream license_file;
|
||||
static std::ofstream renewal_file;
|
||||
static std::ofstream provision_file;
|
||||
};
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // WVCDM_CORE_TEST_MESSAGE_DUMPER_H_
|
||||
Reference in New Issue
Block a user