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

Unified Diff: chrome/browser/chromeos/cros/cros_mock.cc

Issue 4482003: Landing change for ers@chromium.org: http://codereview.chromium.org/4134012/s... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/chromeos/cros/mock_network_library.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/cros_mock.cc
===================================================================
--- chrome/browser/chromeos/cros/cros_mock.cc (revision 65103)
+++ chrome/browser/chromeos/cros/cros_mock.cc (working copy)
@@ -29,6 +29,7 @@
namespace chromeos {
using ::testing::AnyNumber;
+using ::testing::AtMost;
using ::testing::InSequence;
using ::testing::InvokeWithoutArgs;
using ::testing::Return;
@@ -269,33 +270,28 @@
}
void CrosMock::SetNetworkLibraryStatusAreaExpectations() {
- EXPECT_CALL(*mock_network_library_, AddObserver(_))
+ EXPECT_CALL(*mock_network_library_, AddNetworkManagerObserver(_))
.Times(1)
.RetiresOnSaturation();
-
- // NetworkDropdownButton::NetworkChanged() calls:
- EXPECT_CALL(*mock_network_library_, ethernet_connected())
+ EXPECT_CALL(*mock_network_library_, AddCellularDataPlanObserver(_))
.Times(1)
- .WillRepeatedly((Return(false)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_network_library_, wifi_connected())
+
+ // NetworkMenuButton::OnNetworkManagerChanged() calls:
+ EXPECT_CALL(*mock_network_library_, active_network())
.Times(1)
- .WillRepeatedly((Return(false)))
+ .WillRepeatedly((Return((const Network*)(NULL))))
.RetiresOnSaturation();
EXPECT_CALL(*mock_network_library_, wifi_connecting())
.Times(1)
.WillRepeatedly((Return(false)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_network_library_, cellular_connected())
- .Times(1)
- .WillRepeatedly((Return(false)))
- .RetiresOnSaturation();
EXPECT_CALL(*mock_network_library_, cellular_connecting())
.Times(1)
.WillRepeatedly((Return(false)))
.RetiresOnSaturation();
EXPECT_CALL(*mock_network_library_, Connected())
- .Times(1)
+ .Times(2)
.WillRepeatedly((Return(false)))
.RetiresOnSaturation();
EXPECT_CALL(*mock_network_library_, Connecting())
@@ -325,9 +321,15 @@
.WillRepeatedly((Return(false)))
.RetiresOnSaturation();
- EXPECT_CALL(*mock_network_library_, RemoveObserver(_))
+ EXPECT_CALL(*mock_network_library_, RemoveNetworkManagerObserver(_))
.Times(1)
.RetiresOnSaturation();
+ EXPECT_CALL(*mock_network_library_, RemoveObserverForAllNetworks(_))
+ .Times(1)
+ .RetiresOnSaturation();
+ EXPECT_CALL(*mock_network_library_, RemoveCellularDataPlanObserver(_))
+ .Times(1)
+ .RetiresOnSaturation();
}
void CrosMock::SetPowerLibraryStatusAreaExpectations() {
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/chromeos/cros/mock_network_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698