Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_private_apitest.cc

Issue 12537016: Add callback to DiskMountManager::UnmountPath (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698