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

Side by Side Diff: chrome/browser/chromeos/login/signed_settings_temp_storage_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, 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/login/signed_settings_temp_storage.h" 5 #include "chrome/browser/chromeos/login/signed_settings_temp_storage.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 ref_map_["some_stuff"] = "a=35;code=64"; 24 ref_map_["some_stuff"] = "a=35;code=64";
25 ref_map_["another_stuff"] = ""; 25 ref_map_["another_stuff"] = "";
26 ref_map_["name"] = "value"; 26 ref_map_["name"] = "value";
27 ref_map_["2bc6aa16-e0ea-11df-b13d-18a90520e2e5"] = "512"; 27 ref_map_["2bc6aa16-e0ea-11df-b13d-18a90520e2e5"] = "512";
28 28
29 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 29 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
30 FilePath temp_file; 30 FilePath temp_file;
31 ASSERT_TRUE( 31 ASSERT_TRUE(
32 file_util::CreateTemporaryFileInDir(temp_dir_.path(), &temp_file)); 32 file_util::CreateTemporaryFileInDir(temp_dir_.path(), &temp_file));
33 local_state_.reset( 33 local_state_.reset(
34 PrefService::CreatePrefService(temp_file, NULL, NULL, false)); 34 PrefService::CreatePrefService(temp_file, NULL, false));
35 ASSERT_TRUE(NULL != local_state_.get()); 35 ASSERT_TRUE(NULL != local_state_.get());
36 SignedSettingsTempStorage::RegisterPrefs(local_state_.get()); 36 SignedSettingsTempStorage::RegisterPrefs(local_state_.get());
37 } 37 }
38 38
39 std::map<std::string, std::string> ref_map_; 39 std::map<std::string, std::string> ref_map_;
40 ScopedTempDir temp_dir_; 40 ScopedTempDir temp_dir_;
41 scoped_ptr<PrefService> local_state_; 41 scoped_ptr<PrefService> local_state_;
42 }; 42 };
43 43
44 TEST_F(SignedSettingsTempStorageTest, Basic) { 44 TEST_F(SignedSettingsTempStorageTest, Basic) {
(...skipping 23 matching lines...) Expand all
68 EXPECT_TRUE(SignedSettingsTempStorage::Retrieve(b_list[i]->first, &value, 68 EXPECT_TRUE(SignedSettingsTempStorage::Retrieve(b_list[i]->first, &value,
69 local_state_.get())); 69 local_state_.get()));
70 EXPECT_EQ(b_list[i]->second, value); 70 EXPECT_EQ(b_list[i]->second, value);
71 EXPECT_FALSE(SignedSettingsTempStorage::Retrieve("non-existent tv-series", 71 EXPECT_FALSE(SignedSettingsTempStorage::Retrieve("non-existent tv-series",
72 &value, 72 &value,
73 local_state_.get())); 73 local_state_.get()));
74 } 74 }
75 } 75 }
76 76
77 } // namespace chromeos 77 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/chromeos/login/user_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698