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

Side by Side Diff: chrome/install_static/user_data_dir_win_unittest.cc

Issue 2459583002: Use InstallDetails in setup. (Closed)
Patch Set: another doc comment Created 3 years, 10 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
« no previous file with comments | « chrome/install_static/install_util_unittest.cc ('k') | chrome/installer/setup/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/test/test_reg_util_win.h" 7 #include "base/test/test_reg_util_win.h"
8 #include "chrome/install_static/install_details.h" 8 #include "chrome/install_static/install_details.h"
9 #include "chrome/install_static/user_data_dir.h" 9 #include "chrome/install_static/user_data_dir.h"
10 #include "chrome_elf/nt_registry/nt_registry.h" 10 #include "chrome_elf/nt_registry/nt_registry.h"
(...skipping 11 matching lines...) Expand all
22 #if defined(GOOGLE_CHROME_BUILD) 22 #if defined(GOOGLE_CHROME_BUILD)
23 const wchar_t kPolicyRegistryKey[] = L"SOFTWARE\\Policies\\Google\\Chrome"; 23 const wchar_t kPolicyRegistryKey[] = L"SOFTWARE\\Policies\\Google\\Chrome";
24 const wchar_t kUserDataDirNameSuffix[] = L"\\Google\\Chrome\\User Data"; 24 const wchar_t kUserDataDirNameSuffix[] = L"\\Google\\Chrome\\User Data";
25 #else 25 #else
26 const wchar_t kPolicyRegistryKey[] = L"SOFTWARE\\Policies\\Chromium"; 26 const wchar_t kPolicyRegistryKey[] = L"SOFTWARE\\Policies\\Chromium";
27 const wchar_t kUserDataDirNameSuffix[] = L"\\Chromium\\User Data"; 27 const wchar_t kUserDataDirNameSuffix[] = L"\\Chromium\\User Data";
28 #endif 28 #endif
29 29
30 const wchar_t kUserDataDirRegistryKey[] = L"UserDataDir"; 30 const wchar_t kUserDataDirRegistryKey[] = L"UserDataDir";
31 31
32 const InstallConstants kFakeInstallConstants = {sizeof(InstallConstants), 0, 32 const InstallConstants kFakeInstallConstants = {
33 L""}; 33 sizeof(InstallConstants), 0, "", L"", L"", L"", L""};
34 34
35 class ScopedNTRegistryTestingOverride { 35 class ScopedNTRegistryTestingOverride {
36 public: 36 public:
37 ScopedNTRegistryTestingOverride(nt::ROOT_KEY root, const std::wstring& path) 37 ScopedNTRegistryTestingOverride(nt::ROOT_KEY root, const std::wstring& path)
38 : root_(root) { 38 : root_(root) {
39 EXPECT_TRUE(nt::SetTestingOverride(root_, path)); 39 EXPECT_TRUE(nt::SetTestingOverride(root_, path));
40 } 40 }
41 ~ScopedNTRegistryTestingOverride() { 41 ~ScopedNTRegistryTestingOverride() {
42 nt::SetTestingOverride(root_, base::string16()); 42 nt::SetTestingOverride(root_, base::string16());
43 } 43 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 EXPECT_EQ(std::wstring::npos, result.find(L"${windows}")); 156 EXPECT_EQ(std::wstring::npos, result.find(L"${windows}"));
157 std::wstring upper; 157 std::wstring upper;
158 std::transform(result.begin(), result.end(), std::back_inserter(upper), 158 std::transform(result.begin(), result.end(), std::back_inserter(upper),
159 toupper); 159 toupper);
160 EXPECT_TRUE(EndsWith(upper, L"\\WINDOWS")); 160 EXPECT_TRUE(EndsWith(upper, L"\\WINDOWS"));
161 EXPECT_EQ(std::wstring(), invalid); 161 EXPECT_EQ(std::wstring(), invalid);
162 } 162 }
163 163
164 } // namespace 164 } // namespace
165 } // namespace install_static 165 } // namespace install_static
OLDNEW
« no previous file with comments | « chrome/install_static/install_util_unittest.cc ('k') | chrome/installer/setup/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698