summaryrefslogtreecommitdiffstats
path: root/chrome/common/chrome_paths_unittest.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-23 22:39:30 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-23 22:39:30 +0000
commitd8a80d6e6d787b0f924e54993fd3bb700ea220fb (patch)
tree73cd31322e244b11fca6e3ffebf76c5eae054ae5 /chrome/common/chrome_paths_unittest.cc
parentbbee17e594c08a4baf9379cdb22b4961a113434f (diff)
downloadchromium_src-d8a80d6e6d787b0f924e54993fd3bb700ea220fb.zip
chromium_src-d8a80d6e6d787b0f924e54993fd3bb700ea220fb.tar.gz
chromium_src-d8a80d6e6d787b0f924e54993fd3bb700ea220fb.tar.bz2
Revert "chrome_paths: refactor and sanitize cache directory handling"
This reverts commit r67160, test failures. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67171 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths_unittest.cc')
-rw-r--r--chrome/common/chrome_paths_unittest.cc44
1 files changed, 0 insertions, 44 deletions
diff --git a/chrome/common/chrome_paths_unittest.cc b/chrome/common/chrome_paths_unittest.cc
deleted file mode 100644
index 23bc7d4..0000000
--- a/chrome/common/chrome_paths_unittest.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2010 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.
-
-#include "chrome/common/chrome_paths_internal.h"
-
-#include <stdlib.h>
-
-#include "base/file_path.h"
-#include "base/file_util.h"
-#include "base/path_service.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-// Test the behavior of chrome::GetUserCacheDirectory.
-// See that function's comments for discussion of the subtleties.
-TEST(ChromePaths, UserCacheDir) {
- FilePath test_profile_dir, cache_dir;
-#if defined(OS_MACOSX)
- ASSERT_TRUE(PathService::Get(base::DIR_APP_DATA, &test_profile_dir));
- test_profile_dir = test_profile_dir.Append("foobar");
- FilePath expected_cache_dir;
- ASSERT_TRUE(PathService::Get(base::DIR_CACHE, &expected_cache_dir));
- expected_cache_dir = expected_cache_dir.Append("foobar");
-#elif(OS_POSIX)
- FilePath homedir = file_util::GetHomeDir();
- // Note: we assume XDG_CACHE_HOME/XDG_CONFIG_HOME are at their
- // default settings.
- test_profile_dir = homedir.Append(".config/foobar");
- FilePath expected_cache_dir = homedir.Append(".cache/foobar");
-#endif
-
- // Verify that a profile in the special platform-specific source
- // location ends up in the special target location.
-#if !defined(OS_WIN) // No special behavior on Windows.
- chrome::GetUserCacheDirectory(test_profile_dir, &cache_dir);
- EXPECT_EQ(expected_cache_dir.value(), cache_dir.value());
-#endif
-
- // Verify that a profile in some other random directory doesn't use
- // the special cache dir.
- test_profile_dir = FilePath(FILE_PATH_LITERAL("/some/other/path"));
- chrome::GetUserCacheDirectory(test_profile_dir, &cache_dir);
- EXPECT_EQ(test_profile_dir.value(), cache_dir.value());
-}