shill: vpn: Associate VPN device with service and update IP configuration.
BUG=chromium-os:27384,chromium-os:27385
TEST=unit tests
Change-Id: I5b35bebeadd25f50f7044d2e4ec5bc121a56835e
Reviewed-on: https://gerrit.chromium.org/gerrit/17488
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/device_unittest.cc b/device_unittest.cc
index 90dadf0..180c12a 100644
--- a/device_unittest.cc
+++ b/device_unittest.cc
@@ -75,8 +75,8 @@
static const char kDeviceName[];
static const char kDeviceAddress[];
- void IPConfigUpdatedCallback(const IPConfigRefPtr &ipconfig, bool success) {
- device_->IPConfigUpdatedCallback(ipconfig, success);
+ void OnIPConfigUpdated(const IPConfigRefPtr &ipconfig, bool success) {
+ device_->OnIPConfigUpdated(ipconfig, success);
}
void SelectService(const ServiceRefPtr service) {
@@ -280,7 +280,7 @@
SelectService(service);
EXPECT_CALL(*service.get(), SetState(Service::kStateDisconnected));
EXPECT_CALL(*service.get(), SetConnection(IsNullRefPtr()));
- IPConfigUpdatedCallback(NULL, false);
+ OnIPConfigUpdated(NULL, false);
}
TEST_F(DeviceTest, IPConfigUpdatedSuccess) {
@@ -297,7 +297,7 @@
.WillRepeatedly(Return(true));
EXPECT_CALL(*service.get(), SetState(Service::kStateOnline));
EXPECT_CALL(*service.get(), SetConnection(NotNullRefPtr()));
- IPConfigUpdatedCallback(ipconfig.get(), true);
+ OnIPConfigUpdated(ipconfig.get(), true);
}
TEST_F(DeviceTest, Stop) {