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

Side by Side Diff: chrome/browser/extensions/extension_local_filesystem_apitest.cc

Issue 9004019: Cleanup: Removing FileSystemPathManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 #include "chrome/browser/profiles/profile.h" 6 #include "chrome/browser/profiles/profile.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "webkit/fileapi/file_system_context.h" 8 #include "webkit/fileapi/file_system_context.h"
9 #include "webkit/fileapi/file_system_mount_point_provider.h" 9 #include "webkit/fileapi/file_system_mount_point_provider.h"
10 #include "webkit/fileapi/file_system_path_manager.h"
11 10
12 #if defined(OS_CHROMEOS) 11 #if defined(OS_CHROMEOS)
13 12
14 class FileSystemExtensionApiTest : public ExtensionApiTest { 13 class FileSystemExtensionApiTest : public ExtensionApiTest {
15 public: 14 public:
16 FileSystemExtensionApiTest() : test_mount_point_("/tmp") { 15 FileSystemExtensionApiTest() : test_mount_point_("/tmp") {
17 } 16 }
18 17
19 virtual ~FileSystemExtensionApiTest() {} 18 virtual ~FileSystemExtensionApiTest() {}
20 19
21 // Sets up test environment 20 // Sets up test environment
22 void AddTmpMountPoint() { 21 void AddTmpMountPoint() {
23 // Add tmp mount point. 22 // Add tmp mount point.
24 fileapi::FileSystemPathManager* path_manager =
25 browser()->profile()->GetFileSystemContext()->path_manager();
26 fileapi::ExternalFileSystemMountPointProvider* provider = 23 fileapi::ExternalFileSystemMountPointProvider* provider =
27 path_manager->external_provider(); 24 browser()->profile()->GetFileSystemContext()->external_provider();
28 provider->AddMountPoint(test_mount_point_); 25 provider->AddMountPoint(test_mount_point_);
29 } 26 }
30 27
31 private: 28 private:
32 FilePath test_mount_point_; 29 FilePath test_mount_point_;
33 }; 30 };
34 31
35 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, LocalFileSystem) { 32 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, LocalFileSystem) {
36 AddTmpMountPoint(); 33 AddTmpMountPoint();
37 ASSERT_TRUE(RunComponentExtensionTest("local_filesystem")) << message_; 34 ASSERT_TRUE(RunComponentExtensionTest("local_filesystem")) << message_;
38 35
39 } 36 }
40 37
41 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTest) { 38 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTest) {
42 AddTmpMountPoint(); 39 AddTmpMountPoint();
43 ASSERT_TRUE(RunExtensionTest("filesystem_handler")) << message_; 40 ASSERT_TRUE(RunExtensionTest("filesystem_handler")) << message_;
44 ASSERT_TRUE(RunComponentExtensionTest("filebrowser_component")) << message_; 41 ASSERT_TRUE(RunComponentExtensionTest("filebrowser_component")) << message_;
45 } 42 }
46 43
47 #endif 44 #endif
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_file_browser_private_apitest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698