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

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: Broke apart OS_MACOSX and other case 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
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 c50e3d4aded03be95e94043493f3eb79b92fb4e6..5d355afe0f12d999dfd4ac77d83919c0fa607f30 100644
--- a/chrome/browser/extensions/api/file_system/file_system_apitest.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_apitest.cc
@@ -66,6 +66,24 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPathPrettify) {
}
#endif
+#if defined(OS_MACOSX)
+IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
+ FileSystemApiGetDisplayPathPrettifyMac) {
+ // On Mac, "test.localized" will be localized into just "test".
+ FilePath test_path = TempFilePath("test.localized", false);
+ ASSERT_TRUE(file_util::CreateDirectory(test_path));
+
+ FilePath test_file = test_path.AppendASCII("gold.txt");
+ FilePath source = test_root_folder_.AppendASCII("gold.txt");
+ EXPECT_TRUE(file_util::CopyFile(source, test_file));
+
+ FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest(
+ &test_file);
+ ASSERT_TRUE(RunPlatformAppTest(
+ "api_test/file_system/get_display_path_prettify_mac")) << message_;
+}
+#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