shill: cellular: Sid belonging to an unknown carrier should be visible.

CellularCapabilityUniversalCDMA will know expose the SID of an unknown
carrier as part of the Cellular.ServingOperator property. If there is no
match for the SID in the database, the "name" and "country" fields of
|serving_operator_| will be cleared.

BUG=chromium:274835
TEST=Build and run unit tests.

Change-Id: If485b8e53bbd6b84b14fecbf10d3765c909686ee
Reviewed-on: https://gerrit.chromium.org/gerrit/66148
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
diff --git a/cellular_capability_universal_cdma_unittest.cc b/cellular_capability_universal_cdma_unittest.cc
index f296814..49d15a6 100644
--- a/cellular_capability_universal_cdma_unittest.cc
+++ b/cellular_capability_universal_cdma_unittest.cc
@@ -294,7 +294,7 @@
       .WillOnce(Return((const CellularOperatorInfo::CellularOperator *)NULL));
 
   capability_->UpdateOperatorInfo();
-  EXPECT_EQ("", capability_->provider_.GetCode());
+  EXPECT_EQ("1", capability_->provider_.GetCode());
   EXPECT_EQ("", capability_->provider_.GetName());
   EXPECT_EQ("", capability_->provider_.GetCountry());
   EXPECT_TRUE(capability_->activation_code_.empty());
@@ -324,6 +324,18 @@
   EXPECT_EQ("Test", cellular_->service()->serving_operator().GetName());
   EXPECT_EQ("us", cellular_->service()->serving_operator().GetCountry());
   EXPECT_EQ("Test", cellular_->service()->friendly_name());
+
+  capability_->sid_ = 1;
+  EXPECT_CALL(*modem_info_.mock_cellular_operator_info(),
+              GetCellularOperatorBySID(_))
+      .WillOnce(Return(nullptr));
+
+  capability_->UpdateOperatorInfo();
+  EXPECT_EQ("1", capability_->provider_.GetCode());
+  EXPECT_EQ("", capability_->provider_.GetName());
+  EXPECT_EQ("", capability_->provider_.GetCountry());
+  EXPECT_TRUE(capability_->activation_code_.empty());
+
 }
 
 TEST_F(CellularCapabilityUniversalCDMAMainTest, CreateFriendlyServiceName) {