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

Unified Diff: chrome/browser/extensions/api/file_system/file_system_apitest.cc

Issue 10823157: Prettify Mac names, rewrite getDisplayPath API call to focus on $HOME (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Actually works on Mac now 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
Index: chrome/browser/extensions/api/file_system/file_system_apitest.cc
diff --git a/chrome/browser/extensions/api/file_system/file_system_apitest.cc b/chrome/browser/extensions/api/file_system/file_system_apitest.cc
index 0bc334da3a5cf8df4fe9f09d813f275b431ab32d..c478b644a0cfeb796c72f13d140fcfaebd9e3ac1 100644
--- a/chrome/browser/extensions/api/file_system/file_system_apitest.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_apitest.cc
@@ -58,6 +58,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPathPrettify) {
ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded(override,
test_root_folder_, false));
+ // TODO: this should be the ..._prettify_home test.
FilePath test_file = test_root_folder_.AppendASCII("gold.txt");
FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -66,6 +67,35 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPathPrettify) {
}
#endif
+#if defined(OS_MACOSX)
+IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
+ FileSystemApiGetDisplayPathPrettifyMac) {
+ ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded(base::DIR_DESKTOP,
+ test_root_folder_, false));
+
+ // TODO: The displayName of this folder is going to be "file_system", because it's not a real user-relevant folder to OS X.
+
+ FilePath test_file = test_root_folder_.AppendASCII("gold.txt");
+ FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest(
+ &test_file);
+ ASSERT_TRUE(RunPlatformAppTest(
+ "api_test/file_system/get_display_path_prettify_mac")) << message_;
+
+ // TODO: I don't think the test code likes creating filesystems outside the test folders. :(
+#if 0
+ FilePath test_file;
+ ASSERT_TRUE(PathService::Get(base::DIR_DOCUMENTS, &test_file));
+ test_file = test_file.AppendASCII("gold.txt");
+
+ // TODO: this should be the generic test, we just confirm that it's a relative path.
+ FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest(
+ &test_file);
+ ASSERT_TRUE(RunPlatformAppTest(
+ "api_test/file_system/get_display_path_prettify_mac")) << "could not run STUFF";
+#endif
+}
+#endif
+
IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiOpenExistingFileTest) {
FilePath test_file = TempFilePath("open_existing.txt", true);
ASSERT_FALSE(test_file.empty());

Powered by Google App Engine
This is Rietveld 408576698