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

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

Issue 7147015: Move user cloud policy to BrowserProcess (was 6979011) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit_test include breakage 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/cloud_policy_subsystem_unittest.cc
diff --git a/chrome/browser/policy/cloud_policy_subsystem_unittest.cc b/chrome/browser/policy/cloud_policy_subsystem_unittest.cc
index e2f31678943bce5da6e01a2ca56376bb1ba9b7b1..9d917832426b32c27c59dd125fbb091d200c7c56 100644
--- a/chrome/browser/policy/cloud_policy_subsystem_unittest.cc
+++ b/chrome/browser/policy/cloud_policy_subsystem_unittest.cc
@@ -19,6 +19,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/test/testing_browser_process.h"
#include "chrome/test/testing_pref_service.h"
+#include "content/browser/browser_thread.h"
#include "content/common/url_fetcher.h"
#include "policy/policy_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -243,10 +244,9 @@ class CloudPolicySubsystemTestBase : public TESTBASE {
private:
// Verifies for a given policy that it is provided by the subsystem.
void VerifyPolicy(enum ConfigurationPolicyType type, Value* expected) {
- MockConfigurationPolicyStore store;
- EXPECT_CALL(store, Apply(_, _)).Times(AtLeast(1));
- cache_->GetManagedPolicyProvider()->Provide(&store);
- ASSERT_TRUE(Value::Equals(expected, store.Get(type)));
+ const PolicyMap* policy_map = cache_->policy(
+ CloudPolicyCacheBase::POLICY_LEVEL_MANDATORY);
+ ASSERT_TRUE(Value::Equals(expected, policy_map->Get(type)));
}
// Verifies that the last recorded run of the subsystem did not issue
« no previous file with comments | « chrome/browser/policy/cloud_policy_subsystem.cc ('k') | chrome/browser/policy/configuration_policy_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698