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/run_loop.h" | 5 #include "base/run_loop.h" |
6 #include "base/stl_util.h" | 6 #include "base/stl_util.h" |
7 #include "chrome/browser/chromeos/drive/file_change.h" | 7 #include "chrome/browser/chromeos/drive/file_change.h" |
8 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h" | 8 #include "chrome/browser/chromeos/extensions/file_manager/event_router.h" |
9 #include "chrome/browser/chromeos/file_manager/drive_test_util.h" | 9 #include "chrome/browser/chromeos/file_manager/drive_test_util.h" |
10 #include "chrome/browser/chromeos/file_manager/file_watcher.h" | 10 #include "chrome/browser/chromeos/file_manager/file_watcher.h" |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 }; | 310 }; |
311 | 311 |
312 IN_PROC_BROWSER_TEST_F(FileManagerPrivateApiTest, Mount) { | 312 IN_PROC_BROWSER_TEST_F(FileManagerPrivateApiTest, Mount) { |
313 file_manager::test_util::WaitUntilDriveMountPointIsAdded( | 313 file_manager::test_util::WaitUntilDriveMountPointIsAdded( |
314 browser()->profile()); | 314 browser()->profile()); |
315 | 315 |
316 // Add a provided file system, to test passing the |configurable| and | 316 // Add a provided file system, to test passing the |configurable| and |
317 // |source| flags properly down to Files app. | 317 // |source| flags properly down to Files app. |
318 chromeos::file_system_provider::ProvidedFileSystemInfo info( | 318 chromeos::file_system_provider::ProvidedFileSystemInfo info( |
319 "testing-extension-id", chromeos::file_system_provider::MountOptions(), | 319 "testing-extension-id", chromeos::file_system_provider::MountOptions(), |
320 base::FilePath(), true /* configurable */, extensions::SOURCE_NETWORK); | 320 base::FilePath(), true /* configurable */, false /* watchable */, |
| 321 extensions::SOURCE_NETWORK); |
321 | 322 |
322 file_manager::VolumeManager::Get(browser()->profile()) | 323 file_manager::VolumeManager::Get(browser()->profile()) |
323 ->AddVolumeForTesting( | 324 ->AddVolumeForTesting( |
324 make_linked_ptr(file_manager::Volume::CreateForProvidedFileSystem( | 325 make_linked_ptr(file_manager::Volume::CreateForProvidedFileSystem( |
325 info, file_manager::MOUNT_CONTEXT_AUTO))); | 326 info, file_manager::MOUNT_CONTEXT_AUTO))); |
326 | 327 |
327 // We will call fileManagerPrivate.unmountVolume once. To test that method, we | 328 // We will call fileManagerPrivate.unmountVolume once. To test that method, we |
328 // check that UnmountPath is really called with the same value. | 329 // check that UnmountPath is really called with the same value. |
329 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_, _, _)) | 330 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_, _, _)) |
330 .Times(0); | 331 .Times(0); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 ->RegisterFileSystem( | 437 ->RegisterFileSystem( |
437 kLocalMountPointName, storage::kFileSystemTypeNativeLocal, | 438 kLocalMountPointName, storage::kFileSystemTypeNativeLocal, |
438 storage::FileSystemMountOption(), mount_point_dir)); | 439 storage::FileSystemMountOption(), mount_point_dir)); |
439 file_manager::VolumeManager::Get(browser()->profile()) | 440 file_manager::VolumeManager::Get(browser()->profile()) |
440 ->AddVolumeForTesting(mount_point_dir, file_manager::VOLUME_TYPE_TESTING, | 441 ->AddVolumeForTesting(mount_point_dir, file_manager::VOLUME_TYPE_TESTING, |
441 chromeos::DEVICE_TYPE_UNKNOWN, | 442 chromeos::DEVICE_TYPE_UNKNOWN, |
442 false /* read_only */); | 443 false /* read_only */); |
443 | 444 |
444 ASSERT_TRUE(RunComponentExtensionTest("file_browser/content_checksum_test")); | 445 ASSERT_TRUE(RunComponentExtensionTest("file_browser/content_checksum_test")); |
445 } | 446 } |
OLD | NEW |