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(file_manager::Volume::CreateForProvidedFileSystem( | 327 ->AddVolumeForTesting( |
328 info, file_manager::MOUNT_CONTEXT_AUTO)); | 328 make_linked_ptr(file_manager::Volume::CreateForProvidedFileSystem( |
| 329 info, file_manager::MOUNT_CONTEXT_AUTO))); |
329 | 330 |
330 // We will call fileManagerPrivate.unmountVolume once. To test that method, we | 331 // We will call fileManagerPrivate.unmountVolume once. To test that method, we |
331 // check that UnmountPath is really called with the same value. | 332 // check that UnmountPath is really called with the same value. |
332 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_, _, _)) | 333 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_, _, _)) |
333 .Times(0); | 334 .Times(0); |
334 EXPECT_CALL(*disk_mount_manager_mock_, | 335 EXPECT_CALL(*disk_mount_manager_mock_, |
335 UnmountPath( | 336 UnmountPath( |
336 chromeos::CrosDisksClient::GetArchiveMountPoint().AppendASCII( | 337 chromeos::CrosDisksClient::GetArchiveMountPoint().AppendASCII( |
337 "archive_mount_path").AsUTF8Unsafe(), | 338 "archive_mount_path").AsUTF8Unsafe(), |
338 chromeos::UNMOUNT_OPTIONS_NONE, _)).Times(1); | 339 chromeos::UNMOUNT_OPTIONS_NONE, _)).Times(1); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 ->RegisterFileSystem( | 440 ->RegisterFileSystem( |
440 kLocalMountPointName, storage::kFileSystemTypeNativeLocal, | 441 kLocalMountPointName, storage::kFileSystemTypeNativeLocal, |
441 storage::FileSystemMountOption(), mount_point_dir)); | 442 storage::FileSystemMountOption(), mount_point_dir)); |
442 file_manager::VolumeManager::Get(browser()->profile()) | 443 file_manager::VolumeManager::Get(browser()->profile()) |
443 ->AddVolumeForTesting(mount_point_dir, file_manager::VOLUME_TYPE_TESTING, | 444 ->AddVolumeForTesting(mount_point_dir, file_manager::VOLUME_TYPE_TESTING, |
444 chromeos::DEVICE_TYPE_UNKNOWN, | 445 chromeos::DEVICE_TYPE_UNKNOWN, |
445 false /* read_only */); | 446 false /* read_only */); |
446 | 447 |
447 ASSERT_TRUE(RunComponentExtensionTest("file_browser/content_checksum_test")); | 448 ASSERT_TRUE(RunComponentExtensionTest("file_browser/content_checksum_test")); |
448 } | 449 } |
OLD | NEW |