chromium/chrome/browser/profiles/incognito_mode_policy_handler_unittest.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/profiles/incognito_mode_policy_handler.h"

#include "base/memory/ptr_util.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "components/policy/core/browser/configuration_policy_pref_store.h"
#include "components/policy/core/browser/configuration_policy_pref_store_test.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/policy/core/common/policy_types.h"
#include "components/policy/policy_constants.h"

namespace policy {

// Tests Incognito mode availability preference setting.
class IncognitoModePolicyHandlerTest
    : public ConfigurationPolicyPrefStoreTest {};

// The following testcases verify that if the obsolete IncognitoEnabled
// policy is not set, the IncognitoModeAvailability values should be copied
// from IncognitoModeAvailability policy to pref "as is".
TEST_F(IncognitoModePolicyHandlerTest,
       NoObsoletePolicyAndIncognitoEnabled) {}

TEST_F(IncognitoModePolicyHandlerTest,
       NoObsoletePolicyAndIncognitoDisabled) {}

TEST_F(IncognitoModePolicyHandlerTest,
       NoObsoletePolicyAndIncognitoForced) {}

TEST_F(IncognitoModePolicyHandlerTest,
       NoObsoletePolicyAndNoIncognitoAvailability) {}

// Checks that if the obsolete IncognitoEnabled policy is set, if sets
// the IncognitoModeAvailability preference only in case
// the IncognitoModeAvailability policy is not specified.
TEST_F(IncognitoModePolicyHandlerTest,
       ObsoletePolicyDoesNotAffectAvailabilityEnabled) {}

TEST_F(IncognitoModePolicyHandlerTest,
       ObsoletePolicyDoesNotAffectAvailabilityForced) {}

TEST_F(IncognitoModePolicyHandlerTest,
       ObsoletePolicySetsPreferenceToEnabled) {}

TEST_F(IncognitoModePolicyHandlerTest,
       ObsoletePolicySetsPreferenceToDisabled) {}

}  // namespace policy