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

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

Issue 16196006: Move common default expectations for network library to CrosMock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 7 years, 6 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 | « no previous file | chrome/browser/chromeos/login/existing_user_controller_browsertest.cc » ('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) 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 "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_network_library.h" 10 #include "chrome/browser/chromeos/cros/mock_network_library.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 .WillRepeatedly((Return((const Network*)(NULL)))); 149 .WillRepeatedly((Return((const Network*)(NULL))));
150 EXPECT_CALL(*mock_network_library_, virtual_network_connected()) 150 EXPECT_CALL(*mock_network_library_, virtual_network_connected())
151 .Times(AnyNumber()) 151 .Times(AnyNumber())
152 .WillRepeatedly((Return(false))); 152 .WillRepeatedly((Return(false)));
153 EXPECT_CALL(*mock_network_library_, wifi_scanning()) 153 EXPECT_CALL(*mock_network_library_, wifi_scanning())
154 .Times(AnyNumber()) 154 .Times(AnyNumber())
155 .WillRepeatedly((Return(false))); 155 .WillRepeatedly((Return(false)));
156 EXPECT_CALL(*mock_network_library_, cellular_initializing()) 156 EXPECT_CALL(*mock_network_library_, cellular_initializing())
157 .Times(AnyNumber()) 157 .Times(AnyNumber())
158 .WillRepeatedly((Return(false))); 158 .WillRepeatedly((Return(false)));
159 EXPECT_CALL(*mock_network_library_, AddUserActionObserver(_))
160 .Times(AnyNumber());
161 EXPECT_CALL(*mock_network_library_, LoadOncNetworks(_, _))
162 .Times(AnyNumber());
159 163
160 // Set specific expectations for interesting functions: 164 // Set specific expectations for interesting functions:
161 165
162 // NetworkMenuButton::OnNetworkChanged() calls: 166 // NetworkMenuButton::OnNetworkChanged() calls:
163 EXPECT_CALL(*mock_network_library_, Connected()) 167 EXPECT_CALL(*mock_network_library_, Connected())
164 .Times(AnyNumber()) 168 .Times(AnyNumber())
165 .WillRepeatedly((Return(false))) 169 .WillRepeatedly((Return(false)))
166 .RetiresOnSaturation(); 170 .RetiresOnSaturation();
167 EXPECT_CALL(*mock_network_library_, Connecting()) 171 EXPECT_CALL(*mock_network_library_, Connecting())
168 .Times(AnyNumber()) 172 .Times(AnyNumber())
(...skipping 19 matching lines...) Expand all
188 .RetiresOnSaturation(); 192 .RetiresOnSaturation();
189 } 193 }
190 194
191 void CrosMock::TearDownMocks() { 195 void CrosMock::TearDownMocks() {
192 // Prevent bogus gMock leak check from firing. 196 // Prevent bogus gMock leak check from firing.
193 if (mock_network_library_) 197 if (mock_network_library_)
194 test_api()->SetNetworkLibrary(NULL, false); 198 test_api()->SetNetworkLibrary(NULL, false);
195 } 199 }
196 200
197 } // namespace chromeos 201 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/existing_user_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698