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

Side by Side Diff: chrome/browser/chromeos/cros/cros_mock.cc

Issue 10407034: Picked up from stevenjb@: Added WimaxConfigView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/cros/cros_mock.h" 5 #include "chrome/browser/chromeos/cros/cros_mock.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h" 10 #include "chrome/browser/chromeos/cros/mock_cryptohome_library.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 .WillRepeatedly((Return((const NetworkDevice*)(NULL)))); 108 .WillRepeatedly((Return((const NetworkDevice*)(NULL))));
109 EXPECT_CALL(*mock_network_library_, FindEthernetDevice()) 109 EXPECT_CALL(*mock_network_library_, FindEthernetDevice())
110 .Times(AnyNumber()) 110 .Times(AnyNumber())
111 .WillRepeatedly((Return((const NetworkDevice*)(NULL)))); 111 .WillRepeatedly((Return((const NetworkDevice*)(NULL))));
112 EXPECT_CALL(*mock_network_library_, ethernet_available()) 112 EXPECT_CALL(*mock_network_library_, ethernet_available())
113 .Times(AnyNumber()) 113 .Times(AnyNumber())
114 .WillRepeatedly((Return(true))); 114 .WillRepeatedly((Return(true)));
115 EXPECT_CALL(*mock_network_library_, wifi_available()) 115 EXPECT_CALL(*mock_network_library_, wifi_available())
116 .Times(AnyNumber()) 116 .Times(AnyNumber())
117 .WillRepeatedly((Return(false))); 117 .WillRepeatedly((Return(false)));
118 EXPECT_CALL(*mock_network_library_, wimax_available())
119 .Times(AnyNumber())
120 .WillRepeatedly((Return(false)));
118 EXPECT_CALL(*mock_network_library_, cellular_available()) 121 EXPECT_CALL(*mock_network_library_, cellular_available())
119 .Times(AnyNumber()) 122 .Times(AnyNumber())
120 .WillRepeatedly((Return(false))); 123 .WillRepeatedly((Return(false)));
121 EXPECT_CALL(*mock_network_library_, ethernet_enabled()) 124 EXPECT_CALL(*mock_network_library_, ethernet_enabled())
122 .Times(AnyNumber()) 125 .Times(AnyNumber())
123 .WillRepeatedly((Return(true))); 126 .WillRepeatedly((Return(true)));
124 EXPECT_CALL(*mock_network_library_, wifi_enabled()) 127 EXPECT_CALL(*mock_network_library_, wifi_enabled())
125 .Times(AnyNumber()) 128 .Times(AnyNumber())
126 .WillRepeatedly((Return(false))); 129 .WillRepeatedly((Return(false)));
130 EXPECT_CALL(*mock_network_library_, wimax_enabled())
131 .Times(AnyNumber())
132 .WillRepeatedly((Return(false)));
127 EXPECT_CALL(*mock_network_library_, cellular_enabled()) 133 EXPECT_CALL(*mock_network_library_, cellular_enabled())
128 .Times(AnyNumber()) 134 .Times(AnyNumber())
129 .WillRepeatedly((Return(false))); 135 .WillRepeatedly((Return(false)));
130 EXPECT_CALL(*mock_network_library_, active_network()) 136 EXPECT_CALL(*mock_network_library_, active_network())
131 .Times(AnyNumber()) 137 .Times(AnyNumber())
132 .WillRepeatedly((Return((const Network*)(NULL)))); 138 .WillRepeatedly((Return((const Network*)(NULL))));
133 EXPECT_CALL(*mock_network_library_, ethernet_network()) 139 EXPECT_CALL(*mock_network_library_, ethernet_network())
134 .Times(AnyNumber()) 140 .Times(AnyNumber())
135 .WillRepeatedly((Return((const EthernetNetwork*)(NULL)))); 141 .WillRepeatedly((Return((const EthernetNetwork*)(NULL))));
136 EXPECT_CALL(*mock_network_library_, wifi_network()) 142 EXPECT_CALL(*mock_network_library_, wifi_network())
137 .Times(AnyNumber()) 143 .Times(AnyNumber())
138 .WillRepeatedly((Return((const WifiNetwork*)(NULL)))); 144 .WillRepeatedly((Return((const WifiNetwork*)(NULL))));
145 EXPECT_CALL(*mock_network_library_, wimax_network())
146 .Times(AnyNumber())
147 .WillRepeatedly((Return((const WimaxNetwork*)(NULL))));
148 EXPECT_CALL(*mock_network_library_, mobile_network())
149 .Times(AnyNumber())
150 .WillRepeatedly((Return((const Network*)(NULL))));
139 EXPECT_CALL(*mock_network_library_, cellular_network()) 151 EXPECT_CALL(*mock_network_library_, cellular_network())
140 .Times(AnyNumber()) 152 .Times(AnyNumber())
141 .WillRepeatedly((Return((const CellularNetwork*)(NULL)))); 153 .WillRepeatedly((Return((const CellularNetwork*)(NULL))));
142 EXPECT_CALL(*mock_network_library_, virtual_network()) 154 EXPECT_CALL(*mock_network_library_, virtual_network())
143 .Times(AnyNumber()) 155 .Times(AnyNumber())
144 .WillRepeatedly((Return((const VirtualNetwork*)(NULL)))); 156 .WillRepeatedly((Return((const VirtualNetwork*)(NULL))));
145 EXPECT_CALL(*mock_network_library_, wifi_networks()) 157 EXPECT_CALL(*mock_network_library_, wifi_networks())
146 .Times(AnyNumber()) 158 .Times(AnyNumber())
147 .WillRepeatedly((ReturnRef(wifi_networks_))); 159 .WillRepeatedly((ReturnRef(wifi_networks_)));
160 EXPECT_CALL(*mock_network_library_, wimax_networks())
161 .Times(AnyNumber())
162 .WillRepeatedly((ReturnRef(wimax_networks_)));
148 EXPECT_CALL(*mock_network_library_, cellular_networks()) 163 EXPECT_CALL(*mock_network_library_, cellular_networks())
149 .Times(AnyNumber()) 164 .Times(AnyNumber())
150 .WillRepeatedly((ReturnRef(cellular_networks_))); 165 .WillRepeatedly((ReturnRef(cellular_networks_)));
151 EXPECT_CALL(*mock_network_library_, virtual_networks()) 166 EXPECT_CALL(*mock_network_library_, virtual_networks())
152 .Times(AnyNumber()) 167 .Times(AnyNumber())
153 .WillRepeatedly((ReturnRef(virtual_networks_))); 168 .WillRepeatedly((ReturnRef(virtual_networks_)));
154 EXPECT_CALL(*mock_network_library_, connected_network()) 169 EXPECT_CALL(*mock_network_library_, connected_network())
155 .Times(AnyNumber()) 170 .Times(AnyNumber())
156 .WillRepeatedly((Return((const Network*)(NULL)))); 171 .WillRepeatedly((Return((const Network*)(NULL))));
157 EXPECT_CALL(*mock_network_library_, connecting_network()) 172 EXPECT_CALL(*mock_network_library_, connecting_network())
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // Prevent bogus gMock leak check from firing. 211 // Prevent bogus gMock leak check from firing.
197 if (loader_) 212 if (loader_)
198 test_api()->SetLibraryLoader(NULL, false); 213 test_api()->SetLibraryLoader(NULL, false);
199 if (mock_cryptohome_library_) 214 if (mock_cryptohome_library_)
200 test_api()->SetCryptohomeLibrary(NULL, false); 215 test_api()->SetCryptohomeLibrary(NULL, false);
201 if (mock_network_library_) 216 if (mock_network_library_)
202 test_api()->SetNetworkLibrary(NULL, false); 217 test_api()->SetNetworkLibrary(NULL, false);
203 } 218 }
204 219
205 } // namespace chromeos 220 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/cros_mock.h ('k') | chrome/browser/chromeos/cros/network_library_impl_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698