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

Side by Side Diff: components/policy/core/common/cloud/user_cloud_policy_manager_unittest.cc

Issue 388963002: Get rid of the rest of CreateStringValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad rebase Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" 5 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 15 matching lines...) Expand all
26 26
27 namespace policy { 27 namespace policy {
28 namespace { 28 namespace {
29 29
30 class UserCloudPolicyManagerTest : public testing::Test { 30 class UserCloudPolicyManagerTest : public testing::Test {
31 protected: 31 protected:
32 UserCloudPolicyManagerTest() : store_(NULL) {} 32 UserCloudPolicyManagerTest() : store_(NULL) {}
33 33
34 virtual void SetUp() OVERRIDE { 34 virtual void SetUp() OVERRIDE {
35 // Set up a policy map for testing. 35 // Set up a policy map for testing.
36 policy_map_.Set("key", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 36 policy_map_.Set("key",
37 base::Value::CreateStringValue("value"), NULL); 37 POLICY_LEVEL_MANDATORY,
38 POLICY_SCOPE_USER,
39 new base::StringValue("value"),
40 NULL);
38 expected_bundle_.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) 41 expected_bundle_.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
39 .CopyFrom(policy_map_); 42 .CopyFrom(policy_map_);
40 } 43 }
41 44
42 virtual void TearDown() OVERRIDE { 45 virtual void TearDown() OVERRIDE {
43 if (manager_) { 46 if (manager_) {
44 manager_->RemoveObserver(&observer_); 47 manager_->RemoveObserver(&observer_);
45 manager_->Shutdown(); 48 manager_->Shutdown();
46 } 49 }
47 } 50 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 store_->NotifyStoreLoaded(); 90 store_->NotifyStoreLoaded();
88 EXPECT_TRUE(expected_bundle_.Equals(manager_->policies())); 91 EXPECT_TRUE(expected_bundle_.Equals(manager_->policies()));
89 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); 92 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME));
90 EXPECT_CALL(*store_, Clear()); 93 EXPECT_CALL(*store_, Clear());
91 manager_->DisconnectAndRemovePolicy(); 94 manager_->DisconnectAndRemovePolicy();
92 EXPECT_FALSE(manager_->core()->service()); 95 EXPECT_FALSE(manager_->core()->service());
93 } 96 }
94 97
95 } // namespace 98 } // namespace
96 } // namespace policy 99 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698