Commit 94aaefbb authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Try and debug flakes in ExtractMountNameFileSystemNameFullPath tests

Bug: 942371
Change-Id: I8364196af047263086580c11e7db5188ac6915bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1530317
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarSam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641839}
parent 44e2776d
......@@ -591,13 +591,13 @@ TEST_F(FileManagerPathUtilTest, ExtractMountNameFileSystemNameFullPath) {
storage::ExternalMountPoints::GetSystemInstance();
std::string downloads_mount_name = GetDownloadsMountPointName(profile_.get());
base::FilePath downloads = GetDownloadsFolderForProfile(profile_.get());
mount_points->RegisterFileSystem(downloads_mount_name,
storage::kFileSystemTypeNativeLocal,
storage::FileSystemMountOption(), downloads);
EXPECT_TRUE(mount_points->RegisterFileSystem(
downloads_mount_name, storage::kFileSystemTypeNativeLocal,
storage::FileSystemMountOption(), downloads));
base::FilePath removable = base::FilePath(kRemovableMediaPath);
mount_points->RegisterFileSystem(
EXPECT_TRUE(mount_points->RegisterFileSystem(
chromeos::kSystemMountNameRemovable, storage::kFileSystemTypeNativeLocal,
storage::FileSystemMountOption(), base::FilePath(kRemovableMediaPath));
storage::FileSystemMountOption(), base::FilePath(kRemovableMediaPath)));
std::string relative_path_1 = "foo";
std::string relative_path_2 = "foo/bar";
std::string mount_name;
......@@ -632,9 +632,12 @@ TEST_F(FileManagerPathUtilTest, ExtractMountNameFileSystemNameFullPath) {
removable, &mount_name, &file_system_name, &full_path));
// <removable>/foo/
// TODO(crbug.com/942371): Extra debugging to detect what is causing flakes.
base::FilePath absolute_path = removable.Append(relative_path_1);
base::FilePath virtual_path;
EXPECT_TRUE(mount_points->GetVirtualPath(absolute_path, &virtual_path));
EXPECT_TRUE(ExtractMountNameFileSystemNameFullPath(
removable.Append(relative_path_1), &mount_name, &file_system_name,
&full_path));
absolute_path, &mount_name, &file_system_name, &full_path));
EXPECT_EQ(mount_name, "removable/foo");
EXPECT_EQ(file_system_name, "foo");
EXPECT_EQ(full_path, "/");
......
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