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

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_apitest.cc

Issue 10700136: Prettify output from chrome.fileSystem.getDisplayPath for POSIX profile directories (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Includes specific fix for Mac OS X, which was excluded from the posix code specifically Created 8 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/extensions/api/file_system/file_system_api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "chrome/browser/extensions/api/file_system/file_system_api.h" 7 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
8 #include "chrome/browser/extensions/platform_app_browsertest_util.h" 8 #include "chrome/browser/extensions/platform_app_browsertest_util.h"
9 9
10 using extensions::FileSystemChooseFileFunction; 10 using extensions::FileSystemChooseFileFunction;
(...skipping 30 matching lines...) Expand all
41 }; 41 };
42 42
43 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPath) { 43 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPath) {
44 FilePath test_file = test_root_folder_.AppendASCII("gold.txt"); 44 FilePath test_file = test_root_folder_.AppendASCII("gold.txt");
45 FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest( 45 FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest(
46 &test_file); 46 &test_file);
47 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/get_display_path")) 47 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/get_display_path"))
48 << message_; 48 << message_;
49 } 49 }
50 50
51 #if defined(OS_WIN) || defined(OS_POSIX)
52 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPathPrettify) {
51 #if defined(OS_WIN) 53 #if defined(OS_WIN)
52 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPathPrettify) { 54 int override = base::DIR_PROFILE;
53 ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded(base::DIR_PROFILE, 55 #elif defined(OS_POSIX)
56 int override = base::DIR_HOME;
57 #endif
58 ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded(override,
54 test_root_folder_, false)); 59 test_root_folder_, false));
55 60
56 FilePath test_file = test_root_folder_.AppendASCII("gold.txt"); 61 FilePath test_file = test_root_folder_.AppendASCII("gold.txt");
57 FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest( 62 FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest(
58 &test_file); 63 &test_file);
59 ASSERT_TRUE(RunPlatformAppTest( 64 ASSERT_TRUE(RunPlatformAppTest(
60 "api_test/file_system/get_display_path_prettify")) << message_; 65 "api_test/file_system/get_display_path_prettify")) << message_;
61 } 66 }
62 #endif 67 #endif
63 68
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 195 }
191 196
192 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiIsWritableTest) { 197 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiIsWritableTest) {
193 FilePath test_file = TempFilePath("writable.txt", true); 198 FilePath test_file = TempFilePath("writable.txt", true);
194 ASSERT_FALSE(test_file.empty()); 199 ASSERT_FALSE(test_file.empty());
195 FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest( 200 FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest(
196 &test_file); 201 &test_file);
197 ASSERT_TRUE(RunPlatformAppTest( 202 ASSERT_TRUE(RunPlatformAppTest(
198 "api_test/file_system/is_writable_file_entry")) << message_; 203 "api_test/file_system/is_writable_file_entry")) << message_;
199 } 204 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/file_system/file_system_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698