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

Side by Side Diff: chrome/installer/util/package_properties_unittest.cc

Issue 6288009: More installer refactoring in the interest of fixing some bugs and cleaning t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « chrome/installer/util/package_properties.cc ('k') | chrome/installer/util/package_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "base/win/registry.h"
7 #include "chrome/installer/util/google_update_constants.h"
8 #include "chrome/installer/util/package_properties.h"
9 #include "chrome/installer/util/product_unittest.h"
10 #include "chrome/installer/util/util_constants.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 using base::win::RegKey;
14 using installer::PackageProperties;
15 using installer::ChromePackageProperties;
16 using installer::ChromiumPackageProperties;
17
18 class PackagePropertiesTest : public testing::Test {
19 protected:
20 };
21
22 TEST_F(PackagePropertiesTest, Basic) {
23 TempRegKeyOverride::DeleteAllTempKeys();
24 ChromePackageProperties chrome_props;
25 ChromiumPackageProperties chromium_props;
26 PackageProperties* props[] = { &chrome_props, &chromium_props };
27 for (size_t i = 0; i < arraysize(props); ++i) {
28 std::wstring state_key(props[i]->GetStateKey());
29 EXPECT_FALSE(state_key.empty());
30 std::wstring version_key(props[i]->GetVersionKey());
31 EXPECT_FALSE(version_key.empty());
32 if (!props[i]->ReceivesUpdates()) {
33 TempRegKeyOverride override(HKEY_CURRENT_USER, L"props");
34 RegKey key;
35 EXPECT_EQ(ERROR_SUCCESS,
36 key.Create(HKEY_CURRENT_USER, state_key.c_str(), KEY_ALL_ACCESS));
37 }
38 TempRegKeyOverride::DeleteAllTempKeys();
39 }
40 }
OLDNEW
« no previous file with comments | « chrome/installer/util/package_properties.cc ('k') | chrome/installer/util/package_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698