| 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..b18c5b76071d6a3bca0c17d16c9c0c675300c1fd 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;
|
| @@ -195,7 +196,8 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
|
| EXPECT_EQ(InstallUtil::NOT_FOUND,
|
| InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
|
| child_key_path, value_name,
|
| - pred));
|
| + pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_FALSE(RegKey(root, parent_key_path.c_str(),
|
| KEY_QUERY_VALUE).Valid());
|
| }
|
| @@ -209,7 +211,8 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
|
| EXPECT_EQ(InstallUtil::NOT_FOUND,
|
| InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
|
| child_key_path, value_name,
|
| - pred));
|
| + pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_TRUE(RegKey(root, parent_key_path.c_str(),
|
| KEY_QUERY_VALUE).Valid());
|
| }
|
| @@ -223,7 +226,8 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
|
| EXPECT_EQ(InstallUtil::NOT_FOUND,
|
| InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
|
| child_key_path, value_name,
|
| - pred));
|
| + pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_TRUE(RegKey(root, parent_key_path.c_str(),
|
| KEY_QUERY_VALUE).Valid());
|
| }
|
| @@ -239,7 +243,8 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
|
| EXPECT_EQ(InstallUtil::NOT_FOUND,
|
| InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
|
| child_key_path, value_name,
|
| - pred));
|
| + pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_TRUE(RegKey(root, parent_key_path.c_str(),
|
| KEY_QUERY_VALUE).Valid());
|
| }
|
| @@ -255,7 +260,8 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
|
| EXPECT_EQ(InstallUtil::DELETED,
|
| InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
|
| child_key_path, value_name,
|
| - pred));
|
| + pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_FALSE(RegKey(root, parent_key_path.c_str(),
|
| KEY_QUERY_VALUE).Valid());
|
| }
|
| @@ -271,7 +277,8 @@ TEST_F(InstallUtilTest, DeleteRegistryKeyIf) {
|
| EXPECT_EQ(InstallUtil::DELETED,
|
| InstallUtil::DeleteRegistryKeyIf(root, parent_key_path,
|
| child_key_path, NULL,
|
| - pred));
|
| + pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_FALSE(RegKey(root, parent_key_path.c_str(),
|
| KEY_QUERY_VALUE).Valid());
|
| }
|
| @@ -295,7 +302,8 @@ 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(),
|
| - value_name, pred));
|
| + value_name, pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_FALSE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
|
| }
|
|
|
| @@ -307,7 +315,8 @@ 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(),
|
| - value_name, pred));
|
| + value_name, pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_TRUE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
|
| }
|
|
|
| @@ -321,7 +330,8 @@ TEST_F(InstallUtilTest, DeleteRegistryValueIf) {
|
| KEY_SET_VALUE).WriteValue(value_name, L"foosball!"));
|
| EXPECT_EQ(InstallUtil::NOT_FOUND,
|
| InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(),
|
| - value_name, pred));
|
| + value_name, pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_TRUE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
|
| EXPECT_TRUE(RegKey(root, key_path.c_str(),
|
| KEY_QUERY_VALUE).HasValue(value_name));
|
| @@ -337,7 +347,8 @@ TEST_F(InstallUtilTest, DeleteRegistryValueIf) {
|
| KEY_SET_VALUE).WriteValue(value_name, value));
|
| EXPECT_EQ(InstallUtil::DELETED,
|
| InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(),
|
| - value_name, pred));
|
| + value_name, pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_TRUE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
|
| EXPECT_FALSE(RegKey(root, key_path.c_str(),
|
| KEY_QUERY_VALUE).HasValue(value_name));
|
| @@ -357,7 +368,8 @@ TEST_F(InstallUtilTest, DeleteRegistryValueIf) {
|
| KEY_SET_VALUE).WriteValue(L"", value));
|
| EXPECT_EQ(InstallUtil::DELETED,
|
| InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(), L"",
|
| - pred));
|
| + pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_TRUE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
|
| EXPECT_FALSE(RegKey(root, key_path.c_str(),
|
| KEY_QUERY_VALUE).HasValue(L""));
|
| @@ -377,7 +389,8 @@ TEST_F(InstallUtilTest, DeleteRegistryValueIf) {
|
| KEY_SET_VALUE).WriteValue(L"", value));
|
| EXPECT_EQ(InstallUtil::DELETED,
|
| InstallUtil::DeleteRegistryValueIf(root, key_path.c_str(),
|
| - NULL, pred));
|
| + NULL, pred,
|
| + WorkItem::kWow64Default));
|
| EXPECT_TRUE(RegKey(root, key_path.c_str(), KEY_QUERY_VALUE).Valid());
|
| EXPECT_FALSE(RegKey(root, key_path.c_str(),
|
| KEY_QUERY_VALUE).HasValue(L""));
|
|
|