| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 browser()->profile()); | 317 browser()->profile()); |
| 318 | 318 |
| 319 // Add a provided file system, to test passing the |configurable| and | 319 // Add a provided file system, to test passing the |configurable| and |
| 320 // |source| flags properly down to Files app. | 320 // |source| flags properly down to Files app. |
| 321 chromeos::file_system_provider::ProvidedFileSystemInfo info( | 321 chromeos::file_system_provider::ProvidedFileSystemInfo info( |
| 322 "testing-extension-id", chromeos::file_system_provider::MountOptions(), | 322 "testing-extension-id", chromeos::file_system_provider::MountOptions(), |
| 323 base::FilePath(), true /* configurable */, false /* watchable */, | 323 base::FilePath(), true /* configurable */, false /* watchable */, |
| 324 extensions::SOURCE_NETWORK); | 324 extensions::SOURCE_NETWORK); |
| 325 | 325 |
| 326 file_manager::VolumeManager::Get(browser()->profile()) | 326 file_manager::VolumeManager::Get(browser()->profile()) |
| 327 ->AddVolumeForTesting( | 327 ->AddVolumeForTesting(file_manager::Volume::CreateForProvidedFileSystem( |
| 328 make_linked_ptr(file_manager::Volume::CreateForProvidedFileSystem( | 328 info, file_manager::MOUNT_CONTEXT_AUTO)); |
| 329 info, file_manager::MOUNT_CONTEXT_AUTO))); | |
| 330 | 329 |
| 331 // We will call fileManagerPrivate.unmountVolume once. To test that method, we | 330 // We will call fileManagerPrivate.unmountVolume once. To test that method, we |
| 332 // check that UnmountPath is really called with the same value. | 331 // check that UnmountPath is really called with the same value. |
| 333 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_, _, _)) | 332 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_, _, _)) |
| 334 .Times(0); | 333 .Times(0); |
| 335 EXPECT_CALL(*disk_mount_manager_mock_, | 334 EXPECT_CALL(*disk_mount_manager_mock_, |
| 336 UnmountPath( | 335 UnmountPath( |
| 337 chromeos::CrosDisksClient::GetArchiveMountPoint().AppendASCII( | 336 chromeos::CrosDisksClient::GetArchiveMountPoint().AppendASCII( |
| 338 "archive_mount_path").AsUTF8Unsafe(), | 337 "archive_mount_path").AsUTF8Unsafe(), |
| 339 chromeos::UNMOUNT_OPTIONS_NONE, _)).Times(1); | 338 chromeos::UNMOUNT_OPTIONS_NONE, _)).Times(1); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 ->RegisterFileSystem( | 439 ->RegisterFileSystem( |
| 441 kLocalMountPointName, storage::kFileSystemTypeNativeLocal, | 440 kLocalMountPointName, storage::kFileSystemTypeNativeLocal, |
| 442 storage::FileSystemMountOption(), mount_point_dir)); | 441 storage::FileSystemMountOption(), mount_point_dir)); |
| 443 file_manager::VolumeManager::Get(browser()->profile()) | 442 file_manager::VolumeManager::Get(browser()->profile()) |
| 444 ->AddVolumeForTesting(mount_point_dir, file_manager::VOLUME_TYPE_TESTING, | 443 ->AddVolumeForTesting(mount_point_dir, file_manager::VOLUME_TYPE_TESTING, |
| 445 chromeos::DEVICE_TYPE_UNKNOWN, | 444 chromeos::DEVICE_TYPE_UNKNOWN, |
| 446 false /* read_only */); | 445 false /* read_only */); |
| 447 | 446 |
| 448 ASSERT_TRUE(RunComponentExtensionTest("file_browser/content_checksum_test")); | 447 ASSERT_TRUE(RunComponentExtensionTest("file_browser/content_checksum_test")); |
| 449 } | 448 } |
| OLD | NEW |