OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "content/public/test/test_utils.h" | 25 #include "content/public/test/test_utils.h" |
26 #include "extensions/browser/notification_types.h" | 26 #include "extensions/browser/notification_types.h" |
27 #include "extensions/test/result_catcher.h" | 27 #include "extensions/test/result_catcher.h" |
28 #include "google_apis/drive/drive_api_parser.h" | 28 #include "google_apis/drive/drive_api_parser.h" |
29 #include "google_apis/drive/test_util.h" | 29 #include "google_apis/drive/test_util.h" |
30 #include "google_apis/drive/time_util.h" | 30 #include "google_apis/drive/time_util.h" |
31 #include "webkit/browser/fileapi/external_mount_points.h" | 31 #include "webkit/browser/fileapi/external_mount_points.h" |
32 | 32 |
33 // Tests for access to external file systems (as defined in | 33 // Tests for access to external file systems (as defined in |
34 // storage/common/fileapi/file_system_types.h) from extensions with | 34 // storage/common/fileapi/file_system_types.h) from extensions with |
35 // fileBrowserPrivate and fileBrowserHandler extension permissions. | 35 // fileManagerPrivate and fileBrowserHandler extension permissions. |
36 // The tests cover following external file system types: | 36 // The tests cover following external file system types: |
37 // - local (kFileSystemTypeLocalNative): a local file system on which files are | 37 // - local (kFileSystemTypeLocalNative): a local file system on which files are |
38 // accessed using native local path. | 38 // accessed using native local path. |
39 // - restricted (kFileSystemTypeRestrictedLocalNative): a *read-only* local file | 39 // - restricted (kFileSystemTypeRestrictedLocalNative): a *read-only* local file |
40 // system which can only be accessed by extensions that have full access to | 40 // system which can only be accessed by extensions that have full access to |
41 // external file systems (i.e. extensions with fileBrowserPrivate permission). | 41 // external file systems (i.e. extensions with fileManagerPrivate permission). |
42 // - drive (kFileSystemTypeDrive): a file system that provides access to Google | 42 // - drive (kFileSystemTypeDrive): a file system that provides access to Google |
43 // Drive. | 43 // Drive. |
44 // | 44 // |
45 // The tests cover following scenarios: | 45 // The tests cover following scenarios: |
46 // - Performing file system operations on external file systems from an | 46 // - Performing file system operations on external file systems from an |
47 // extension with fileBrowserPrivate permission (i.e. a file browser | 47 // extension with fileManagerPrivate permission (i.e. a file browser |
48 // extension). | 48 // extension). |
49 // - Performing read/write operations from file handler extensions. These | 49 // - Performing read/write operations from file handler extensions. These |
50 // extensions need a file browser extension to give them permissions to access | 50 // extensions need a file browser extension to give them permissions to access |
51 // files. This also includes file handler extensions in filesystem API. | 51 // files. This also includes file handler extensions in filesystem API. |
52 // - Observing directory changes from a file browser extension (using | 52 // - Observing directory changes from a file browser extension (using |
53 // fileBrowserPrivate API). | 53 // fileManagerPrivate API). |
54 // - Doing searches on drive file system from file browser extension (using | 54 // - Doing searches on drive file system from file browser extension (using |
55 // fileBrowserPrivate API). | 55 // fileManagerPrivate API). |
56 | 56 |
57 using drive::DriveIntegrationServiceFactory; | 57 using drive::DriveIntegrationServiceFactory; |
58 using extensions::Extension; | 58 using extensions::Extension; |
59 | 59 |
60 namespace file_manager { | 60 namespace file_manager { |
61 namespace { | 61 namespace { |
62 | 62 |
63 // Root dirs for file systems expected by the test extensions. | 63 // Root dirs for file systems expected by the test extensions. |
64 // NOTE: Root dir for drive file system is set by Chrome's drive implementation, | 64 // NOTE: Root dir for drive file system is set by Chrome's drive implementation, |
65 // but the test will have to make sure the mount point is added before | 65 // but the test will have to make sure the mount point is added before |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 AppFileHandlerMulti) { | 800 AppFileHandlerMulti) { |
801 EXPECT_TRUE( | 801 EXPECT_TRUE( |
802 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", | 802 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", |
803 FILE_PATH_LITERAL("manifest.json"), | 803 FILE_PATH_LITERAL("manifest.json"), |
804 "", | 804 "", |
805 FLAGS_NONE)) | 805 FLAGS_NONE)) |
806 << message_; | 806 << message_; |
807 } | 807 } |
808 } // namespace | 808 } // namespace |
809 } // namespace file_manager | 809 } // namespace file_manager |
OLD | NEW |