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

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

Issue 2318023002: //chrome/browser/chromeos: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Address comment and also remove non-trivial cases Created 4 years, 3 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
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/chromeos/policy/user_cloud_policy_store_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 EXPECT_TRUE(store_->policy_map().empty()); 197 EXPECT_TRUE(store_->policy_map().empty());
198 EXPECT_EQ(CloudPolicyStore::STATUS_VALIDATION_ERROR, store_->status()); 198 EXPECT_EQ(CloudPolicyStore::STATUS_VALIDATION_ERROR, store_->status());
199 } 199 }
200 200
201 void RunUntilIdle() { 201 void RunUntilIdle() {
202 loop_.RunUntilIdle(); 202 loop_.RunUntilIdle();
203 loop_.RunUntilIdle(); 203 loop_.RunUntilIdle();
204 } 204 }
205 205
206 base::FilePath user_policy_dir() { 206 base::FilePath user_policy_dir() {
207 return tmp_dir_.path().AppendASCII("var_run_user_policy"); 207 return tmp_dir_.GetPath().AppendASCII("var_run_user_policy");
208 } 208 }
209 209
210 base::FilePath user_policy_key_file() { 210 base::FilePath user_policy_key_file() {
211 return user_policy_dir().AppendASCII(kSanitizedUsername) 211 return user_policy_dir().AppendASCII(kSanitizedUsername)
212 .AppendASCII("policy.pub"); 212 .AppendASCII("policy.pub");
213 } 213 }
214 214
215 base::FilePath token_file() { 215 base::FilePath token_file() {
216 return tmp_dir_.path().AppendASCII("token"); 216 return tmp_dir_.GetPath().AppendASCII("token");
217 } 217 }
218 218
219 base::FilePath policy_file() { 219 base::FilePath policy_file() {
220 return tmp_dir_.path().AppendASCII("policy"); 220 return tmp_dir_.GetPath().AppendASCII("policy");
221 } 221 }
222 222
223 base::MessageLoopForUI loop_; 223 base::MessageLoopForUI loop_;
224 chromeos::MockCryptohomeClient cryptohome_client_; 224 chromeos::MockCryptohomeClient cryptohome_client_;
225 chromeos::MockSessionManagerClient session_manager_client_; 225 chromeos::MockSessionManagerClient session_manager_client_;
226 UserPolicyBuilder policy_; 226 UserPolicyBuilder policy_;
227 MockCloudPolicyStoreObserver observer_; 227 MockCloudPolicyStoreObserver observer_;
228 std::unique_ptr<UserCloudPolicyStoreChromeOS> store_; 228 std::unique_ptr<UserCloudPolicyStoreChromeOS> store_;
229 const AccountId account_id_ = 229 const AccountId account_id_ =
230 AccountId::FromUserEmail(PolicyBuilder::kFakeUsername); 230 AccountId::FromUserEmail(PolicyBuilder::kFakeUsername);
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 Mock::VerifyAndClearExpectations(&cryptohome_client_); 666 Mock::VerifyAndClearExpectations(&cryptohome_client_);
667 667
668 EXPECT_FALSE(store_->policy()); 668 EXPECT_FALSE(store_->policy());
669 EXPECT_TRUE(store_->policy_map().empty()); 669 EXPECT_TRUE(store_->policy_map().empty());
670 EXPECT_EQ(CloudPolicyStore::STATUS_VALIDATION_ERROR, store_->status()); 670 EXPECT_EQ(CloudPolicyStore::STATUS_VALIDATION_ERROR, store_->status());
671 } 671 }
672 672
673 } // namespace 673 } // namespace
674 674
675 } // namespace policy 675 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/extension_cache_unittest.cc ('k') | chrome/browser/chromeos/policy/user_policy_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698