Index: chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc |
=================================================================== |
--- chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc (revision 113190) |
+++ chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc (working copy) |
@@ -218,7 +218,9 @@ |
// Add tmp mount point even though this test won't use it directly. |
// We need this to make sure that at least one top-level directory exists |
// in the file browser. |
- FilePath tmp_dir("/tmp"); |
+ FilePath tmp_dir("/tmp/Downloads"); |
+ ScopedTempDir downloads_dir; |
+ ASSERT_TRUE(downloads_dir.Set(tmp_dir)); |
zel
2011/12/06 17:29:29
I suggest something like this instead:
ScopedTemp
zel
2011/12/06 17:42:02
Shorter version:
ScopedTempDir downloads_dir;
ASS
dgozman
2011/12/07 11:20:42
Done.
|
AddMountPoint(tmp_dir); |
gfx::NativeWindow owning_window = browser()->window()->GetNativeHandle(); |
@@ -244,8 +246,11 @@ |
IN_PROC_BROWSER_TEST_F(SelectFileDialogExtensionBrowserTest, |
MAYBE_SelectFileAndOpen) { |
// Allow the tmp directory to be mounted. We explicitly use /tmp because |
- // it it whitelisted for file system access on Chrome OS. |
- FilePath tmp_dir("/tmp"); |
+ // it is whitelisted for file system access on Chrome OS. |
+ // File manager looks for Downloads mount point, so use this name. |
+ FilePath tmp_dir("/tmp/Downloads"); |
sky
2011/12/06 17:23:59
You want PathService::Get(base::DIR_TEMP, &tmp_pat
dgozman
2011/12/07 11:20:42
Done.
|
+ ScopedTempDir downloads_dir; |
+ ASSERT_TRUE(downloads_dir.Set(tmp_dir)); |
AddMountPoint(tmp_dir); |
// Create a directory with a single file in it. ScopedTempDir will delete |
@@ -289,8 +294,11 @@ |
IN_PROC_BROWSER_TEST_F(SelectFileDialogExtensionBrowserTest, |
MAYBE_SelectFileAndSave) { |
// Allow the tmp directory to be mounted. We explicitly use /tmp because |
- // it it whitelisted for file system access on Chrome OS. |
- FilePath tmp_dir("/tmp"); |
+ // it is whitelisted for file system access on Chrome OS. |
+ // File manager looks for Downloads mount point, so use this name. |
+ FilePath tmp_dir("/tmp/Downloads"); |
+ ScopedTempDir downloads_dir; |
+ ASSERT_TRUE(downloads_dir.Set(tmp_dir)); |
AddMountPoint(tmp_dir); |
// Create a directory with a single file in it. ScopedTempDir will delete |
@@ -331,7 +339,9 @@ |
// Add tmp mount point even though this test won't use it directly. |
// We need this to make sure that at least one top-level directory exists |
// in the file browser. |
- FilePath tmp_dir("/tmp"); |
+ FilePath tmp_dir("/tmp/Downloads"); |
+ ScopedTempDir downloads_dir; |
+ ASSERT_TRUE(downloads_dir.Set(tmp_dir)); |
AddMountPoint(tmp_dir); |
gfx::NativeWindow owning_window = browser()->window()->GetNativeHandle(); |
@@ -365,7 +375,9 @@ |
// Add tmp mount point even though this test won't use it directly. |
// We need this to make sure that at least one top-level directory exists |
// in the file browser. |
- FilePath tmp_dir("/tmp"); |
+ FilePath tmp_dir("/tmp/Downloads"); |
+ ScopedTempDir downloads_dir; |
+ ASSERT_TRUE(downloads_dir.Set(tmp_dir)); |
AddMountPoint(tmp_dir); |
gfx::NativeWindow owning_window = browser()->window()->GetNativeHandle(); |