summaryrefslogtreecommitdiffstats
path: root/chrome/common/chrome_paths_unittest.cc
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-16 03:45:24 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-16 03:45:24 +0000
commitf8ec0d584c9b476d7dcb919e769a9e66fc666e62 (patch)
tree8bb1120ea4a735f6c382a43d78e1c02e0e63ce7e /chrome/common/chrome_paths_unittest.cc
parentcf9e57411d02f9328328ea4f4ec81741076891bc (diff)
downloadchromium_src-f8ec0d584c9b476d7dcb919e769a9e66fc666e62.zip
chromium_src-f8ec0d584c9b476d7dcb919e769a9e66fc666e62.tar.gz
chromium_src-f8ec0d584c9b476d7dcb919e769a9e66fc666e62.tar.bz2
Do not show the EULA if it has already been accepted by the user in another user data dir.
BUG=131033 TEST=install system-level chrome with require_eula in master prefs and eulaaccepted=0 in the ClientState key. nuke all user data dirs (including the metro one). now launch desktop chrome and accept the eula. make chrome the default browser and launch into metro. notice that it works. Review URL: https://chromiumcodereview.appspot.com/10539153 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142576 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths_unittest.cc')
-rw-r--r--chrome/common/chrome_paths_unittest.cc22
1 files changed, 21 insertions, 1 deletions
diff --git a/chrome/common/chrome_paths_unittest.cc b/chrome/common/chrome_paths_unittest.cc
index 23bc7d4..98f9882 100644
--- a/chrome/common/chrome_paths_unittest.cc
+++ b/chrome/common/chrome_paths_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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