shill: vpn: Spawn the OpenVPN process when tunnel index becomes available.
BUG=chromium-os:27373
TEST=unit tests
Change-Id: Ie946e4275beff4d5ac176413cc219dbe52356b28
Reviewed-on: https://gerrit.chromium.org/gerrit/17407
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/mock_vpn.h b/mock_vpn.h
new file mode 100644
index 0000000..37ab936
--- /dev/null
+++ b/mock_vpn.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SHILL_MOCK_VPN_
+#define SHILL_MOCK_VPN_
+
+#include <gmock/gmock.h>
+
+#include "shill/vpn.h"
+
+namespace shill {
+
+class MockVPN : public VPN {
+ public:
+ MockVPN(ControlInterface *control,
+ EventDispatcher *dispatcher,
+ Metrics *metrics,
+ Manager *manager,
+ const std::string &link_name,
+ int interface_index);
+ virtual ~MockVPN();
+
+ MOCK_METHOD0(Stop, void());
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockVPN);
+};
+
+} // namespace shill
+
+#endif // SHILL_MOCK_VPN_