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

Side by Side Diff: chrome/installer/gcapi/gcapi_reactivation_test.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 20 matching lines...) Expand all
31 L"{8A69D345-D564-463C-AFF1-A69D9E530F96}", 31 L"{8A69D345-D564-463C-AFF1-A69D9E530F96}",
32 }; 32 };
33 33
34 } 34 }
35 35
36 class GCAPIReactivationTest : public ::testing::Test { 36 class GCAPIReactivationTest : public ::testing::Test {
37 protected: 37 protected:
38 void SetUp() { 38 void SetUp() {
39 // Override keys - this is undone during destruction. 39 // Override keys - this is undone during destruction.
40 std::wstring hkcu_override = base::StringPrintf( 40 std::wstring hkcu_override = base::StringPrintf(
41 L"hkcu_override\\%ls", ASCIIToWide(base::GenerateGUID())); 41 L"hkcu_override\\%ls", base::ASCIIToWide(base::GenerateGUID()));
42 override_manager_.OverrideRegistry(HKEY_CURRENT_USER, hkcu_override); 42 override_manager_.OverrideRegistry(HKEY_CURRENT_USER, hkcu_override);
43 std::wstring hklm_override = base::StringPrintf( 43 std::wstring hklm_override = base::StringPrintf(
44 L"hklm_override\\%ls", ASCIIToWide(base::GenerateGUID())); 44 L"hklm_override\\%ls", base::ASCIIToWide(base::GenerateGUID()));
45 override_manager_.OverrideRegistry(HKEY_LOCAL_MACHINE, hklm_override); 45 override_manager_.OverrideRegistry(HKEY_LOCAL_MACHINE, hklm_override);
46 } 46 }
47 47
48 bool SetChromeInstallMarker(HKEY hive) { 48 bool SetChromeInstallMarker(HKEY hive) {
49 // Create the client state keys in the right places. 49 // Create the client state keys in the right places.
50 std::wstring reg_path(google_update::kRegPathClients); 50 std::wstring reg_path(google_update::kRegPathClients);
51 reg_path += L"\\"; 51 reg_path += L"\\";
52 reg_path += google_update::kChromeUpgradeCode; 52 reg_path += google_update::kChromeUpgradeCode;
53 RegKey client_state(hive, 53 RegKey client_state(hive,
54 reg_path.c_str(), 54 reg_path.c_str(),
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 EXPECT_TRUE(SetLastRunTime(HKEY_CURRENT_USER, 229 EXPECT_TRUE(SetLastRunTime(HKEY_CURRENT_USER,
230 hkcu_last_run.ToInternalValue())); 230 hkcu_last_run.ToInternalValue()));
231 231
232 EXPECT_TRUE(ReactivateChrome(L"GAGA", 232 EXPECT_TRUE(ReactivateChrome(L"GAGA",
233 GCAPI_INVOKED_STANDARD_SHELL, 233 GCAPI_INVOKED_STANDARD_SHELL,
234 &error)); 234 &error));
235 EXPECT_EQ(L"GAGA", GetReactivationString(HKEY_CURRENT_USER)); 235 EXPECT_EQ(L"GAGA", GetReactivationString(HKEY_CURRENT_USER));
236 236
237 EXPECT_TRUE(HasExperimentLabels(HKEY_CURRENT_USER)); 237 EXPECT_TRUE(HasExperimentLabels(HKEY_CURRENT_USER));
238 } 238 }
OLDNEW
« no previous file with comments | « chrome/installer/gcapi/gcapi_last_run_test.cc ('k') | chrome/installer/setup/chrome_frame_ready_mode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698