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

Unified Diff: chrome/browser/policy/cloud/cloud_policy_test_utils.cc

Issue 2534983002: Re-enabled UserCloudPolicyManagerChromeOS unit tests (Closed)
Patch Set: review feedback Created 4 years 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
« no previous file with comments | « chrome/browser/policy/cloud/cloud_policy_test_utils.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud/cloud_policy_test_utils.cc
diff --git a/chrome/browser/policy/cloud/cloud_policy_test_utils.cc b/chrome/browser/policy/cloud/cloud_policy_test_utils.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cbeed3054d872537d022932eeea226e86aaddeb1
--- /dev/null
+++ b/chrome/browser/policy/cloud/cloud_policy_test_utils.cc
@@ -0,0 +1,24 @@
+// Copyright 2016 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 "base/memory/ptr_util.h"
+#include "base/values.h"
+#include "chrome/browser/policy/cloud/cloud_policy_test_utils.h"
+#include "components/policy/core/common/policy_map.h"
+#include "components/policy/core/common/policy_types.h"
+#include "components/policy/policy_constants.h"
+
+namespace policy {
+
+void GetExpectedDefaultPolicy(PolicyMap* policy_map) {
+ policy_map->Set(key::kNTPContentSuggestionsEnabled, POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT,
+ base::WrapUnique(new base::FundamentalValue(false)), nullptr);
+#if defined(OS_CHROMEOS)
+ SetEnterpriseUsersDefaults(policy_map);
+#endif
+}
+
+
+} // namespace policy
« no previous file with comments | « chrome/browser/policy/cloud/cloud_policy_test_utils.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698