OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 "base/logging.h" | 5 #include "base/logging.h" |
6 #include "base/win/registry.h" | 6 #include "base/win/registry.h" |
7 #include "chrome/installer/util/google_update_constants.h" | 7 #include "chrome/installer/util/google_update_constants.h" |
8 #include "chrome/installer/util/package_properties.h" | 8 #include "chrome/installer/util/package_properties.h" |
9 #include "chrome/installer/util/product_unittest.h" | 9 #include "chrome/installer/util/product_unittest.h" |
10 #include "chrome/installer/util/util_constants.h" | 10 #include "chrome/installer/util/util_constants.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 ChromiumPackageProperties chromium_props; | 25 ChromiumPackageProperties chromium_props; |
26 PackageProperties* props[] = { &chrome_props, &chromium_props }; | 26 PackageProperties* props[] = { &chrome_props, &chromium_props }; |
27 for (size_t i = 0; i < arraysize(props); ++i) { | 27 for (size_t i = 0; i < arraysize(props); ++i) { |
28 std::wstring state_key(props[i]->GetStateKey()); | 28 std::wstring state_key(props[i]->GetStateKey()); |
29 EXPECT_FALSE(state_key.empty()); | 29 EXPECT_FALSE(state_key.empty()); |
30 std::wstring version_key(props[i]->GetVersionKey()); | 30 std::wstring version_key(props[i]->GetVersionKey()); |
31 EXPECT_FALSE(version_key.empty()); | 31 EXPECT_FALSE(version_key.empty()); |
32 if (!props[i]->ReceivesUpdates()) { | 32 if (!props[i]->ReceivesUpdates()) { |
33 TempRegKeyOverride override(HKEY_CURRENT_USER, L"props"); | 33 TempRegKeyOverride override(HKEY_CURRENT_USER, L"props"); |
34 RegKey key; | 34 RegKey key; |
35 EXPECT_TRUE(key.Create(HKEY_CURRENT_USER, state_key.c_str(), | 35 EXPECT_EQ(ERROR_SUCCESS, |
36 KEY_ALL_ACCESS)); | 36 key.Create(HKEY_CURRENT_USER, state_key.c_str(), KEY_ALL_ACCESS)); |
37 } | 37 } |
38 TempRegKeyOverride::DeleteAllTempKeys(); | 38 TempRegKeyOverride::DeleteAllTempKeys(); |
39 } | 39 } |
40 } | 40 } |
OLD | NEW |