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

Side by Side 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 Device intent source (media detach notification) 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/system_monitor/system_monitor.h" 5 #include "base/system_monitor/system_monitor.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/test/mock_devices_changed_observer.h" 9 #include "base/test/mock_devices_changed_observer.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 .InSequence(mock_sequencer[index]); 124 .InSequence(mock_sequencer[index]);
125 EXPECT_CALL(observers[index], 125 EXPECT_CALL(observers[index],
126 OnMediaDeviceAttached(kDeviceId1, 126 OnMediaDeviceAttached(kDeviceId1,
127 kDeviceName, 127 kDeviceName,
128 base::SystemMonitor::TYPE_PATH, 128 base::SystemMonitor::TYPE_PATH,
129 testing::_)) 129 testing::_))
130 .InSequence(mock_sequencer[index]); 130 .InSequence(mock_sequencer[index]);
131 EXPECT_CALL(observers[index], OnMediaDeviceDetached(kDeviceId1)) 131 EXPECT_CALL(observers[index], OnMediaDeviceDetached(kDeviceId1))
132 .InSequence(mock_sequencer[index]); 132 .InSequence(mock_sequencer[index]);
133 EXPECT_CALL(observers[index], OnMediaDeviceDetached(kDeviceId2)) 133 EXPECT_CALL(observers[index], OnMediaDeviceDetached(kDeviceId2))
134 .InSequence(mock_sequencer[index]); 134 .Times(0).InSequence(mock_sequencer[index]);
135 } 135 }
136 136
137 system_monitor_->ProcessDevicesChanged(base::SystemMonitor::DEVTYPE_UNKNOWN); 137 system_monitor_->ProcessDevicesChanged(base::SystemMonitor::DEVTYPE_UNKNOWN);
138 message_loop_.RunAllPending(); 138 message_loop_.RunAllPending();
139 139
140 system_monitor_->ProcessDevicesChanged(base::SystemMonitor::DEVTYPE_UNKNOWN); 140 system_monitor_->ProcessDevicesChanged(base::SystemMonitor::DEVTYPE_UNKNOWN);
141 system_monitor_->ProcessDevicesChanged(base::SystemMonitor::DEVTYPE_UNKNOWN); 141 system_monitor_->ProcessDevicesChanged(base::SystemMonitor::DEVTYPE_UNKNOWN);
142 message_loop_.RunAllPending(); 142 message_loop_.RunAllPending();
143 143
144 system_monitor_->ProcessMediaDeviceAttached( 144 system_monitor_->ProcessMediaDeviceAttached(
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 system_monitor_->ProcessMediaDeviceDetached(kDeviceId2); 207 system_monitor_->ProcessMediaDeviceDetached(kDeviceId2);
208 message_loop_.RunAllPending(); 208 message_loop_.RunAllPending();
209 devices = system_monitor_->GetAttachedMediaDevices(); 209 devices = system_monitor_->GetAttachedMediaDevices();
210 EXPECT_EQ(0U, devices.size()); 210 EXPECT_EQ(0U, devices.size());
211 } 211 }
212 212
213 } // namespace 213 } // namespace
214 214
215 } // namespace base 215 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698