Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(704)

Unified Diff: chrome/browser/policy/configuration_policy_store_interface_unittest.cc

Issue 6979011: Move user cloud policy to BrowserProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments by mnissler. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/configuration_policy_store_interface_unittest.cc
diff --git a/chrome/browser/policy/configuration_policy_store_interface_unittest.cc b/chrome/browser/policy/configuration_policy_store_interface_unittest.cc
deleted file mode 100644
index c9763726f09d5f7a559ac2c9c12a0dd7995c72eb..0000000000000000000000000000000000000000
--- a/chrome/browser/policy/configuration_policy_store_interface_unittest.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/policy/configuration_policy_store_interface.h"
-#include "chrome/browser/policy/mock_configuration_policy_store.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using ::testing::_;
-
-namespace policy {
-
-TEST(ConfigurationPolicyStoreInterfaceTest, Observer) {
- MockConfigurationPolicyStore store;
- EXPECT_CALL(store, Apply(_, _)).Times(3);
- ObservingPolicyStoreInterface observer(&store);
-
- EXPECT_FALSE(observer.IsProxyPolicyApplied());
- observer.Apply(kPolicyJavascriptEnabled, Value::CreateBooleanValue(true));
- EXPECT_FALSE(observer.IsProxyPolicyApplied());
- observer.Apply(kPolicyProxyMode, Value::CreateStringValue("direct"));
- EXPECT_TRUE(observer.IsProxyPolicyApplied());
- observer.Apply(kPolicyIncognitoEnabled, Value::CreateBooleanValue(true));
- EXPECT_TRUE(observer.IsProxyPolicyApplied());
-
- EXPECT_TRUE(store.Get(kPolicyJavascriptEnabled) != NULL);
- EXPECT_TRUE(store.Get(kPolicyProxyMode) != NULL);
- EXPECT_TRUE(store.Get(kPolicyIncognitoEnabled) != NULL);
- EXPECT_TRUE(store.Get(kPolicyPrintingEnabled) == NULL);
-}
-
-TEST(ConfigurationPolicyStoreInterfaceTest, Filter) {
- MockConfigurationPolicyStore store_pass;
- EXPECT_CALL(store_pass, Apply(_, _)).Times(1);
- FilteringPolicyStoreInterface filter_pass(&store_pass, true);
-
- EXPECT_TRUE(store_pass.policy_map().empty());
- filter_pass.Apply(kPolicyJavascriptEnabled, Value::CreateBooleanValue(true));
- EXPECT_TRUE(store_pass.policy_map().empty());
- filter_pass.Apply(kPolicyProxyMode, Value::CreateStringValue("direct"));
- EXPECT_FALSE(store_pass.policy_map().empty());
- EXPECT_EQ(store_pass.policy_map().size(), 1u);
- EXPECT_TRUE(store_pass.Get(kPolicyJavascriptEnabled) == NULL);
- EXPECT_TRUE(store_pass.Get(kPolicyProxyMode) != NULL);
-
- MockConfigurationPolicyStore store_block;
- EXPECT_CALL(store_block, Apply(_, _)).Times(0);
- FilteringPolicyStoreInterface filter_block(&store_block, false);
-
- EXPECT_TRUE(store_block.policy_map().empty());
- filter_block.Apply(kPolicyJavascriptEnabled, Value::CreateBooleanValue(true));
- EXPECT_TRUE(store_block.policy_map().empty());
- filter_block.Apply(kPolicyProxyMode, Value::CreateStringValue("direct"));
- EXPECT_TRUE(store_block.policy_map().empty());
-}
-
-} // namespace policy
« no previous file with comments | « chrome/browser/policy/configuration_policy_store_interface.cc ('k') | chrome/browser/policy/profile_policy_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698