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

Side by Side Diff: content/browser/system_message_window_win_unittest.cc

Issue 10836004: add device type as an argument in OnDevicesChanged. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix indent 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
« no previous file with comments | « content/browser/system_message_window_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/browser/system_message_window_win.h" 5 #include "content/browser/system_message_window_win.h"
6 6
7 #include <dbt.h> 7 #include <dbt.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 system_monitor_.AddDevicesChangedObserver(&observer_); 23 system_monitor_.AddDevicesChangedObserver(&observer_);
24 } 24 }
25 25
26 MessageLoop message_loop_; 26 MessageLoop message_loop_;
27 base::SystemMonitor system_monitor_; 27 base::SystemMonitor system_monitor_;
28 base::MockDevicesChangedObserver observer_; 28 base::MockDevicesChangedObserver observer_;
29 SystemMessageWindowWin window_; 29 SystemMessageWindowWin window_;
30 }; 30 };
31 31
32 TEST_F(SystemMessageWindowWinTest, DevicesChanged) { 32 TEST_F(SystemMessageWindowWinTest, DevicesChanged) {
33 EXPECT_CALL(observer_, OnDevicesChanged()).Times(1); 33 EXPECT_CALL(observer_, OnDevicesChanged(testing::_)).Times(1);
34 window_.OnDeviceChange(DBT_DEVNODES_CHANGED, NULL); 34 window_.OnDeviceChange(DBT_DEVNODES_CHANGED, NULL);
35 message_loop_.RunAllPending(); 35 message_loop_.RunAllPending();
36 } 36 }
37 37
38 TEST_F(SystemMessageWindowWinTest, RandomMessage) { 38 TEST_F(SystemMessageWindowWinTest, RandomMessage) {
39 window_.OnDeviceChange(DBT_DEVICEQUERYREMOVE, NULL); 39 window_.OnDeviceChange(DBT_DEVICEQUERYREMOVE, NULL);
40 message_loop_.RunAllPending(); 40 message_loop_.RunAllPending();
41 } 41 }
OLDNEW
« no previous file with comments | « content/browser/system_message_window_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698