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

Side by Side Diff: chrome/installer/setup/setup_util_unittest.cc

Issue 1271893003: Add options to write version number to registry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change DisplayVersion in Uninstall, too Created 5 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/installer/setup/setup_util_unittest.h" 5 #include "chrome/installer/setup/setup_util_unittest.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 installer::ScopedTokenPrivilege dup_scoped_privilege(kTestedPrivilege); 165 installer::ScopedTokenPrivilege dup_scoped_privilege(kTestedPrivilege);
166 ASSERT_TRUE(dup_scoped_privilege.is_enabled()); 166 ASSERT_TRUE(dup_scoped_privilege.is_enabled());
167 ASSERT_TRUE(CurrentProcessHasPrivilege(kTestedPrivilege)); 167 ASSERT_TRUE(CurrentProcessHasPrivilege(kTestedPrivilege));
168 } 168 }
169 ASSERT_TRUE(CurrentProcessHasPrivilege(kTestedPrivilege)); 169 ASSERT_TRUE(CurrentProcessHasPrivilege(kTestedPrivilege));
170 } 170 }
171 171
172 ASSERT_FALSE(CurrentProcessHasPrivilege(kTestedPrivilege)); 172 ASSERT_FALSE(CurrentProcessHasPrivilege(kTestedPrivilege));
173 } 173 }
174 174
175 TEST(SetupUtilTest, GuidToSquid) {
176 ASSERT_EQ(installer::GuidToSquid("EDA620E3-AA98-3846-B81E-3493CB2E0E02"),
177 "3E026ADE89AA64838BE14339BCE2E020");
178 }
179
175 const char kAdjustProcessPriority[] = "adjust-process-priority"; 180 const char kAdjustProcessPriority[] = "adjust-process-priority";
176 181
177 PriorityClassChangeResult DoProcessPriorityAdjustment() { 182 PriorityClassChangeResult DoProcessPriorityAdjustment() {
178 return installer::AdjustProcessPriority() ? PCCR_CHANGED : PCCR_UNCHANGED; 183 return installer::AdjustProcessPriority() ? PCCR_CHANGED : PCCR_UNCHANGED;
179 } 184 }
180 185
181 namespace { 186 namespace {
182 187
183 // A scoper that sets/resets the current process's priority class. 188 // A scoper that sets/resets the current process's priority class.
184 class ScopedPriorityClass { 189 class ScopedPriorityClass {
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 } 629 }
625 630
626 // Ensure that all values are absent. 631 // Ensure that all values are absent.
627 { 632 {
628 base::win::RegistryValueIterator it(root_, path_.c_str()); 633 base::win::RegistryValueIterator it(root_, path_.c_str());
629 ASSERT_EQ(0, it.ValueCount()); 634 ASSERT_EQ(0, it.ValueCount());
630 } 635 }
631 } 636 }
632 637
633 } // namespace installer 638 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698