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

Unified Diff: chrome/browser/extensions/extension_local_filesystem_apitest.cc

Issue 6864040: Fixed file/directory url resolution for external mount point provider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/extension_local_filesystem_apitest.cc
===================================================================
--- chrome/browser/extensions/extension_local_filesystem_apitest.cc (revision 82259)
+++ chrome/browser/extensions/extension_local_filesystem_apitest.cc (working copy)
@@ -3,14 +3,43 @@
// found in the LICENSE file.
#include "chrome/browser/extensions/extension_apitest.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser.h"
+#include "webkit/fileapi/file_system_context.h"
+#include "webkit/fileapi/file_system_mount_point_provider.h"
+#include "webkit/fileapi/file_system_path_manager.h"
#if defined(OS_CHROMEOS)
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, LocalFileSystem) {
+class FileSystemExtensionApiTest : public ExtensionApiTest {
+ public:
+ FileSystemExtensionApiTest() : test_mount_point_("/tmp") {
+ }
+
+ virtual ~FileSystemExtensionApiTest() {}
+
+ // Sets up test environment
+ void AddTmpMountPoint() {
+ // Add tmp mount point.
+ fileapi::FileSystemPathManager* path_manager =
+ browser()->profile()->GetFileSystemContext()->path_manager();
+ fileapi::ExternalFileSystemMountPointProvider* provider =
+ path_manager->external_provider();
+ provider->AddMountPoint(test_mount_point_);
+ }
+
+ private:
+ FilePath test_mount_point_;
+};
+
+IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, LocalFileSystem) {
+ AddTmpMountPoint();
ASSERT_TRUE(RunComponentExtensionTest("local_filesystem")) << message_;
+
}
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, FileBrowserTest) {
+IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTest) {
+ AddTmpMountPoint();
ASSERT_TRUE(RunExtensionTest("filesystem_handler")) << message_;
ASSERT_TRUE(RunComponentExtensionTest("filebrowser_component")) << message_;
}

Powered by Google App Engine
This is Rietveld 408576698