#include "chrome/browser/policy/homepage_location_policy_handler.h"
#include <memory>
#include "base/values.h"
#include "chrome/common/pref_names.h"
#include "components/policy/core/browser/policy_error_map.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_types.h"
#include "components/policy/policy_constants.h"
#include "components/prefs/pref_value_map.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace policy {
namespace {
constexpr char kHttpUrl[] = …;
constexpr char kHttpsUrl[] = …;
constexpr char kFileUrl[] = …;
constexpr char kUrlWithNoScheme[] = …;
constexpr char kFixedUrlWithNoScheme[] = …;
constexpr char kInvalidSchemeUrl[] = …;
constexpr char kJavascript[] = …;
}
class HomepageLocationPolicyHandlerTest : public testing::Test { … };
TEST_F(HomepageLocationPolicyHandlerTest, NoPolicyDoesntExplode) { … }
TEST_F(HomepageLocationPolicyHandlerTest, StandardSchemesAreAccepted) { … }
TEST_F(HomepageLocationPolicyHandlerTest, kUrlWithMissingSchemeIsFixed) { … }
TEST_F(HomepageLocationPolicyHandlerTest, InvalidSchemeIsRejected) { … }
TEST_F(HomepageLocationPolicyHandlerTest, JavascriptIsRejected) { … }
TEST_F(HomepageLocationPolicyHandlerTest,
ApplyPolicySettings_SomethingSpecified) { … }
TEST_F(HomepageLocationPolicyHandlerTest,
ApplyPolicySettings_NothingSpecified) { … }
}