Index: chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc |
diff --git a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc |
index 8054334d07b916a1589ab95d4719f088bb4da34f..cd08963d72fa9457bba9176b1f889ead1a1c0240 100644 |
--- a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc |
+++ b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc |
@@ -28,6 +28,7 @@ |
#include "content/public/test/test_utils.h" |
#include "ui/base/dialogs/select_file_dialog.h" |
#include "ui/base/dialogs/selected_file_info.h" |
+#include "webkit/fileapi/external_mount_points.h" |
#include "webkit/fileapi/file_system_context.h" |
#include "webkit/fileapi/file_system_mount_point_provider.h" |
@@ -119,7 +120,12 @@ class SelectFileDialogExtensionBrowserTest : public ExtensionBrowserTest { |
fileapi::ExternalFileSystemMountPointProvider* provider = |
BrowserContext::GetDefaultStoragePartition(browser()->profile())-> |
GetFileSystemContext()->external_provider(); |
- provider->AddLocalMountPoint(path); |
+ |
+ // The Downloads mount point already exists so it must be removed before |
+ // adding the test mount point (which will also be mapped as Downloads). |
+ fileapi::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( |
+ path.BaseName().AsUTF8Unsafe()); |
+ EXPECT_TRUE(provider->AddLocalMountPoint(path)); |
} |
void CheckJavascriptErrors() { |