#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "content/browser/media/media_license_manager.h"
#include <string_view>
#include <vector>
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/gmock_expected_support.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "components/services/storage/public/cpp/buckets/bucket_locator.h"
#include "components/services/storage/public/cpp/constants.h"
#include "content/browser/media/cdm_storage_common.h"
#include "content/browser/media/media_license_quota_client.h"
#include "content/public/browser/storage_partition.h"
#include "media/cdm/cdm_type.h"
#include "media/mojo/mojom/cdm_storage.mojom-forward.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "storage/browser/file_system/file_system_context.h"
#include "storage/browser/test/mock_quota_manager.h"
#include "storage/browser/test/mock_quota_manager_proxy.h"
#include "storage/browser/test/test_file_system_context.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
namespace content {
namespace {
const media::CdmType kCdmType{ … };
const char kExampleOrigin[] = …;
}
class MediaLicenseManagerTest : public testing::Test { … };
TEST_F(MediaLicenseManagerTest, DeleteBucketData) { … }
TEST_F(MediaLicenseManagerTest, DeleteBucketDataClosedStorage) { … }
TEST_F(MediaLicenseManagerTest, DeleteBucketDataOpenConnection) { … }
TEST_F(MediaLicenseManagerTest, BucketCreationFailed) { … }
class MediaLicenseManagerIncognitoTest : public MediaLicenseManagerTest { … };
TEST_F(MediaLicenseManagerIncognitoTest, DeleteBucketData) { … }
TEST_F(MediaLicenseManagerIncognitoTest, DeleteBucketDataClosedStorage) { … }
TEST_F(MediaLicenseManagerIncognitoTest, DeleteBucketDataOpenConnection) { … }
TEST_F(MediaLicenseManagerIncognitoTest, BucketCreationFailed) { … }
}