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

Unified Diff: base/system_monitor/system_monitor_unittest.cc

Issue 10781014: Isolated FS for media devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 8 years, 5 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: 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 d3a99fb15844bbdf70c923f5a928ab8188aee69d..fb9ae4380987f0910933fba7fe2a7bb556519528 100644
--- a/base/system_monitor/system_monitor_unittest.cc
+++ b/base/system_monitor/system_monitor_unittest.cc
@@ -110,6 +110,7 @@ TEST_F(SystemMonitorTest, PowerNotifications) {
TEST_F(SystemMonitorTest, DeviceChangeNotifications) {
const int kObservers = 5;
const string16 kDeviceName = ASCIIToUTF16("media device");
+ const FilePath kDevicePath1(FILE_PATH_LITERAL("/testfoo"));
const std::string kDeviceId1 = "1";
const std::string kDeviceId2 = "2";
@@ -126,12 +127,12 @@ TEST_F(SystemMonitorTest, DeviceChangeNotifications) {
OnMediaDeviceAttached(kDeviceId1,
kDeviceName,
base::SystemMonitor::TYPE_PATH,
- testing::_))
- .InSequence(mock_sequencer[index]);
- EXPECT_CALL(observers[index], OnMediaDeviceDetached(kDeviceId1))
- .InSequence(mock_sequencer[index]);
- EXPECT_CALL(observers[index], OnMediaDeviceDetached(kDeviceId2))
+ kDevicePath1.value()))
.InSequence(mock_sequencer[index]);
+ EXPECT_CALL(observers[index], OnMediaDeviceDetached(
+ kDeviceId1, kDevicePath1.value())).InSequence(mock_sequencer[index]);
+ EXPECT_CALL(observers[index], OnMediaDeviceDetached(
+ kDeviceId2, testing::_)).Times(0);
}
system_monitor_->ProcessDevicesChanged(base::SystemMonitor::DEVTYPE_UNKNOWN);
@@ -145,7 +146,7 @@ TEST_F(SystemMonitorTest, DeviceChangeNotifications) {
kDeviceId1,
kDeviceName,
base::SystemMonitor::TYPE_PATH,
- FILE_PATH_LITERAL("path"));
+ kDevicePath1.value());
message_loop_.RunAllPending();
system_monitor_->ProcessMediaDeviceDetached(kDeviceId1);

Powered by Google App Engine
This is Rietveld 408576698