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

Unified Diff: chrome/common/chrome_paths_unittest.cc

Issue 10539153: Do not show the EULA if it has already been accepted by the user in another user data dir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DIR_ALT_USER_DATA is windows only Created 8 years, 6 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/common/chrome_paths_internal.h ('k') | chrome/common/chrome_paths_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_paths_unittest.cc
diff --git a/chrome/common/chrome_paths_unittest.cc b/chrome/common/chrome_paths_unittest.cc
index 23bc7d439a84e3e70d619e9433ee0f425c707a98..820e95baf50d53371948b0f91247134fe0055c6e 100644
--- a/chrome/common/chrome_paths_unittest.cc
+++ b/chrome/common/chrome_paths_unittest.cc
@@ -9,6 +9,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/path_service.h"
+#include "chrome/common/chrome_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
// Test the behavior of chrome::GetUserCacheDirectory.
@@ -42,3 +43,22 @@ TEST(ChromePaths, UserCacheDir) {
chrome::GetUserCacheDirectory(test_profile_dir, &cache_dir);
EXPECT_EQ(test_profile_dir.value(), cache_dir.value());
}
+
+#if defined(OS_WINDOWS)
+TEST(ChromePaths, AlternateUserDataDir) {
+ FilePath current_dir;
+ FilePath alternate_dir;
+
+ ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, current_dir));
+
+ // Check that we can get the alternate dir.
+ EXPECT_TRUE(PathService::Get(chrome::DIR_ALT_USER_DATA, alternate_dir));
+
+ // And that it's not the same as the current dir.
+ EXPECTE_NE(current_dir.value(), alternate_dir.value());
+
+ // And that it's the metro dir.
+ EXPECT_EQ(FilePath::StringType(kMetroChromeUserDataSubDir),
+ alternate_dir.DirName().BaseName().value());
+}
+#endif
« no previous file with comments | « chrome/common/chrome_paths_internal.h ('k') | chrome/common/chrome_paths_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698