#include "content/browser/media/cdm_storage_manager.h"
#include <string>
#include "base/test/task_environment.h"
#include "base/test/test_file_util.h"
#include "base/test/test_future.h"
#include "media/mojo/mojom/cdm_storage.mojom.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "testing/gtest/include/gtest/gtest.h"
CdmFile;
CdmStorage;
namespace content {
namespace {
const media::CdmType kCdmType{ … };
const char kFileName[] = …;
const char kFileNameTwo[] = …;
const std::vector<uint8_t> kPopulatedFileValue = …;
const std::vector<uint8_t> kPopulatedFileValueTwo = …;
std::vector<uint8_t> kEmptyFileValue;
}
class CdmStorageManagerTest : public testing::Test { … };
class CdmStorageManagerSingularTest : public CdmStorageManagerTest,
public testing::WithParamInterface<bool> { … };
class CdmStorageManagerMultipleTest
: public CdmStorageManagerTest,
public testing::WithParamInterface<std::tuple<bool, bool>> { … };
TEST_P(CdmStorageManagerSingularTest, DeleteFile) { … }
TEST_P(CdmStorageManagerSingularTest, DeleteNonExistentFile) { … }
TEST_P(CdmStorageManagerSingularTest, DeleteDataForStorageKey) { … }
TEST_P(CdmStorageManagerSingularTest, DeleteFileNoDatabase) { … }
TEST_P(CdmStorageManagerMultipleTest, DeleteFile) { … }
TEST_P(CdmStorageManagerMultipleTest, DeleteDataForStorageKey) { … }
TEST_P(CdmStorageManagerMultipleTest, DeleteDataForStorageKeyTimeSpecified) { … }
TEST_P(CdmStorageManagerMultipleTest, DeleteFileNoDatabase) { … }
TEST_P(CdmStorageManagerMultipleTest, GetSizeForFileNoDatabase) { … }
TEST_P(CdmStorageManagerMultipleTest, GetSizeForTests) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}