| Index: chrome/browser/policy/cloud_policy_browsertest.cc
|
| diff --git a/chrome/browser/policy/cloud_policy_browsertest.cc b/chrome/browser/policy/cloud_policy_browsertest.cc
|
| index 7f60752daca242a902cfd54e64df459a5fff6f21..78be44b8d085250b24a5e5d70007f5ef7fa08cfb 100644
|
| --- a/chrome/browser/policy/cloud_policy_browsertest.cc
|
| +++ b/chrome/browser/policy/cloud_policy_browsertest.cc
|
| @@ -19,6 +19,7 @@
|
| #include "chrome/browser/policy/policy_service.h"
|
| #include "chrome/browser/policy/proto/chrome_settings.pb.h"
|
| #include "chrome/browser/policy/proto/cloud_policy.pb.h"
|
| +#include "chrome/browser/policy/test_utils.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| @@ -137,19 +138,8 @@ class CloudPolicyTest : public InProcessBrowserTest {
|
| }
|
|
|
| virtual void SetUpOnMainThread() OVERRIDE {
|
| - // Checks that no policies have been loaded by the other providers before
|
| - // setting up the cloud connection. Other policies configured in the test
|
| - // machine will interfere with these tests.
|
| - const PolicyMap& map = g_browser_process->policy_service()->GetPolicies(
|
| - PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()));
|
| - if (!map.empty()) {
|
| - base::DictionaryValue dict;
|
| - for (PolicyMap::const_iterator it = map.begin(); it != map.end(); ++it)
|
| - dict.SetWithoutPathExpansion(it->first, it->second.value->DeepCopy());
|
| - ADD_FAILURE()
|
| - << "There are pre-existing policies in this machine that will "
|
| - << "interfere with these tests. Policies found: " << dict;
|
| - }
|
| + ASSERT_TRUE(PolicyServiceIsEmpty(g_browser_process->policy_service()))
|
| + << "Pre-existing policies in this machine will make this test fail.";
|
|
|
| BrowserPolicyConnector* connector =
|
| g_browser_process->browser_policy_connector();
|
|
|