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

Unified Diff: components/storage_monitor/storage_monitor_win_unittest.cc

Issue 120303003: [StorageMonitor] Move gallery name generation to StorageInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittest build error on mac/linux/chromeos Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/storage_monitor/storage_monitor_win_unittest.cc
diff --git a/components/storage_monitor/storage_monitor_win_unittest.cc b/components/storage_monitor/storage_monitor_win_unittest.cc
index 40645a8a1a85041b311a5b846d34cdc5eb0d408f..7c685b0d3828b29a02b8532ec329d47e62447016 100644
--- a/components/storage_monitor/storage_monitor_win_unittest.cc
+++ b/components/storage_monitor/storage_monitor_win_unittest.cc
@@ -313,26 +313,25 @@ TEST_F(StorageMonitorWinTest, PathMountDevices) {
StorageInfo info;
EXPECT_TRUE(monitor_->GetStorageInfoForPath(
base::FilePath(ASCIIToUTF16("F:\\dir")), &info));
- EXPECT_EQ(L"", info.name());
- EXPECT_EQ(L"F:\\ Drive", info.storage_label());
+ EXPECT_EQ(L"F:\\ Drive", info.GetDisplayName(false));
EXPECT_TRUE(monitor_->GetStorageInfoForPath(
base::FilePath(ASCIIToUTF16("F:\\mount1")), &info));
- EXPECT_EQ(L"mount1", info.name());
+ EXPECT_EQ(L"mount1", info.GetDisplayName(false));
EXPECT_TRUE(monitor_->GetStorageInfoForPath(
base::FilePath(ASCIIToUTF16("F:\\mount1\\dir")), &info));
- EXPECT_EQ(L"mount1", info.name());
+ EXPECT_EQ(L"mount1", info.GetDisplayName(false));
EXPECT_TRUE(monitor_->GetStorageInfoForPath(
base::FilePath(ASCIIToUTF16("F:\\mount2\\dir")), &info));
- EXPECT_EQ(L"mount2", info.name());
+ EXPECT_EQ(L"mount2", info.GetDisplayName(false));
EXPECT_TRUE(monitor_->GetStorageInfoForPath(
base::FilePath(ASCIIToUTF16("F:\\mount1\\subdir")), &info));
- EXPECT_EQ(L"mount1subdir", info.name());
+ EXPECT_EQ(L"mount1subdir", info.GetDisplayName(false));
EXPECT_TRUE(monitor_->GetStorageInfoForPath(
base::FilePath(ASCIIToUTF16("F:\\mount1\\subdir\\dir")), &info));
- EXPECT_EQ(L"mount1subdir", info.name());
+ EXPECT_EQ(L"mount1subdir", info.GetDisplayName(false));
EXPECT_TRUE(monitor_->GetStorageInfoForPath(
base::FilePath(ASCIIToUTF16("F:\\mount1\\subdir\\dir\\dir")), &info));
- EXPECT_EQ(L"mount1subdir", info.name());
+ EXPECT_EQ(L"mount1subdir", info.GetDisplayName(false));
}
TEST_F(StorageMonitorWinTest, DevicesAttachedHighBoundary) {
@@ -475,7 +474,7 @@ TEST_F(StorageMonitorWinTest, DeviceInfoForPath) {
ASSERT_TRUE(volume_mount_watcher_->GetDeviceInfo(removable_device, &info));
EXPECT_TRUE(StorageInfo::IsRemovableDevice(info.device_id()));
EXPECT_EQ(info.device_id(), device_info.device_id());
- EXPECT_EQ(info.name(), device_info.name());
+ EXPECT_EQ(info.GetDisplayName(false), device_info.GetDisplayName(false));
EXPECT_EQ(info.location(), device_info.location());
EXPECT_EQ(1000000, info.total_size_in_bytes());
@@ -487,7 +486,7 @@ TEST_F(StorageMonitorWinTest, DeviceInfoForPath) {
fixed_device, &info));
EXPECT_FALSE(StorageInfo::IsRemovableDevice(info.device_id()));
EXPECT_EQ(info.device_id(), device_info.device_id());
- EXPECT_EQ(info.name(), device_info.name());
+ EXPECT_EQ(info.GetDisplayName(false), device_info.GetDisplayName(false));
EXPECT_EQ(info.location(), device_info.location());
}
« no previous file with comments | « components/storage_monitor/storage_monitor_unittest.cc ('k') | components/storage_monitor/test_storage_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698