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

Unified Diff: base/path_service_unittest.cc

Issue 10958009: Revert 157667 - Add new PathService paths for Windows' All Users Desktop and Quick Launch folders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | « base/path_service.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/path_service_unittest.cc
===================================================================
--- base/path_service_unittest.cc (revision 157679)
+++ base/path_service_unittest.cc (working copy)
@@ -8,15 +8,13 @@
#include "base/file_util.h"
#include "base/file_path.h"
#include "base/scoped_temp_dir.h"
-#include "build/build_config.h"
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gtest/include/gtest/gtest-spi.h"
#include "testing/platform_test.h"
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
-
namespace {
// Returns true if PathService::Get returns true and sets the path parameter
@@ -28,15 +26,9 @@
// If chromium has never been started on this account, the cache path may not
// exist.
if (dir_type == base::DIR_CACHE)
- return result && !path.empty();
+ return result && !path.value().empty();
#endif
-#if defined(OS_LINUX)
- // On the linux try-bots: a path is returned (e.g. /home/chrome-bot/Desktop),
- // but it doesn't exist.
- if (dir_type == base::DIR_USER_DESKTOP)
- return result && !path.empty();
-#endif
- return result && !path.empty() && file_util::PathExists(path);
+ return result && !path.value().empty() && file_util::PathExists(path);
}
#if defined(OS_WIN)
@@ -61,10 +53,10 @@
// later changes to Get broke the semantics of the function and yielded the
// correct value while returning false.)
TEST_F(PathServiceTest, Get) {
- for (int key = base::PATH_START + 1; key < base::PATH_END; ++key) {
+ for (int key = base::DIR_CURRENT; key < base::PATH_END; ++key) {
#if defined(OS_ANDROID)
- if (key == base::FILE_MODULE || key == base::DIR_USER_DESKTOP)
- continue; // Android doesn't implement FILE_MODULE and DIR_USER_DESKTOP;
+ if (key == base::FILE_MODULE)
+ continue; // Android doesn't implement FILE_MODULE;
#endif
EXPECT_PRED1(ReturnsValidPath, key);
}
@@ -91,18 +83,8 @@
}
#elif defined(OS_MACOSX)
for (int key = base::PATH_MAC_START + 1; key < base::PATH_MAC_END; ++key) {
- EXPECT_PRED1(ReturnsValidPath, key);
+ EXPECT_PRED1(ReturnsValidPath, key);
}
-#elif defined(OS_ANDROID)
- for (int key = base::PATH_ANDROID_START + 1; key < base::PATH_ANDROID_END;
- ++key) {
- EXPECT_PRED1(ReturnsValidPath, key);
- }
-#elif defined(OS_POSIX)
- for (int key = base::PATH_POSIX_START + 1; key < base::PATH_POSIX_END;
- ++key) {
- EXPECT_PRED1(ReturnsValidPath, key);
- }
#endif
}
« no previous file with comments | « base/path_service.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698