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

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

Issue 15896035: File system API: whitelist the Downloads dir on Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Sam's comments. Confirmed test passing on chromeos. Created 7 years, 7 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 | « chrome/browser/extensions/api/file_system/file_system_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eecb9301a3b640348ecfa25bf6fbde1c4dcc1cc6..e6a9b07202f9c65ebb682e8a20ff37be47671bac 100644
--- a/chrome/browser/extensions/api/file_system/file_system_apitest.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_apitest.cc
@@ -454,6 +454,24 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
"api_test/file_system/open_writable_existing_non_writable")) << message_;
}
+#if defined(OS_CHROMEOS)
+// In Chrome OS the download directory is whitelisted for write.
+IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
+ FileSystemApiOpenInDownloadDirForWrite) {
+ base::FilePath test_file =
+ base::MakeAbsoluteFilePath(TempFilePath("writable.txt", true));
+ ASSERT_FALSE(test_file.empty());
+ ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded(
+ chrome::DIR_USER_DATA, test_file.DirName(), false));
+ ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded(
+ chrome::DIR_DEFAULT_DOWNLOADS_SAFE, test_file.DirName(), false));
+ FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
+ &test_file);
+ ASSERT_TRUE(RunPlatformAppTest(
+ "api_test/file_system/is_writable_file_entry")) << message_;
+}
+#endif
+
IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
FileSystemApiOpenInChromeDirForWrite) {
base::FilePath test_file =
« 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