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

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

Issue 4136002: Add 3G Activation to the network menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added else {} Created 10 years, 1 month 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 | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/status/network_menu.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/ref_counted.h" 8 #include "base/ref_counted.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 .RetiresOnSaturation(); 267 .RetiresOnSaturation();
268 } 268 }
269 269
270 void CrosMock::SetNetworkLibraryStatusAreaExpectations() { 270 void CrosMock::SetNetworkLibraryStatusAreaExpectations() {
271 EXPECT_CALL(*mock_network_library_, AddObserver(_)) 271 EXPECT_CALL(*mock_network_library_, AddObserver(_))
272 .Times(1) 272 .Times(1)
273 .RetiresOnSaturation(); 273 .RetiresOnSaturation();
274 274
275 // NetworkDropdownButton::NetworkChanged() calls: 275 // NetworkDropdownButton::NetworkChanged() calls:
276 EXPECT_CALL(*mock_network_library_, ethernet_connected()) 276 EXPECT_CALL(*mock_network_library_, ethernet_connected())
277 .Times(2) // also called by NetworkMenu::InitMenuItems() 277 .Times(1)
278 .WillRepeatedly((Return(false))) 278 .WillRepeatedly((Return(false)))
279 .RetiresOnSaturation(); 279 .RetiresOnSaturation();
280 EXPECT_CALL(*mock_network_library_, wifi_connected()) 280 EXPECT_CALL(*mock_network_library_, wifi_connected())
281 .Times(1) 281 .Times(1)
282 .WillRepeatedly((Return(false))) 282 .WillRepeatedly((Return(false)))
283 .RetiresOnSaturation(); 283 .RetiresOnSaturation();
284 EXPECT_CALL(*mock_network_library_, wifi_connecting()) 284 EXPECT_CALL(*mock_network_library_, wifi_connecting())
285 .Times(1) 285 .Times(1)
286 .WillRepeatedly((Return(false))) 286 .WillRepeatedly((Return(false)))
287 .RetiresOnSaturation(); 287 .RetiresOnSaturation();
288 EXPECT_CALL(*mock_network_library_, cellular_connected()) 288 EXPECT_CALL(*mock_network_library_, cellular_connected())
289 .Times(1) 289 .Times(1)
290 .WillRepeatedly((Return(false))) 290 .WillRepeatedly((Return(false)))
291 .RetiresOnSaturation(); 291 .RetiresOnSaturation();
292 EXPECT_CALL(*mock_network_library_, cellular_connecting()) 292 EXPECT_CALL(*mock_network_library_, cellular_connecting())
293 .Times(1) 293 .Times(1)
294 .WillRepeatedly((Return(false))) 294 .WillRepeatedly((Return(false)))
295 .RetiresOnSaturation(); 295 .RetiresOnSaturation();
296 EXPECT_CALL(*mock_network_library_, Connected()) 296 EXPECT_CALL(*mock_network_library_, Connected())
297 .Times(2) // also called by NetworkMenu::InitMenuItems() 297 .Times(1)
298 .WillRepeatedly((Return(false))) 298 .WillRepeatedly((Return(false)))
299 .RetiresOnSaturation(); 299 .RetiresOnSaturation();
300 EXPECT_CALL(*mock_network_library_, Connecting()) 300 EXPECT_CALL(*mock_network_library_, Connecting())
301 .Times(1) 301 .Times(1)
302 .WillRepeatedly((Return(false))) 302 .WillRepeatedly((Return(false)))
303 .RetiresOnSaturation(); 303 .RetiresOnSaturation();
304 304
305 // NetworkMenu::InitMenuItems() calls: 305 // NetworkMenu::InitMenuItems() calls:
306 EXPECT_CALL(*mock_network_library_, ethernet_available())
307 .Times(1)
308 .WillRepeatedly((Return(true)))
309 .RetiresOnSaturation();
310 EXPECT_CALL(*mock_network_library_, ethernet_connected())
311 .Times(1)
312 .WillRepeatedly((Return(false)))
313 .RetiresOnSaturation();
306 EXPECT_CALL(*mock_network_library_, ethernet_connecting()) 314 EXPECT_CALL(*mock_network_library_, ethernet_connecting())
307 .Times(1) 315 .Times(1)
308 .WillRepeatedly((Return(false))) 316 .WillRepeatedly((Return(false)))
309 .RetiresOnSaturation(); 317 .RetiresOnSaturation();
310 EXPECT_CALL(*mock_network_library_, wifi_networks())
311 .Times(1)
312 .WillRepeatedly((ReturnRef(wifi_networks_)))
313 .RetiresOnSaturation();
314 EXPECT_CALL(*mock_network_library_, wifi_available()) 318 EXPECT_CALL(*mock_network_library_, wifi_available())
315 .Times(1) 319 .Times(1)
316 .WillRepeatedly((Return(false))) 320 .WillRepeatedly((Return(false)))
317 .RetiresOnSaturation(); 321 .RetiresOnSaturation();
318 EXPECT_CALL(*mock_network_library_, wifi_network())
319 .Times(1)
320 .WillRepeatedly((ReturnRef(wifi_network_)))
321 .RetiresOnSaturation();
322 EXPECT_CALL(*mock_network_library_, cellular_networks())
323 .Times(1)
324 .WillRepeatedly((ReturnRef(cellular_networks_)))
325 .RetiresOnSaturation();
326 EXPECT_CALL(*mock_network_library_, cellular_network())
327 .Times(1)
328 .WillRepeatedly((ReturnRef(cellular_network_)))
329 .RetiresOnSaturation();
330 EXPECT_CALL(*mock_network_library_, cellular_available()) 322 EXPECT_CALL(*mock_network_library_, cellular_available())
331 .Times(1) 323 .Times(1)
332 .WillRepeatedly((Return(false))) 324 .WillRepeatedly((Return(false)))
333 .RetiresOnSaturation(); 325 .RetiresOnSaturation();
334 326
335 EXPECT_CALL(*mock_network_library_, RemoveObserver(_)) 327 EXPECT_CALL(*mock_network_library_, RemoveObserver(_))
336 .Times(1) 328 .Times(1)
337 .RetiresOnSaturation(); 329 .RetiresOnSaturation();
338 } 330 }
339 331
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 test_api()->SetScreenLockLibrary(NULL, false); 428 test_api()->SetScreenLockLibrary(NULL, false);
437 if (mock_speech_synthesis_library_) 429 if (mock_speech_synthesis_library_)
438 test_api()->SetSpeechSynthesisLibrary(NULL, false); 430 test_api()->SetSpeechSynthesisLibrary(NULL, false);
439 if (mock_system_library_) 431 if (mock_system_library_)
440 test_api()->SetSystemLibrary(NULL, false); 432 test_api()->SetSystemLibrary(NULL, false);
441 if (mock_touchpad_library_) 433 if (mock_touchpad_library_)
442 test_api()->SetTouchpadLibrary(NULL, false); 434 test_api()->SetTouchpadLibrary(NULL, false);
443 } 435 }
444 436
445 } // namespace chromeos 437 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/status/network_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698