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

Side by Side Diff: chrome/browser/policy/user_cloud_policy_store_chromeos_unittest.cc

Issue 10805007: [cros] UserManager cleanup regarding stub/demo users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused fields and fix compile Created 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/policy/user_cloud_policy_store_chromeos.h" 5 #include "chrome/browser/policy/user_cloud_policy_store_chromeos.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 protected: 51 protected:
52 UserCloudPolicyStoreChromeOSTest() 52 UserCloudPolicyStoreChromeOSTest()
53 : loop_(MessageLoop::TYPE_UI), 53 : loop_(MessageLoop::TYPE_UI),
54 ui_thread_(content::BrowserThread::UI, &loop_), 54 ui_thread_(content::BrowserThread::UI, &loop_),
55 file_thread_(content::BrowserThread::FILE, &loop_) {} 55 file_thread_(content::BrowserThread::FILE, &loop_) {}
56 56
57 virtual void SetUp() OVERRIDE { 57 virtual void SetUp() OVERRIDE {
58 ASSERT_TRUE(tmp_dir_.CreateUniqueTempDir()); 58 ASSERT_TRUE(tmp_dir_.CreateUniqueTempDir());
59 EXPECT_CALL(*user_manager_.user_manager(), IsUserLoggedIn()) 59 EXPECT_CALL(*user_manager_.user_manager(), IsUserLoggedIn())
60 .WillRepeatedly(Return(true)); 60 .WillRepeatedly(Return(true));
61 user_manager_.user_manager()->SetLoggedInUser(PolicyBuilder::kFakeUsername, 61 user_manager_.user_manager()->SetLoggedInUser(PolicyBuilder::kFakeUsername);
62 false);
63 store_.reset(new UserCloudPolicyStoreChromeOS(&session_manager_client_, 62 store_.reset(new UserCloudPolicyStoreChromeOS(&session_manager_client_,
64 token_file(), 63 token_file(),
65 policy_file())); 64 policy_file()));
66 store_->AddObserver(&observer_); 65 store_->AddObserver(&observer_);
67 66
68 policy_.payload().mutable_showhomebutton()->set_showhomebutton(true); 67 policy_.payload().mutable_showhomebutton()->set_showhomebutton(true);
69 policy_.Build(); 68 policy_.Build();
70 } 69 }
71 70
72 virtual void TearDown() OVERRIDE { 71 virtual void TearDown() OVERRIDE {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 ASSERT_TRUE(store_->policy()); 317 ASSERT_TRUE(store_->policy());
319 EXPECT_EQ(expected_policy_data.SerializeAsString(), 318 EXPECT_EQ(expected_policy_data.SerializeAsString(),
320 store_->policy()->SerializeAsString()); 319 store_->policy()->SerializeAsString());
321 EXPECT_TRUE(store_->policy_map().empty()); 320 EXPECT_TRUE(store_->policy_map().empty());
322 EXPECT_EQ(CloudPolicyStore::STATUS_OK, store_->status()); 321 EXPECT_EQ(CloudPolicyStore::STATUS_OK, store_->status());
323 }; 322 };
324 323
325 } // namespace 324 } // namespace
326 325
327 } // namespace policy 326 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698