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

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: Fix shared_build compile error. 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 7c5f375b433184d49658d5217987a55ad804dc46..27ee260e64a14d25c8e0fdb00ca1a2752399c4d7 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";
@@ -125,12 +126,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();
@@ -144,7 +145,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