OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 // Browser test for basic Chrome OS file manager functionality: | 5 // Browser test for basic Chrome OS file manager functionality: |
6 // - The file list is updated when a file is added externally to the Downloads | 6 // - The file list is updated when a file is added externally to the Downloads |
7 // folder. | 7 // folder. |
8 // - Selecting a file and copy-pasting it with the keyboard copies the file. | 8 // - Selecting a file and copy-pasting it with the keyboard copies the file. |
9 // - Selecting a file and pressing delete deletes it. | 9 // - Selecting a file and pressing delete deletes it. |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "chromeos/chromeos_switches.h" | 42 #include "chromeos/chromeos_switches.h" |
43 #include "components/user_manager/user_manager.h" | 43 #include "components/user_manager/user_manager.h" |
44 #include "content/public/browser/notification_service.h" | 44 #include "content/public/browser/notification_service.h" |
45 #include "content/public/test/test_utils.h" | 45 #include "content/public/test/test_utils.h" |
46 #include "extensions/browser/api/test/test_api.h" | 46 #include "extensions/browser/api/test/test_api.h" |
47 #include "extensions/browser/notification_types.h" | 47 #include "extensions/browser/notification_types.h" |
48 #include "extensions/common/extension.h" | 48 #include "extensions/common/extension.h" |
49 #include "google_apis/drive/drive_api_parser.h" | 49 #include "google_apis/drive/drive_api_parser.h" |
50 #include "google_apis/drive/test_util.h" | 50 #include "google_apis/drive/test_util.h" |
51 #include "net/test/embedded_test_server/embedded_test_server.h" | 51 #include "net/test/embedded_test_server/embedded_test_server.h" |
52 #include "webkit/browser/fileapi/external_mount_points.h" | 52 #include "storage/browser/fileapi/external_mount_points.h" |
53 | 53 |
54 using drive::DriveIntegrationServiceFactory; | 54 using drive::DriveIntegrationServiceFactory; |
55 | 55 |
56 namespace file_manager { | 56 namespace file_manager { |
57 namespace { | 57 namespace { |
58 | 58 |
59 enum EntryType { | 59 enum EntryType { |
60 FILE, | 60 FILE, |
61 DIRECTORY, | 61 DIRECTORY, |
62 }; | 62 }; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 base::Time::Now())); | 305 base::Time::Now())); |
306 CreateEntry( | 306 CreateEntry( |
307 TestEntryInfo(DIRECTORY, std::string(), "A", std::string(), NONE, | 307 TestEntryInfo(DIRECTORY, std::string(), "A", std::string(), NONE, |
308 base::Time::Now())); | 308 base::Time::Now())); |
309 return true; | 309 return true; |
310 } | 310 } |
311 | 311 |
312 virtual bool Mount(Profile* profile) OVERRIDE { | 312 virtual bool Mount(Profile* profile) OVERRIDE { |
313 if (!CreateRootDirectory(profile)) | 313 if (!CreateRootDirectory(profile)) |
314 return false; | 314 return false; |
315 fileapi::ExternalMountPoints* const mount_points = | 315 storage::ExternalMountPoints* const mount_points = |
316 fileapi::ExternalMountPoints::GetSystemInstance(); | 316 storage::ExternalMountPoints::GetSystemInstance(); |
317 | 317 |
318 // First revoke the existing mount point (if any). | 318 // First revoke the existing mount point (if any). |
319 mount_points->RevokeFileSystem(name()); | 319 mount_points->RevokeFileSystem(name()); |
320 const bool result = | 320 const bool result = |
321 mount_points->RegisterFileSystem(name(), | 321 mount_points->RegisterFileSystem(name(), |
322 fileapi::kFileSystemTypeNativeLocal, | 322 storage::kFileSystemTypeNativeLocal, |
323 fileapi::FileSystemMountOption(), | 323 storage::FileSystemMountOption(), |
324 root_path()); | 324 root_path()); |
325 if (!result) | 325 if (!result) |
326 return false; | 326 return false; |
327 | 327 |
328 VolumeManager::Get(profile)->AddVolumeInfoForTesting( | 328 VolumeManager::Get(profile)->AddVolumeInfoForTesting( |
329 root_path(), volume_type_, device_type_); | 329 root_path(), volume_type_, device_type_); |
330 return true; | 330 return true; |
331 } | 331 } |
332 | 332 |
333 private: | 333 private: |
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1453 } | 1453 } |
1454 | 1454 |
1455 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, ExposureImageOnDrive) { | 1455 IN_PROC_BROWSER_TEST_F(GalleryBrowserTest, ExposureImageOnDrive) { |
1456 AddScript("gallery/photo_editor.js"); | 1456 AddScript("gallery/photo_editor.js"); |
1457 set_test_case_name("exposureImageOnDrive"); | 1457 set_test_case_name("exposureImageOnDrive"); |
1458 StartTest(); | 1458 StartTest(); |
1459 } | 1459 } |
1460 | 1460 |
1461 } // namespace | 1461 } // namespace |
1462 } // namespace file_manager | 1462 } // namespace file_manager |
OLD | NEW |