shill: Update properties of all interfaces when creating a Cellular device.

The CL modifies Modem::CreateDeviceFromModemProperties to update
properties of all modem interfaces (e.g. Modem, Modem.Modem3gpp, etc)
instead of the Modem interface when creating a Cellular device instance.
This ensures that the created Cellular device has the correct
registration states.

BUG=chromium-os:34882
TEST=Tested the following:
1. Build and run unit tests.
2. Run network_3GModemControl.no-autoconnect test on Gobi 3000 and
   Icera Y3400 modem.

Change-Id: I49f9d216abded5ae0baa019df81fbbebcd134f57
Reviewed-on: https://gerrit.chromium.org/gerrit/34300
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
diff --git a/modem_unittest.cc b/modem_unittest.cc
index e010bcd..5023e45 100644
--- a/modem_unittest.cc
+++ b/modem_unittest.cc
@@ -132,8 +132,9 @@
   static const char kSentinel[] = "sentinel";
   static const uint32 kSentinelValue = 17;
 
-  DBusPropertiesMap properties;
-  properties[kSentinel].writer().append_uint32(kSentinelValue);
+  DBusInterfaceToProperties properties;
+  properties[MM_MODEM_INTERFACE][kSentinel].writer().append_uint32(
+      kSentinelValue);
 
   EXPECT_CALL(*modem_, GetLinkName(_, _)).WillRepeatedly(DoAll(
       SetArgumentPointee<1>(string(kLinkName)),
@@ -200,9 +201,17 @@
 }
 
 TEST_F(ModemTest, CreateDeviceEarlyFailures) {
-  DBusPropertiesMap properties;
+  DBusInterfaceToProperties properties;
 
   EXPECT_CALL(*modem_, ConstructCellular(_, _, _)).Times(0);
+  EXPECT_CALL(*modem_, GetModemInterface()).
+      WillRepeatedly(Return(MM_MODEM_INTERFACE));
+
+  // No modem interface properties:  no device created
+  modem_->CreateDeviceFromModemProperties(properties);
+  EXPECT_FALSE(modem_->device_.get());
+
+  properties[MM_MODEM_INTERFACE] = DBusPropertiesMap();
 
   // No link name:  no device created
   EXPECT_CALL(*modem_, GetLinkName(_, _)).WillOnce(Return(false));