#include "components/policy/core/common/cloud/user_cloud_policy_store.h"
#include <memory>
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "components/account_id/account_id.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/mock_cloud_external_data_manager.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_store.h"
#include "components/policy/core/common/cloud/test/policy_builder.h"
#include "components/policy/core/common/policy_switches.h"
#include "components/policy/policy_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
AllOf;
Eq;
Mock;
Property;
Sequence;
namespace policy {
namespace {
void RunUntilIdle() { … }
bool WriteStringToFile(const base::FilePath path, const std::string& data) { … }
}
class UserCloudPolicyStoreTest : public testing::Test { … };
TEST_F(UserCloudPolicyStoreTest, LoadWithNoFile) { … }
TEST_F(UserCloudPolicyStoreTest, LoadWithInvalidFile) { … }
TEST_F(UserCloudPolicyStoreTest, LoadImmediatelyWithNoFile) { … }
TEST_F(UserCloudPolicyStoreTest, LoadImmediatelyWithInvalidFile) { … }
TEST_F(UserCloudPolicyStoreTest, ShouldFailToLoadUnsignedPolicy) { … }
TEST_F(UserCloudPolicyStoreTest, Store) { … }
TEST_F(UserCloudPolicyStoreTest, StoreThenClear) { … }
TEST_F(UserCloudPolicyStoreTest, StoreRotatedKey) { … }
TEST_F(UserCloudPolicyStoreTest, ProvisionKeyTwice) { … }
TEST_F(UserCloudPolicyStoreTest, StoreTwoTimes) { … }
TEST_F(UserCloudPolicyStoreTest, StoreThenLoad) { … }
TEST_F(UserCloudPolicyStoreTest, StoreThenLoadImmediately) { … }
TEST_F(UserCloudPolicyStoreTest, StoreValidationError) { … }
TEST_F(UserCloudPolicyStoreTest, StoreUnsigned) { … }
TEST_F(UserCloudPolicyStoreTest, LoadValidationError) { … }
TEST_F(UserCloudPolicyStoreTest, KeyRotation) { … }
TEST_F(UserCloudPolicyStoreTest, InvalidCachedVerificationSignature) { … }
}