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

Unified Diff: base/system_monitor/system_monitor_unittest.cc

Issue 10829384: SystemMonitor: Pull device type into the device id (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment Created 8 years, 4 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
« no previous file with comments | « base/system_monitor/system_monitor.cc ('k') | base/test/mock_devices_changed_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/system_monitor/system_monitor_unittest.cc
diff --git a/base/system_monitor/system_monitor_unittest.cc b/base/system_monitor/system_monitor_unittest.cc
index 2f6ddb5f0999f013986e6bc09afe79338ce039dd..ee21cc844ed7bd7f6d54a927fb123e70c8a40d99 100644
--- a/base/system_monitor/system_monitor_unittest.cc
+++ b/base/system_monitor/system_monitor_unittest.cc
@@ -122,7 +122,6 @@ TEST_F(SystemMonitorTest, DeviceChangeNotifications) {
EXPECT_CALL(observers[index],
OnMediaDeviceAttached(kDeviceId1,
kDeviceName,
- base::SystemMonitor::TYPE_PATH,
testing::_))
.InSequence(mock_sequencer[index]);
EXPECT_CALL(observers[index], OnMediaDeviceDetached(kDeviceId1))
@@ -141,7 +140,6 @@ TEST_F(SystemMonitorTest, DeviceChangeNotifications) {
system_monitor_->ProcessMediaDeviceAttached(
kDeviceId1,
kDeviceName,
- base::SystemMonitor::TYPE_PATH,
FILE_PATH_LITERAL("path"));
message_loop_.RunAllPending();
@@ -162,7 +160,6 @@ TEST_F(SystemMonitorTest, GetAttachedMediaDevicesAttachDetach) {
const FilePath kDevicePath1(FILE_PATH_LITERAL("/testfoo"));
system_monitor_->ProcessMediaDeviceAttached(kDeviceId1,
kDeviceName1,
- base::SystemMonitor::TYPE_PATH,
kDevicePath1.value());
message_loop_.RunAllPending();
std::vector<SystemMonitor::MediaDeviceInfo> devices =
@@ -170,7 +167,6 @@ TEST_F(SystemMonitorTest, GetAttachedMediaDevicesAttachDetach) {
ASSERT_EQ(1U, devices.size());
EXPECT_EQ(kDeviceId1, devices[0].unique_id);
EXPECT_EQ(kDeviceName1, devices[0].name);
- EXPECT_EQ(base::SystemMonitor::TYPE_PATH, devices[0].type);
EXPECT_EQ(kDevicePath1.value(), devices[0].location);
const std::string kDeviceId2 = "44";
@@ -178,18 +174,15 @@ TEST_F(SystemMonitorTest, GetAttachedMediaDevicesAttachDetach) {
const FilePath kDevicePath2(FILE_PATH_LITERAL("/testbar"));
system_monitor_->ProcessMediaDeviceAttached(kDeviceId2,
kDeviceName2,
- base::SystemMonitor::TYPE_PATH,
kDevicePath2.value());
message_loop_.RunAllPending();
devices = system_monitor_->GetAttachedMediaDevices();
ASSERT_EQ(2U, devices.size());
EXPECT_EQ(kDeviceId1, devices[0].unique_id);
EXPECT_EQ(kDeviceName1, devices[0].name);
- EXPECT_EQ(base::SystemMonitor::TYPE_PATH, devices[0].type);
EXPECT_EQ(kDevicePath1.value(), devices[0].location);
EXPECT_EQ(kDeviceId2, devices[1].unique_id);
EXPECT_EQ(kDeviceName2, devices[1].name);
- EXPECT_EQ(base::SystemMonitor::TYPE_PATH, devices[1].type);
EXPECT_EQ(kDevicePath2.value(), devices[1].location);
system_monitor_->ProcessMediaDeviceDetached(kDeviceId1);
@@ -198,7 +191,6 @@ TEST_F(SystemMonitorTest, GetAttachedMediaDevicesAttachDetach) {
ASSERT_EQ(1U, devices.size());
EXPECT_EQ(kDeviceId2, devices[0].unique_id);
EXPECT_EQ(kDeviceName2, devices[0].name);
- EXPECT_EQ(base::SystemMonitor::TYPE_PATH, devices[0].type);
EXPECT_EQ(kDevicePath2.value(), devices[0].location);
system_monitor_->ProcessMediaDeviceDetached(kDeviceId2);
« no previous file with comments | « base/system_monitor/system_monitor.cc ('k') | base/test/mock_devices_changed_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698