shill: vpn: Register L2TP/IPSec properties.

Also, add some sanity tests for property store setup in VPNDriver subclasses.

BUG=chromium-os:29362,chromium-os:29363
TEST=unit tests

Change-Id: I144b9b810d201655e872558d29df2394ce5b345a
Reviewed-on: https://gerrit.chromium.org/gerrit/20839
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/l2tp_ipsec_driver_unittest.cc b/l2tp_ipsec_driver_unittest.cc
index d3daa75..e231d92 100644
--- a/l2tp_ipsec_driver_unittest.cc
+++ b/l2tp_ipsec_driver_unittest.cc
@@ -59,6 +59,10 @@
     driver_->args_.SetString(arg, value);
   }
 
+  KeyValueStore *GetArgs() {
+    return driver_->args();
+  }
+
   // Used to assert that a flag appears in the options.
   void ExpectInFlags(const vector<string> &options, const string &flag,
                      const string &value);
@@ -363,4 +367,16 @@
   EXPECT_TRUE(error.IsSuccess());
 }
 
+TEST_F(L2TPIPSecDriverTest, InitPropertyStore) {
+  // Sanity test property store initialization.
+  PropertyStore store;
+  driver_->InitPropertyStore(&store);
+  const string kUser = "joe";
+  Error error;
+  EXPECT_TRUE(
+      store.SetStringProperty(flimflam::kL2tpIpsecUserProperty, kUser, &error));
+  EXPECT_TRUE(error.IsSuccess());
+  EXPECT_EQ(kUser, GetArgs()->GetString(flimflam::kL2tpIpsecUserProperty));
+}
+
 }  // namespace shill