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/chromeos/disks/mock_disk_mount_manager.h" | 8 #include "chrome/browser/chromeos/disks/mock_disk_mount_manager.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 FilePath test_mount_point_; | 214 FilePath test_mount_point_; |
215 }; | 215 }; |
216 | 216 |
217 IN_PROC_BROWSER_TEST_F(ExtensionFileBrowserPrivateApiTest, FileBrowserMount) { | 217 IN_PROC_BROWSER_TEST_F(ExtensionFileBrowserPrivateApiTest, FileBrowserMount) { |
218 // We will call fileBrowserPrivate.unmountVolume once. To test that method, we | 218 // We will call fileBrowserPrivate.unmountVolume once. To test that method, we |
219 // check that UnmountPath is really called with the same value. | 219 // check that UnmountPath is really called with the same value. |
220 AddTmpMountPoint(); | 220 AddTmpMountPoint(); |
221 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_)) | 221 EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_)) |
222 .Times(0); | 222 .Times(0); |
223 EXPECT_CALL(*disk_mount_manager_mock_, | 223 EXPECT_CALL(*disk_mount_manager_mock_, |
224 UnmountPath(StrEq("/tmp/test_file.zip"))).Times(1); | 224 UnmountPath(StrEq("/media/archive/archive_mount_path"))).Times(1); |
225 | 225 |
226 EXPECT_CALL(*disk_mount_manager_mock_, disks()) | 226 EXPECT_CALL(*disk_mount_manager_mock_, disks()) |
227 .WillRepeatedly(ReturnRef(volumes_)); | 227 .WillRepeatedly(ReturnRef(volumes_)); |
228 | 228 |
229 EXPECT_CALL(*disk_mount_manager_mock_, mount_points()) | 229 EXPECT_CALL(*disk_mount_manager_mock_, mount_points()) |
230 .WillRepeatedly(ReturnRef(mount_points_)); | 230 .WillRepeatedly(ReturnRef(mount_points_)); |
231 | 231 |
232 ASSERT_TRUE(RunComponentExtensionTest("filebrowser_mount")) << message_; | 232 ASSERT_TRUE(RunComponentExtensionTest("filebrowser_mount")) << message_; |
233 } | 233 } |
OLD | NEW |