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

Unified Diff: chrome/installer/util/install_util_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/install_util.cc ('k') | chrome/installer/util/registry_key_backup.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/install_util_unittest.cc
diff --git a/chrome/installer/util/install_util_unittest.cc b/chrome/installer/util/install_util_unittest.cc
index f1234b8c10e7f72a2a875a2c98ae71cd5600b195..42a83f718784d51ce2390aa1de57921100c40669 100644
--- a/chrome/installer/util/install_util_unittest.cc
+++ b/chrome/installer/util/install_util_unittest.cc
@@ -13,6 +13,7 @@
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/product_unittest.h"
+#include "chrome/installer/util/work_item.h"
#include "testing/gmock/include/gmock/gmock.h"
using base::win::RegKey;
@@ -194,8 +195,9 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
KEY_QUERY_VALUE).Valid());
EXPECT_EQ(InstallUtil::NOT_FOUND,
InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
- child_key_path, value_name,
- pred));
+ child_key_path,
+ WorkItem::kWow64Default,
+ value_name, pred));
EXPECT_FALSE(RegKey(root, parent_key_path.c_str(),
KEY_QUERY_VALUE).Valid());
}
@@ -208,8 +210,9 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
ASSERT_TRUE(RegKey(root, parent_key_path.c_str(), KEY_SET_VALUE).Valid());
EXPECT_EQ(InstallUtil::NOT_FOUND,
InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
- child_key_path, value_name,
- pred));
+ child_key_path,
+ WorkItem::kWow64Default,
+ value_name, pred));
EXPECT_TRUE(RegKey(root, parent_key_path.c_str(),
KEY_QUERY_VALUE).Valid());
}
@@ -222,8 +225,9 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
ASSERT_TRUE(RegKey(root, child_key_path.c_str(), KEY_SET_VALUE).Valid());
EXPECT_EQ(InstallUtil::NOT_FOUND,
InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
- child_key_path, value_name,
- pred));
+ child_key_path,
+ WorkItem::kWow64Default,
+ value_name, pred));
EXPECT_TRUE(RegKey(root, parent_key_path.c_str(),
KEY_QUERY_VALUE).Valid());
}
@@ -238,8 +242,9 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
KEY_SET_VALUE).WriteValue(value_name, L"foosball!"));
EXPECT_EQ(InstallUtil::NOT_FOUND,
InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
- child_key_path, value_name,
- pred));
+ child_key_path,
+ WorkItem::kWow64Default,
+ value_name, pred));
EXPECT_TRUE(RegKey(root, parent_key_path.c_str(),
KEY_QUERY_VALUE).Valid());
}
@@ -254,8 +259,9 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
KEY_SET_VALUE).WriteValue(value_name, value));
EXPECT_EQ(InstallUtil::DELETED,
InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
- child_key_path, value_name,
- pred));
+ child_key_path,
+ WorkItem::kWow64Default,
+ value_name, pred));
EXPECT_FALSE(RegKey(root, parent_key_path.c_str(),
KEY_QUERY_VALUE).Valid());
}
@@ -270,8 +276,9 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
KEY_SET_VALUE).WriteValue(NULL, value));
EXPECT_EQ(InstallUtil::DELETED,
InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
- child_key_path, NULL,
- pred));
+ child_key_path,
+ WorkItem::kWow64Default,
+ NULL, pred));
EXPECT_FALSE(RegKey(root, parent_key_path.c_str(),
KEY_QUERY_VALUE).Valid());
}
@@ -295,6 +302,7 @@ TEST_F(InstallUtilTest, DeleteRegistryValueIf) {
ASSERT_FALSE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
EXPECT_EQ(InstallUtil::NOT_FOUND,
InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(),
+ WorkItem::kWow64Default,
value_name, pred));
EXPECT_FALSE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
}
@@ -307,6 +315,7 @@ TEST_F(InstallUtilTest, DeleteRegistryValueIf) {
ASSERT_TRUE(RegKey(root, key_path.c_str(), KEY_SET_VALUE).Valid());
EXPECT_EQ(InstallUtil::NOT_FOUND,
InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(),
+ WorkItem::kWow64Default,
value_name, pred));
EXPECT_TRUE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
}
@@ -321,6 +330,7 @@ TEST_F(InstallUtilTest, DeleteRegistryValueIf) {
KEY_SET_VALUE).WriteValue(value_name, L"foosball!"));
EXPECT_EQ(InstallUtil::NOT_FOUND,
InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(),
+ WorkItem::kWow64Default,
value_name, pred));
EXPECT_TRUE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
EXPECT_TRUE(RegKey(root, key_path.c_str(),
@@ -337,6 +347,7 @@ TEST_F(InstallUtilTest, DeleteRegistryValueIf) {
KEY_SET_VALUE).WriteValue(value_name, value));
EXPECT_EQ(InstallUtil::DELETED,
InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(),
+ WorkItem::kWow64Default,
value_name, pred));
EXPECT_TRUE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
EXPECT_FALSE(RegKey(root, key_path.c_str(),
@@ -356,7 +367,8 @@ TEST_F(InstallUtilTest, DeleteRegistryValueIf) {
RegKey(root, key_path.c_str(),
KEY_SET_VALUE).WriteValue(L"", value));
EXPECT_EQ(InstallUtil::DELETED,
- InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(), L"",
+ InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(),
+ WorkItem::kWow64Default, L"",
pred));
EXPECT_TRUE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
EXPECT_FALSE(RegKey(root, key_path.c_str(),
@@ -377,6 +389,7 @@ TEST_F(InstallUtilTest, DeleteRegistryValueIf) {
KEY_SET_VALUE).WriteValue(L"", value));
EXPECT_EQ(InstallUtil::DELETED,
InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(),
+ WorkItem::kWow64Default,
NULL, pred));
EXPECT_TRUE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
EXPECT_FALSE(RegKey(root, key_path.c_str(),
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/registry_key_backup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698