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

Unified Diff: chrome/installer/util/product_unittest.cc

Issue 6090006: Regkey functions return error code instead of bool (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/product.cc ('k') | chrome/installer/util/set_reg_value_work_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/product_unittest.cc
===================================================================
--- chrome/installer/util/product_unittest.cc (revision 71761)
+++ chrome/installer/util/product_unittest.cc (working copy)
@@ -53,9 +53,9 @@
DCHECK(temp_name && lstrlenW(temp_name));
std::wstring key_path(kTempTestKeyPath);
key_path += L"\\" + temp_name_;
- EXPECT_TRUE(temp_key_.Create(HKEY_CURRENT_USER, key_path.c_str(),
- KEY_ALL_ACCESS));
EXPECT_EQ(ERROR_SUCCESS,
+ temp_key_.Create(HKEY_CURRENT_USER, key_path.c_str(), KEY_ALL_ACCESS));
+ EXPECT_EQ(ERROR_SUCCESS,
::RegOverridePredefKey(override_, temp_key_.Handle()));
}
@@ -67,7 +67,7 @@
// static
void TempRegKeyOverride::DeleteAllTempKeys() {
RegKey key;
- if (key.Open(HKEY_CURRENT_USER, L"", KEY_ALL_ACCESS)) {
+ if (key.Open(HKEY_CURRENT_USER, L"", KEY_ALL_ACCESS) == ERROR_SUCCESS) {
key.DeleteKey(kTempTestKeyPath);
}
}
@@ -114,7 +114,8 @@
// Create a make-believe client state key.
RegKey key;
std::wstring state_key_path(distribution->GetStateKey());
- ASSERT_TRUE(key.Create(root, state_key_path.c_str(), KEY_ALL_ACCESS));
+ ASSERT_EQ(ERROR_SUCCESS,
+ key.Create(root, state_key_path.c_str(), KEY_ALL_ACCESS));
// Set the MSI marker, delete the objects, create new ones and verify
// that we now see the MSI marker.
« no previous file with comments | « chrome/installer/util/product.cc ('k') | chrome/installer/util/set_reg_value_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698