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

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

Issue 10826144: Delete both regular and Metro user data dirs on uninstall. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« chrome/installer/util/helper.cc ('K') | « chrome/installer/util/product.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/product_unittest.cc
diff --git a/chrome/installer/util/product_unittest.cc b/chrome/installer/util/product_unittest.cc
index 8fa3aed9a949596e0296f1cef2c21f08c8d79987..ea49638f21f9607f338673aa9c7cc9c5417ebbb9 100644
--- a/chrome/installer/util/product_unittest.cc
+++ b/chrome/installer/util/product_unittest.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/test/test_reg_util_win.h"
#include "base/utf_string_conversions.h"
+#include "chrome/common/chrome_constants.h"
#include "chrome/installer/util/chrome_frame_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/installation_state.h"
@@ -70,10 +71,19 @@ TEST_F(ProductTest, MAYBE_ProductInstallBasic) {
BrowserDistribution* distribution = product->distribution();
EXPECT_EQ(BrowserDistribution::CHROME_BROWSER, distribution->GetType());
- FilePath user_data(product->GetUserDataPath());
- EXPECT_FALSE(user_data.empty());
+ std::vector<FilePath> user_data_paths;
+ product->GetUserDataPaths(&user_data_paths);
+ EXPECT_LE(static_cast<size_t>(1), user_data_paths.size());
gab 2012/08/03 17:54:20 In comparisons don't we usually put the constant o
grt (UTC plus 2) 2012/08/03 20:18:37 I'm following the pattern of EXPECT_EQ; see http:/
gab 2012/08/03 21:58:57 Yea I realize that, it makes sense for me to do it
+ const FilePath& user_data = user_data_paths[0];
+ EXPECT_FALSE(user_data_paths[0].empty());
EXPECT_NE(std::wstring::npos,
- user_data.value().find(installer::kInstallUserDataDir));
+ user_data_paths[0].value().find(installer::kInstallUserDataDir));
+ if (user_data_paths.size() > 1) {
+ EXPECT_FALSE(user_data_paths[1].empty());
+ EXPECT_NE(
+ std::wstring::npos,
+ user_data_paths[1].value().find(chrome::kMetroChromeUserDataSubDir));
+ }
FilePath program_files;
PathService::Get(base::DIR_PROGRAM_FILES, &program_files);
« chrome/installer/util/helper.cc ('K') | « chrome/installer/util/product.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698