OLD | NEW |
---|---|
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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 .WillRepeatedly(Return(false)); | 69 .WillRepeatedly(Return(false)); |
70 EXPECT_CALL(*mock_network_library_, ethernet_connecting()) | 70 EXPECT_CALL(*mock_network_library_, ethernet_connecting()) |
71 .Times(2) | 71 .Times(2) |
72 .WillRepeatedly(Return(false)); | 72 .WillRepeatedly(Return(false)); |
73 EXPECT_CALL(*mock_network_library_, wifi_connected()) | 73 EXPECT_CALL(*mock_network_library_, wifi_connected()) |
74 .Times(1) | 74 .Times(1) |
75 .WillRepeatedly(Return(false)); | 75 .WillRepeatedly(Return(false)); |
76 EXPECT_CALL(*mock_network_library_, cellular_connected()) | 76 EXPECT_CALL(*mock_network_library_, cellular_connected()) |
77 .Times(1) | 77 .Times(1) |
78 .WillRepeatedly(Return(false)); | 78 .WillRepeatedly(Return(false)); |
79 EXPECT_CALL(*mock_network_library_, FindWifiDevice()).Times(AnyNumber()); | |
stevenjb
2011/04/26 17:05:08
nit: we generally put each .Times, etc on a new li
Denis Lagno
2011/04/26 18:04:09
Done.
| |
80 EXPECT_CALL(*mock_network_library_, FindEthernetDevice()) | |
81 .Times(AnyNumber()); | |
79 | 82 |
80 cros_mock_->SetStatusAreaMocksExpectations(); | 83 cros_mock_->SetStatusAreaMocksExpectations(); |
81 | 84 |
82 // Override these return values, but do not set specific expectation: | 85 // Override these return values, but do not set specific expectation: |
83 EXPECT_CALL(*mock_network_library_, wifi_available()) | 86 EXPECT_CALL(*mock_network_library_, wifi_available()) |
84 .Times(AnyNumber()) | 87 .Times(AnyNumber()) |
85 .WillRepeatedly((Return(true))); | 88 .WillRepeatedly((Return(true))); |
86 EXPECT_CALL(*mock_network_library_, wifi_enabled()) | 89 EXPECT_CALL(*mock_network_library_, wifi_enabled()) |
87 .Times(AnyNumber()) | 90 .Times(AnyNumber()) |
88 .WillRepeatedly((Return(true))); | 91 .WillRepeatedly((Return(true))); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 EXPECT_FALSE(network_view->IsConnecting()); | 289 EXPECT_FALSE(network_view->IsConnecting()); |
287 network_screen->OnConnectionTimeout(); | 290 network_screen->OnConnectionTimeout(); |
288 | 291 |
289 // Close infobubble with error message - it makes the test stable. | 292 // Close infobubble with error message - it makes the test stable. |
290 EXPECT_FALSE(network_view->IsContinueEnabled()); | 293 EXPECT_FALSE(network_view->IsContinueEnabled()); |
291 EXPECT_FALSE(network_view->IsConnecting()); | 294 EXPECT_FALSE(network_view->IsConnecting()); |
292 network_screen->ClearErrors(); | 295 network_screen->ClearErrors(); |
293 } | 296 } |
294 | 297 |
295 } // namespace chromeos | 298 } // namespace chromeos |
OLD | NEW |