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

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

Issue 282363003: Add WOW64 support to the installer registry work items (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: nits. fix call to DeleteRegistryKey Created 6 years, 7 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/registry_key_backup.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/registry_key_backup_unittest.cc
diff --git a/chrome/installer/util/registry_key_backup_unittest.cc b/chrome/installer/util/registry_key_backup_unittest.cc
index db33aa4af2f7d724f922e7772dd5ad5d097ec502..32bedb4be6b072249434c6fa5aa4bb685b7b9016 100644
--- a/chrome/installer/util/registry_key_backup_unittest.cc
+++ b/chrome/installer/util/registry_key_backup_unittest.cc
@@ -33,7 +33,9 @@ class RegistryKeyBackupTest : public testing::Test {
TEST_F(RegistryKeyBackupTest, Uninitialized) {
RegistryKeyBackup backup;
- EXPECT_TRUE(backup.WriteTo(test_data_.root_key(), destination_path_.c_str()));
+ EXPECT_TRUE(backup.WriteTo(test_data_.root_key(),
+ destination_path_.c_str(),
+ WorkItem::kWow64Default));
EXPECT_FALSE(RegKey(test_data_.root_key(), destination_path_.c_str(),
KEY_READ).Valid());
}
@@ -45,8 +47,11 @@ TEST_F(RegistryKeyBackupTest, MissingKey) {
RegistryKeyBackup backup;
EXPECT_TRUE(backup.Initialize(test_data_.root_key(),
- non_existent_key_path.c_str()));
- EXPECT_TRUE(backup.WriteTo(test_data_.root_key(), destination_path_.c_str()));
+ non_existent_key_path.c_str(),
+ WorkItem::kWow64Default));
+ EXPECT_TRUE(backup.WriteTo(test_data_.root_key(),
+ destination_path_.c_str(),
+ WorkItem::kWow64Default));
EXPECT_FALSE(RegKey(test_data_.root_key(), destination_path_.c_str(),
KEY_READ).Valid());
}
@@ -56,8 +61,11 @@ TEST_F(RegistryKeyBackupTest, ReadWrite) {
RegistryKeyBackup backup;
EXPECT_TRUE(backup.Initialize(test_data_.root_key(),
- test_data_.non_empty_key_path().c_str()));
- EXPECT_TRUE(backup.WriteTo(test_data_.root_key(), destination_path_.c_str()));
+ test_data_.non_empty_key_path().c_str(),
+ WorkItem::kWow64Default));
+ EXPECT_TRUE(backup.WriteTo(test_data_.root_key(),
+ destination_path_.c_str(),
+ WorkItem::kWow64Default));
test_data_.ExpectMatchesNonEmptyKey(test_data_.root_key(),
destination_path_.c_str());
}
@@ -69,17 +77,20 @@ TEST_F(RegistryKeyBackupTest, Swap) {
RegistryKeyBackup other_backup;
EXPECT_TRUE(backup.Initialize(test_data_.root_key(),
- test_data_.non_empty_key_path().c_str()));
+ test_data_.non_empty_key_path().c_str(),
+ WorkItem::kWow64Default));
backup.swap(other_backup);
EXPECT_TRUE(other_backup.WriteTo(test_data_.root_key(),
- destination_path_.c_str()));
+ destination_path_.c_str(),
+ WorkItem::kWow64Default));
// Now make sure the one we started with is truly empty.
EXPECT_EQ(ERROR_SUCCESS,
RegKey(test_data_.root_key(), L"", KEY_QUERY_VALUE)
.DeleteKey(destination_path_.c_str()));
EXPECT_TRUE(backup.WriteTo(test_data_.root_key(),
- destination_path_.c_str()));
+ destination_path_.c_str(),
+ WorkItem::kWow64Default));
EXPECT_FALSE(RegKey(test_data_.root_key(), destination_path_.c_str(),
KEY_READ).Valid());
}
« no previous file with comments | « chrome/installer/util/registry_key_backup.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