Commit b3436138 authored by hidehiko@chromium.org's avatar hidehiko@chromium.org

Return Drive mount point by getMountPoints.

By this CL, fileBrowserPrivate.getMountPoints starts to return Drive
(if mounted). This is the preparation for getting rid of rootList in
DocumentModel.

BUG=279276
TEST=Ran unit_tests and tested manually.

Review URL: https://chromiumcodereview.appspot.com/23541009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223614 0039d316-1c4b-4281-b951-d872f2087c98
parent dc04750a
......@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/stl_util.h"
#include "chrome/browser/chromeos/file_manager/drive_test_util.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chromeos/dbus/cros_disks_client.h"
#include "chromeos/disks/mock_disk_mount_manager.h"
......@@ -234,6 +235,9 @@ class FileBrowserPrivateApiTest : public ExtensionApiTest {
};
IN_PROC_BROWSER_TEST_F(FileBrowserPrivateApiTest, Mount) {
file_manager::test_util::WaitUntilDriveMountPointIsAdded(
browser()->profile());
// We will call fileBrowserPrivate.unmountVolume once. To test that method, we
// check that UnmountPath is really called with the same value.
EXPECT_CALL(*disk_mount_manager_mock_, UnmountPath(_, _, _))
......
......@@ -160,7 +160,9 @@ std::vector<VolumeInfo> VolumeManager::GetVolumeInfoList() const {
std::vector<VolumeInfo> result;
// TODO(hidehiko): Adds Drive if available.
// Adds "Drive" volume.
if (drive_integration_service_ && drive_integration_service_->IsMounted())
result.push_back(CreateDriveVolumeInfo());
// Adds "Downloads".
base::FilePath home_path;
......
......@@ -57,6 +57,12 @@ var expectedDownloadsVolume = {
// NOTE: this has to be synced with values in file_browser_private_apitest.cc
// and values sorted by mountPath.
var expectedMountPoints = [
{
sourcePath: '/special/drive',
mountPath: 'drive',
volumeType: 'drive',
mountCondition: ''
},
{
mountPath: 'Downloads',
volumeType: 'downloads',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment