| 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 <stdio.h> | 5 #include <stdio.h> |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 protected: | 239 protected: |
| 240 chromeos::disks::MockDiskMountManager* disk_mount_manager_mock_; | 240 chromeos::disks::MockDiskMountManager* disk_mount_manager_mock_; |
| 241 DiskMountManager::DiskMap volumes_; | 241 DiskMountManager::DiskMap volumes_; |
| 242 DiskMountManager::MountPointMap mount_points_; | 242 DiskMountManager::MountPointMap mount_points_; |
| 243 }; | 243 }; |
| 244 | 244 |
| 245 IN_PROC_BROWSER_TEST_F(ExtensionFileBrowserPrivateApiTest, FileBrowserMount) { | 245 IN_PROC_BROWSER_TEST_F(ExtensionFileBrowserPrivateApiTest, FileBrowserMount) { |
| 246 // We will call fileBrowserPrivate.unmountVolume once. To test that method, we | 246 // We will call fileBrowserPrivate.unmountVolume once. To test that method, we |
| 247 // check that UnmountPath is really called with the same value. | 247 // check that UnmountPath is really called with the same value. |
| 248 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_, _)) | 248 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_, _, _)) |
| 249 .Times(0); | 249 .Times(0); |
| 250 EXPECT_CALL(*disk_mount_manager_mock_, | 250 EXPECT_CALL(*disk_mount_manager_mock_, |
| 251 UnmountPath( | 251 UnmountPath( |
| 252 chromeos::CrosDisksClient::GetArchiveMountPoint().AppendASCII( | 252 chromeos::CrosDisksClient::GetArchiveMountPoint().AppendASCII( |
| 253 "archive_mount_path").AsUTF8Unsafe(), | 253 "archive_mount_path").AsUTF8Unsafe(), |
| 254 chromeos::UNMOUNT_OPTIONS_NONE)).Times(1); | 254 chromeos::UNMOUNT_OPTIONS_NONE, _)).Times(1); |
| 255 | 255 |
| 256 EXPECT_CALL(*disk_mount_manager_mock_, disks()) | 256 EXPECT_CALL(*disk_mount_manager_mock_, disks()) |
| 257 .WillRepeatedly(ReturnRef(volumes_)); | 257 .WillRepeatedly(ReturnRef(volumes_)); |
| 258 | 258 |
| 259 EXPECT_CALL(*disk_mount_manager_mock_, mount_points()) | 259 EXPECT_CALL(*disk_mount_manager_mock_, mount_points()) |
| 260 .WillRepeatedly(ReturnRef(mount_points_)); | 260 .WillRepeatedly(ReturnRef(mount_points_)); |
| 261 | 261 |
| 262 ASSERT_TRUE(RunComponentExtensionTest("filebrowser_mount")) << message_; | 262 ASSERT_TRUE(RunComponentExtensionTest("filebrowser_mount")) << message_; |
| 263 } | 263 } |
| OLD | NEW |