Chromium Code Reviews

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

Issue 3158014: Added tooltips to stats bar items. (Closed)
Patch Set: Fixed browser tests. Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/login/login_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) 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 290 matching lines...)
301 EXPECT_CALL(*mock_network_library_, RemoveObserver(_)) 301 EXPECT_CALL(*mock_network_library_, RemoveObserver(_))
302 .Times(1) 302 .Times(1)
303 .RetiresOnSaturation(); 303 .RetiresOnSaturation();
304 } 304 }
305 305
306 void CrosMock::SetPowerLibraryStatusAreaExpectations() { 306 void CrosMock::SetPowerLibraryStatusAreaExpectations() {
307 EXPECT_CALL(*mock_power_library_, AddObserver(_)) 307 EXPECT_CALL(*mock_power_library_, AddObserver(_))
308 .Times(1) 308 .Times(1)
309 .RetiresOnSaturation(); 309 .RetiresOnSaturation();
310 EXPECT_CALL(*mock_power_library_, battery_fully_charged()) 310 EXPECT_CALL(*mock_power_library_, battery_fully_charged())
311 .Times(3) 311 .Times(1)
312 .WillRepeatedly((Return(false))) 312 .WillRepeatedly((Return(false)))
313 .RetiresOnSaturation(); 313 .RetiresOnSaturation();
314 EXPECT_CALL(*mock_power_library_, battery_is_present()) 314 EXPECT_CALL(*mock_power_library_, battery_is_present())
315 .Times(1) 315 .Times(1)
316 .WillOnce((Return(true))) 316 .WillOnce((Return(true)))
317 .RetiresOnSaturation(); 317 .RetiresOnSaturation();
318 EXPECT_CALL(*mock_power_library_, battery_percentage()) 318 EXPECT_CALL(*mock_power_library_, battery_percentage())
319 .Times(2) 319 .Times(1)
320 .WillRepeatedly((Return(42.0))) 320 .WillRepeatedly((Return(42.0)))
321 .RetiresOnSaturation(); 321 .RetiresOnSaturation();
322 EXPECT_CALL(*mock_power_library_, line_power_on()) 322 EXPECT_CALL(*mock_power_library_, line_power_on())
323 .Times(4) 323 .Times(1)
324 .WillRepeatedly((Return(false))) 324 .WillRepeatedly((Return(false)))
325 .RetiresOnSaturation(); 325 .RetiresOnSaturation();
326 EXPECT_CALL(*mock_power_library_, battery_time_to_empty()) 326 EXPECT_CALL(*mock_power_library_, battery_time_to_empty())
327 .Times(1) 327 .Times(1)
328 .WillOnce((Return(base::TimeDelta::FromMinutes(42)))) 328 .WillRepeatedly((Return(base::TimeDelta::FromMinutes(42))))
329 .RetiresOnSaturation();
330 EXPECT_CALL(*mock_power_library_, battery_time_to_full())
331 .Times(1)
332 .WillRepeatedly((Return(base::TimeDelta::FromMinutes(24))))
329 .RetiresOnSaturation(); 333 .RetiresOnSaturation();
330 EXPECT_CALL(*mock_power_library_, RemoveObserver(_)) 334 EXPECT_CALL(*mock_power_library_, RemoveObserver(_))
331 .Times(1) 335 .Times(1)
332 .RetiresOnSaturation(); 336 .RetiresOnSaturation();
333 } 337 }
334 338
335 void CrosMock::SetSpeechSynthesisLibraryExpectations() { 339 void CrosMock::SetSpeechSynthesisLibraryExpectations() {
336 EXPECT_CALL(*mock_speech_synthesis_library_, Speak(_)) 340 EXPECT_CALL(*mock_speech_synthesis_library_, Speak(_))
337 .Times(1) 341 .Times(1)
338 .WillOnce(Return(true)) 342 .WillOnce(Return(true))
(...skipping 52 matching lines...)
391 test_api()->SetScreenLockLibrary(NULL, false); 395 test_api()->SetScreenLockLibrary(NULL, false);
392 if (mock_speech_synthesis_library_) 396 if (mock_speech_synthesis_library_)
393 test_api()->SetSpeechSynthesisLibrary(NULL, false); 397 test_api()->SetSpeechSynthesisLibrary(NULL, false);
394 if (mock_synaptics_library_) 398 if (mock_synaptics_library_)
395 test_api()->SetSynapticsLibrary(NULL, false); 399 test_api()->SetSynapticsLibrary(NULL, false);
396 if (mock_system_library_) 400 if (mock_system_library_)
397 test_api()->SetSystemLibrary(NULL, false); 401 test_api()->SetSystemLibrary(NULL, false);
398 } 402 }
399 403
400 } // namespace chromeos 404 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/login/login_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine