| Index: chrome/browser/storage_monitor/storage_monitor_unittest.cc
|
| diff --git a/chrome/browser/storage_monitor/storage_monitor_unittest.cc b/chrome/browser/storage_monitor/storage_monitor_unittest.cc
|
| index 63234b43b6ea011ceb239e7d5731a5d2dd787950..956ead702bdd34d9364e6fb6e7fdf98398dd7286 100644
|
| --- a/chrome/browser/storage_monitor/storage_monitor_unittest.cc
|
| +++ b/chrome/browser/storage_monitor/storage_monitor_unittest.cc
|
| @@ -72,10 +72,17 @@ TEST(StorageMonitorTest, DeviceAttachDetachNotifications) {
|
| monitor.RemoveObserver(&observer2);
|
| }
|
|
|
| -TEST(StorageMonitorTest, GetAttachedStorageEmpty) {
|
| - base::MessageLoop message_loop;
|
| +TEST(StorageMonitorTest, GetAttachedRemovableStoragesEmpty) {
|
| + MessageLoop message_loop;
|
| + test::TestStorageMonitor monitor;
|
| + std::vector<StorageInfo> devices = monitor.GetAttachedRemovableStorages();
|
| + EXPECT_EQ(0U, devices.size());
|
| +}
|
| +
|
| +TEST(StorageMonitorTest, GetAllAvailableStoragesEmpty) {
|
| + MessageLoop message_loop;
|
| test::TestStorageMonitor monitor;
|
| - std::vector<StorageInfo> devices = monitor.GetAttachedStorage();
|
| + std::vector<StorageInfo> devices = monitor.GetAllAvailableStorages();
|
| EXPECT_EQ(0U, devices.size());
|
| }
|
|
|
| @@ -89,7 +96,7 @@ TEST(StorageMonitorTest, GetRemovableStorageAttachDetach) {
|
| string16(), string16(), string16(), 0);
|
| monitor.receiver()->ProcessAttach(info1);
|
| message_loop.RunUntilIdle();
|
| - std::vector<StorageInfo> devices = monitor.GetAttachedStorage();
|
| + std::vector<StorageInfo> devices = monitor.GetAttachedRemovableStorages();
|
| ASSERT_EQ(1U, devices.size());
|
| EXPECT_EQ(kDeviceId1, devices[0].device_id());
|
| EXPECT_EQ(kDeviceName1, devices[0].name());
|
| @@ -102,7 +109,7 @@ TEST(StorageMonitorTest, GetRemovableStorageAttachDetach) {
|
| string16(), string16(), string16(), 0);
|
| monitor.receiver()->ProcessAttach(info2);
|
| message_loop.RunUntilIdle();
|
| - devices = monitor.GetAttachedStorage();
|
| + devices = monitor.GetAttachedRemovableStorages();
|
| ASSERT_EQ(2U, devices.size());
|
| EXPECT_EQ(kDeviceId1, devices[0].device_id());
|
| EXPECT_EQ(kDeviceName1, devices[0].name());
|
| @@ -113,7 +120,7 @@ TEST(StorageMonitorTest, GetRemovableStorageAttachDetach) {
|
|
|
| monitor.receiver()->ProcessDetach(kDeviceId1);
|
| message_loop.RunUntilIdle();
|
| - devices = monitor.GetAttachedStorage();
|
| + devices = monitor.GetAttachedRemovableStorages();
|
| ASSERT_EQ(1U, devices.size());
|
| EXPECT_EQ(kDeviceId2, devices[0].device_id());
|
| EXPECT_EQ(kDeviceName2, devices[0].name());
|
| @@ -121,7 +128,7 @@ TEST(StorageMonitorTest, GetRemovableStorageAttachDetach) {
|
|
|
| monitor.receiver()->ProcessDetach(kDeviceId2);
|
| message_loop.RunUntilIdle();
|
| - devices = monitor.GetAttachedStorage();
|
| + devices = monitor.GetAttachedRemovableStorages();
|
| EXPECT_EQ(0U, devices.size());
|
| }
|
|
|
|
|