Lines Matching refs:device_
95 device_(new Cellular(&modem_info_, in CellularPropertyTest()
106 DeviceRefPtr device_; member in shill::CellularPropertyTest
110 EXPECT_TRUE(device_->store().Contains(kNameProperty)); in TEST_F()
111 EXPECT_FALSE(device_->store().Contains("")); in TEST_F()
118 EXPECT_TRUE(device_->mutable_store()->SetAnyProperty( in TEST_F()
124 EXPECT_FALSE(device_->mutable_store()->SetAnyProperty( in TEST_F()
131 EXPECT_FALSE(device_->mutable_store()->SetAnyProperty( in TEST_F()
156 device_(new Cellular(&modem_info_, in CellularTest()
164 modem_info_.metrics()->RegisterDevice(device_->interface_index(), in CellularTest()
169 static_cast<Device*>(device_.get())->rtnl_handler_ = &rtnl_handler_; in SetUp()
170 device_->set_dhcp_provider(&dhcp_provider_); in SetUp()
171 device_->process_manager_ = &process_manager_; in SetUp()
179 device_->DestroyIPConfig(); in TearDown()
180 device_->state_ = Cellular::kStateDisabled; in TearDown()
181 device_->capability_->ReleaseProxies(); in TearDown()
182 device_->set_dhcp_provider(nullptr); in TearDown()
184 device_->service_ = nullptr; in TearDown()
185 device_->SelectService(nullptr); in TearDown()
204 device_->set_home_provider_info(mock_home_provider_info_); in SetMockMobileOperatorInfoObjects()
209 device_->set_serving_operator_info(mock_serving_operator_info_); in SetMockMobileOperatorInfoObjects()
293 EXPECT_EQ(Service::kStateAssociating, device_->service_->state()); in InvokeConnect()
298 EXPECT_EQ(Service::kStateAssociating, device_->service_->state()); in InvokeConnectFail()
303 device_->service_ = nullptr; in InvokeConnectFailNoService()
309 device_->service_ = nullptr; in InvokeConnectSuccessNoService()
335 if (!device_->IsUnderlyingDeviceEnabled()) in ExpectCdmaStartModem()
360 device_->state_ = Cellular::kStateConnected; in ExpectDisconnectCapabilityUniversal()
368 EXPECT_EQ(Cellular::kStateRegistered, device_->state_); in VerifyDisconnect()
374 device_->StartPPP("fake_serial_device"); in StartPPP()
375 EXPECT_FALSE(device_->ipconfig()); // No DHCP client. in StartPPP()
376 EXPECT_FALSE(device_->selected_service()); in StartPPP()
377 EXPECT_FALSE(device_->is_ppp_authenticating_); in StartPPP()
378 EXPECT_NE(nullptr, device_->ppp_task_); in StartPPP()
388 device_->ppp_device_ = mock_ppp_device; in FakeUpConnectedPPP()
389 device_->state_ = Cellular::kStateConnected; in FakeUpConnectedPPP()
394 static_cast<MockPPPDevice*>(device_->ppp_device_.get()); in ExpectPPPStopped()
399 EXPECT_EQ(nullptr, device_->ppp_task_); in VerifyPPPStopped()
400 EXPECT_FALSE(device_->ppp_device_); in VerifyPPPStopped()
411 EXPECT_CALL(*static_cast<DeviceMockAdaptor*>(device_->adaptor()), in SetCommonOnAfterResumeExpectations()
561 device_->InitCapability(type); in SetCellularType()
566 device_->capability_.get()); in GetCapabilityClassic()
570 return static_cast<CellularCapabilityCDMA*>(device_->capability_.get()); in GetCapabilityCDMA()
574 return static_cast<CellularCapabilityGSM*>(device_->capability_.get()); in GetCapabilityGSM()
579 device_->capability_.get()); in GetCapabilityUniversal()
585 device_->service_ = new CellularService(&modem_info_, device_); in SetService()
586 return device_->service_.get(); in SetService()
589 device_->service_ = new MockCellularService(&modem_info_, device_); in SetMockService()
590 return static_cast<MockCellularService*>(device_->service_.get()); in SetMockService()
594 device_->enabled_persistent_ = new_value; in set_enabled_persistent()
625 CellularRefPtr device_; member in shill::CellularTest
699 device_->Start(&error, Bind(&CellularTest::TestCallback, Unretained(this))); in TEST_F()
701 EXPECT_EQ(kMEID, device_->meid()); in TEST_F()
702 EXPECT_EQ(kTestCarrier, device_->carrier()); in TEST_F()
703 EXPECT_EQ(Cellular::kStateRegistered, device_->state_); in TEST_F()
704 ASSERT_TRUE(device_->service_.get()); in TEST_F()
705 EXPECT_EQ(kNetworkTechnology1Xrtt, device_->service_->network_technology()); in TEST_F()
706 EXPECT_EQ(kStrength, device_->service_->strength()); in TEST_F()
707 EXPECT_EQ(kRoamingStateHome, device_->service_->roaming_state()); in TEST_F()
746 device_->Start(&error, Bind(&CellularTest::TestCallback, Unretained(this))); in TEST_F()
749 EXPECT_EQ(kIMEI, device_->imei()); in TEST_F()
750 EXPECT_EQ(kIMSI, device_->imsi()); in TEST_F()
752 EXPECT_EQ(kMSISDN, device_->mdn()); in TEST_F()
753 EXPECT_EQ(Cellular::kStateRegistered, device_->state_); in TEST_F()
754 ASSERT_TRUE(device_->service_.get()); in TEST_F()
755 EXPECT_EQ(kNetworkTechnologyEdge, device_->service_->network_technology()); in TEST_F()
757 EXPECT_EQ(kStrength, device_->service_->strength()); in TEST_F()
758 EXPECT_EQ(kRoamingStateRoaming, device_->service_->roaming_state()); in TEST_F()
762 EXPECT_CALL(device_info_, GetFlags(device_->interface_index(), _)) in TEST_F()
765 device_->set_modem_state(Cellular::kModemStateConnected); in TEST_F()
766 device_->set_meid(kMEID); in TEST_F()
769 device_->Start(&error, Bind(&CellularTest::TestCallback, Unretained(this))); in TEST_F()
772 EXPECT_EQ(Cellular::kStateConnected, device_->state_); in TEST_F()
776 EXPECT_CALL(device_info_, GetFlags(device_->interface_index(), _)) in TEST_F()
779 device_->set_modem_state(Cellular::kModemStateConnected); in TEST_F()
780 device_->set_meid(kMEID); in TEST_F()
787 device_->Start(&error, Bind(&CellularTest::TestCallback, Unretained(this))); in TEST_F()
790 EXPECT_EQ(Cellular::kStateLinked, device_->state_); in TEST_F()
791 EXPECT_EQ(Service::kStateConfiguring, device_->service_->state()); in TEST_F()
792 device_->SelectService(nullptr); in TEST_F()
804 device_->mobile_operator_info_observer_->set_capability(nullptr); in TEST_F()
811 device_->CreateService(); in TEST_F()
815 device_->service_->friendly_name().substr(0, prefix_len)); in TEST_F()
818 device_->DestroyService(); in TEST_F()
826 device_->CreateService(); in TEST_F()
834 device_->mobile_operator_info_observer_->OnOperatorChanged(); in TEST_F()
835 EXPECT_EQ(kHomeProviderName, device_->service_->friendly_name()); in TEST_F()
838 device_->DestroyService(); in TEST_F()
846 device_->CreateService(); in TEST_F()
854 device_->mobile_operator_info_observer_->OnOperatorChanged(); in TEST_F()
855 EXPECT_EQ(kServingOperatorName, device_->service_->friendly_name()); in TEST_F()
858 device_->DestroyService(); in TEST_F()
866 device_->CreateService(); in TEST_F()
874 device_->mobile_operator_info_observer_->OnOperatorChanged(); in TEST_F()
882 device_->mobile_operator_info_observer_->OnOperatorChanged(); in TEST_F()
883 EXPECT_EQ(kServingOperatorName, device_->service_->friendly_name()); in TEST_F()
886 device_->DestroyService(); in TEST_F()
894 device_->CreateService(); in TEST_F()
902 device_->mobile_operator_info_observer_->OnOperatorChanged(); in TEST_F()
910 device_->mobile_operator_info_observer_->OnOperatorChanged(); in TEST_F()
911 EXPECT_EQ(kServingOperatorName, device_->service_->friendly_name()); in TEST_F()
914 device_->DestroyService(); in TEST_F()
928 device_->CreateService(); in TEST_F()
929 EXPECT_EQ(kServingOperatorName, device_->service_->friendly_name()); in TEST_F()
948 device_->CreateService(); in TEST_F()
950 home_provider = device_->home_provider(); in TEST_F()
952 serving_operator = device_->service_->serving_operator(); in TEST_F()
956 device_->DestroyService(); in TEST_F()
972 device_->CreateService(); in TEST_F()
974 home_provider = device_->home_provider(); in TEST_F()
979 serving_operator = device_->service_->serving_operator(); in TEST_F()
986 device_->DestroyService(); in TEST_F()
1002 device_->CreateService(); in TEST_F()
1004 home_provider = device_->home_provider(); in TEST_F()
1009 serving_operator = device_->service_->serving_operator(); in TEST_F()
1016 device_->DestroyService(); in TEST_F()
1038 device_->CreateService(); in TEST_F()
1040 home_provider = device_->home_provider(); in TEST_F()
1045 serving_operator = device_->service_->serving_operator(); in TEST_F()
1076 device_->mobile_operator_info_observer_->set_capability(nullptr); in TEST_F()
1092 device_->CreateService(); in TEST_F()
1094 device_->service()->GetStorageIdentifier()); in TEST_F()
1097 device_->DestroyService(); in TEST_F()
1106 device_->CreateService(); in TEST_F()
1107 EXPECT_EQ(prefix + device_->service()->friendly_name(), in TEST_F()
1108 device_->service()->GetStorageIdentifier()); in TEST_F()
1110 device_->DestroyService(); in TEST_F()
1118 device_->CreateService(); in TEST_F()
1120 device_->service()->GetStorageIdentifier()); in TEST_F()
1122 device_->DestroyService(); in TEST_F()
1128 device_->set_sim_identifier(kSimIdentifier); in TEST_F()
1129 device_->CreateService(); in TEST_F()
1131 device_->service()->GetStorageIdentifier()); in TEST_F()
1133 device_->DestroyService(); in TEST_F()
1147 EXPECT_CALL(device_info_, GetFlags(device_->interface_index(), _)) in TEST_F()
1150 device_->state_ = Cellular::kStateConnected; in TEST_F()
1151 device_->Connect(&error); in TEST_F()
1155 device_->state_ = Cellular::kStateLinked; in TEST_F()
1156 device_->Connect(&error); in TEST_F()
1159 device_->state_ = Cellular::kStateEnabled; in TEST_F()
1160 device_->Connect(&error); in TEST_F()
1164 device_->state_ = Cellular::kStateDisabled; in TEST_F()
1165 device_->Connect(&error); in TEST_F()
1168 device_->state_ = Cellular::kStateRegistered; in TEST_F()
1171 device_->allow_roaming_ = false; in TEST_F()
1172 device_->service_->roaming_state_ = kRoamingStateRoaming; in TEST_F()
1173 device_->Connect(&error); in TEST_F()
1183 device_->service_->roaming_state_ = kRoamingStateHome; in TEST_F()
1184 device_->state_ = Cellular::kStateRegistered; in TEST_F()
1185 device_->Connect(&error); in TEST_F()
1188 EXPECT_EQ(Cellular::kStateConnected, device_->state_); in TEST_F()
1190 device_->allow_roaming_ = true; in TEST_F()
1191 device_->service_->roaming_state_ = kRoamingStateRoaming; in TEST_F()
1192 device_->state_ = Cellular::kStateRegistered; in TEST_F()
1193 device_->Connect(&error); in TEST_F()
1196 EXPECT_EQ(Cellular::kStateConnected, device_->state_); in TEST_F()
1201 device_->state_ = Cellular::kStateRegistered; in TEST_F()
1202 device_->Disconnect(&error, "in test"); in TEST_F()
1206 device_->state_ = Cellular::kStateConnected; in TEST_F()
1211 device_->Disconnect(&error, "in test"); in TEST_F()
1213 EXPECT_EQ(Cellular::kStateRegistered, device_->state_); in TEST_F()
1220 device_->state_ = Cellular::kStateConnected; in TEST_F()
1226 device_->modem_state_ = Cellular::kModemStateDisconnecting; in TEST_F()
1227 device_->Disconnect(&error, "in test"); in TEST_F()
1229 EXPECT_EQ(Cellular::kStateConnected, device_->state_); in TEST_F()
1231 device_->modem_state_ = Cellular::kModemStateConnected; in TEST_F()
1232 device_->Disconnect(&error, "in test"); in TEST_F()
1234 EXPECT_EQ(Cellular::kStateRegistered, device_->state_); in TEST_F()
1239 device_->state_ = Cellular::kStateRegistered; in TEST_F()
1241 ASSERT_EQ(Service::kStateIdle, device_->service_->state()); in TEST_F()
1247 device_->Connect(&error); in TEST_F()
1248 EXPECT_EQ(Service::kStateFailure, device_->service_->state()); in TEST_F()
1256 device_->state_ = Cellular::kStateRegistered; in TEST_F()
1265 device_->Connect(&error); in TEST_F()
1272 device_->state_ = Cellular::kStateRegistered; in TEST_F()
1281 device_->Connect(&error); in TEST_F()
1287 device_->state_ = Cellular::kStateLinked; in TEST_F()
1289 device_->LinkEvent(0, 0); // flags doesn't contain IFF_UP in TEST_F()
1290 EXPECT_EQ(device_->state_, Cellular::kStateConnected); in TEST_F()
1291 EXPECT_EQ(device_->service_, service); in TEST_F()
1297 device_->AcquireIPConfig(); in TEST_F()
1314 device_->state_ = Cellular::kStateDisabled; in TEST_F()
1315 device_->set_modem_state(Cellular::kModemStateDisabled); in TEST_F()
1320 device_->OnPropertiesChanged(MM_MODEM_INTERFACE, props, vector<string>()); in TEST_F()
1323 EXPECT_EQ(Cellular::kModemStateEnabled, device_->modem_state()); in TEST_F()
1324 EXPECT_EQ(Cellular::kStateEnabled, device_->state()); in TEST_F()
1325 EXPECT_TRUE(device_->enabled()); in TEST_F()
1336 device_->enabled_ = true; in TEST_F()
1337 device_->enabled_pending_ = true; in TEST_F()
1338 device_->state_ = Cellular::kStateEnabled; in TEST_F()
1339 device_->set_modem_state(Cellular::kModemStateEnabled); in TEST_F()
1348 EXPECT_EQ(Cellular::kModemStateDisabled, device_->modem_state()); in TEST_F()
1349 EXPECT_EQ(Cellular::kStateDisabled, device_->state()); in TEST_F()
1350 EXPECT_FALSE(device_->enabled()); in TEST_F()
1359 device_->state_ = Cellular::kStateDisabled; in TEST_F()
1360 device_->modem_state_ = Cellular::kModemStateEnabling; in TEST_F()
1361 device_->OnModemStateChanged(Cellular::kModemStateConnected); in TEST_F()
1363 EXPECT_EQ(Cellular::kStateDisabled, device_->state()); in TEST_F()
1367 device_->state_ = Cellular::kStateEnabled; in TEST_F()
1368 device_->modem_state_ = Cellular::kModemStateConnecting; in TEST_F()
1370 device_->OnModemStateChanged(Cellular::kModemStateConnected); in TEST_F()
1371 EXPECT_EQ(Cellular::kStateConnected, device_->state()); in TEST_F()
1379 device_->set_modem_state(Cellular::kModemStateRegistered); in TEST_F()
1380 device_->OnModemStateChanged(Cellular::kModemStateEnabled); in TEST_F()
1386 EXPECT_EQ(device_->state_, Cellular::kStateDisabled); in TEST_F()
1387 device_->StartModemCallback(Bind(&CellularTest::TestCallback, in TEST_F()
1390 EXPECT_EQ(device_->state_, Cellular::kStateEnabled); in TEST_F()
1395 EXPECT_EQ(device_->state_, Cellular::kStateDisabled); in TEST_F()
1396 device_->StartModemCallback(Bind(&CellularTest::TestCallback, in TEST_F()
1399 EXPECT_EQ(device_->state_, Cellular::kStateDisabled); in TEST_F()
1405 device_->StopModemCallback(Bind(&CellularTest::TestCallback, in TEST_F()
1408 EXPECT_EQ(device_->state_, Cellular::kStateDisabled); in TEST_F()
1409 EXPECT_FALSE(device_->service_.get()); in TEST_F()
1415 device_->StopModemCallback(Bind(&CellularTest::TestCallback, in TEST_F()
1418 EXPECT_EQ(device_->state_, Cellular::kStateDisabled); in TEST_F()
1419 EXPECT_FALSE(device_->service_.get()); in TEST_F()
1423 EXPECT_FALSE(device_->allow_roaming_); in TEST_F()
1426 device_->SetAllowRoaming(true, &error); in TEST_F()
1428 EXPECT_TRUE(device_->allow_roaming_); in TEST_F()
1450 device_->ppp_task_ = std::move(mock_task); in TEST_F()
1451 device_->state_ = Cellular::kStateConnected; in TEST_F()
1455 device_->LinkEvent(IFF_UP, 0); in TEST_F()
1460 device_->state_ = Cellular::kStateConnected; in TEST_F()
1465 device_->LinkEvent(IFF_UP, 0); in TEST_F()
1470 EXPECT_EQ(nullptr, device_->ppp_task_); in TEST_F()
1484 device_->state_ = Cellular::kStateLinked; in TEST_F()
1485 device_->set_ipconfig(dhcp_config_); in TEST_F()
1486 device_->SelectService(service); in TEST_F()
1491 EXPECT_EQ(nullptr, device_->ppp_task_); in TEST_F()
1493 EXPECT_EQ(Cellular::kStateLinked, device_->state()); in TEST_F()
1500 EXPECT_FALSE(device_->service()); in TEST_F()
1501 device_->GetLogin(&username_to_pppd, &password_to_pppd); in TEST_F()
1509 device_->GetLogin(&username_to_pppd, &password_to_pppd); in TEST_F()
1517 device_->ppp_device_factory_ = ppp_device_factory; in TEST_F()
1522 device_->Notify(kPPPReasonAuthenticating, kEmptyArgs); in TEST_F()
1523 EXPECT_TRUE(device_->is_ppp_authenticating_); in TEST_F()
1524 device_->Notify(kPPPReasonAuthenticated, kEmptyArgs); in TEST_F()
1525 EXPECT_FALSE(device_->is_ppp_authenticating_); in TEST_F()
1545 device_->Notify(kPPPReasonConnect, ppp_config); in TEST_F()
1556 device_->Notify(kPPPReasonConnect, ppp_config); in TEST_F()
1582 device_->Notify(kPPPReasonConnect, ppp_config2); in TEST_F()
1590 device_->Notify(kPPPReasonDisconnect, kEmptyArgs); in TEST_F()
1591 EXPECT_EQ(nullptr, device_->ppp_task_); in TEST_F()
1609 device_->Notify(kPPPReasonDisconnect, kEmptyArgs); in TEST_F()
1610 EXPECT_EQ(nullptr, device_->ppp_task_); in TEST_F()
1629 device_->Notify(kPPPReasonAuthenticating, kEmptyArgs); in TEST_F()
1630 device_->Notify(kPPPReasonDisconnect, kEmptyArgs); in TEST_F()
1631 EXPECT_EQ(nullptr, device_->ppp_task_); in TEST_F()
1651 device_->Notify(kPPPReasonAuthenticating, kEmptyArgs); in TEST_F()
1652 device_->Notify(kPPPReasonAuthenticated, kEmptyArgs); in TEST_F()
1653 device_->Notify(kPPPReasonDisconnect, kEmptyArgs); in TEST_F()
1654 EXPECT_EQ(nullptr, device_->ppp_task_); in TEST_F()
1666 device_->OnPPPDied(kPID, kExitStatus); in TEST_F()
1677 device_->OnPPPDied(kPID, kExitStatus); in TEST_F()
1686 device_->set_ipconfig(dhcp_config_); in TEST_F()
1688 device_->DropConnection(); in TEST_F()
1690 EXPECT_FALSE(device_->ipconfig()); in TEST_F()
1698 device_->ppp_device_ = ppp_device; in TEST_F()
1699 device_->DropConnection(); in TEST_F()
1710 device_->SelectService(service); in TEST_F()
1711 device_->SetServiceState(Service::kStateConfiguring); in TEST_F()
1712 device_->SetServiceFailure(Service::kFailurePPPAuth); in TEST_F()
1713 device_->SetServiceFailureSilent(Service::kFailureUnknown); in TEST_F()
1728 device_->ppp_device_ = ppp_device; in TEST_F()
1733 device_->SetServiceState(Service::kStateConfiguring); in TEST_F()
1734 device_->SetServiceFailure(Service::kFailurePPPAuth); in TEST_F()
1735 device_->SetServiceFailureSilent(Service::kFailureUnknown); in TEST_F()
1744 device_->Disconnect(&error, "in test"); in TEST_F()
1753 device_->OnBeforeSuspend(ResultCallback()); in TEST_F()
1765 EXPECT_FALSE(device_->running()); in TEST_F()
1766 EXPECT_FALSE(device_->enabled_persistent()); in TEST_F()
1767 EXPECT_EQ(Cellular::kStateDisabled, device_->state_); in TEST_F()
1771 device_->OnAfterResume(); in TEST_F()
1772 EXPECT_FALSE(device_->running()); in TEST_F()
1773 EXPECT_FALSE(device_->enabled_persistent()); in TEST_F()
1774 EXPECT_EQ(Cellular::kStateDisabled, device_->state_); in TEST_F()
1788 device_->SetEnabled(true); in TEST_F()
1789 EXPECT_TRUE(device_->running()); in TEST_F()
1790 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); in TEST_F()
1794 device_->SetEnabledPersistent(false, &error, ResultCallback()); in TEST_F()
1795 EXPECT_FALSE(device_->running()); // changes immediately in TEST_F()
1796 EXPECT_FALSE(device_->enabled_persistent()); // changes immediately in TEST_F()
1797 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); // changes on completion in TEST_F()
1800 device_->OnAfterResume(); in TEST_F()
1801 EXPECT_FALSE(device_->running()); in TEST_F()
1802 EXPECT_FALSE(device_->enabled_persistent()); in TEST_F()
1803 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); in TEST_F()
1811 EXPECT_FALSE(device_->running()); in TEST_F()
1812 EXPECT_FALSE(device_->enabled_persistent()); in TEST_F()
1813 EXPECT_EQ(Cellular::kStateDisabled, device_->state_); in TEST_F()
1829 device_->SetEnabled(true); in TEST_F()
1830 EXPECT_TRUE(device_->running()); in TEST_F()
1831 EXPECT_TRUE(device_->enabled_persistent()); in TEST_F()
1832 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); in TEST_F()
1835 device_->SetEnabled(false); in TEST_F()
1836 EXPECT_FALSE(device_->running()); // changes immediately in TEST_F()
1837 EXPECT_TRUE(device_->enabled_persistent()); // no change in TEST_F()
1838 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); // changes on completion in TEST_F()
1850 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); // disable still pending in TEST_F()
1851 device_->OnAfterResume(); in TEST_F()
1852 EXPECT_TRUE(device_->running()); // changes immediately in TEST_F()
1853 EXPECT_TRUE(device_->enabled_persistent()); // no change in TEST_F()
1854 EXPECT_EQ(Cellular::kStateDisabled, device_->state_); // by OnAfterResume in TEST_F()
1869 EXPECT_TRUE(device_->running()); // last changed by OnAfterResume in TEST_F()
1870 EXPECT_TRUE(device_->enabled_persistent()); // last changed by OnAfterResume in TEST_F()
1871 EXPECT_EQ(Cellular::kStateDisabled, device_->state_); in TEST_F()
1876 EXPECT_TRUE(device_->running()); in TEST_F()
1877 EXPECT_TRUE(device_->enabled_persistent()); in TEST_F()
1878 EXPECT_EQ(Cellular::kStateDisabled, device_->state_); in TEST_F()
1901 device_->SetEnabled(true); in TEST_F()
1902 EXPECT_TRUE(device_->running()); in TEST_F()
1903 EXPECT_TRUE(device_->enabled_persistent()); in TEST_F()
1904 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); in TEST_F()
1910 device_->SetEnabled(false); in TEST_F()
1912 EXPECT_FALSE(device_->running()); // changes immediately in TEST_F()
1913 EXPECT_TRUE(device_->enabled_persistent()); // no change in TEST_F()
1914 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); // changes on completion in TEST_F()
1940 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); // disable still pending in TEST_F()
1943 device_->OnAfterResume(); in TEST_F()
1944 EXPECT_TRUE(device_->running()); // changes immediately in TEST_F()
1945 EXPECT_TRUE(device_->enabled_persistent()); // no change in TEST_F()
1946 EXPECT_EQ(Cellular::kStateDisabled, device_->state_); // by OnAfterResume in TEST_F()
1967 EXPECT_TRUE(device_->running()); in TEST_F()
1968 EXPECT_TRUE(device_->enabled_persistent()); in TEST_F()
1969 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); in TEST_F()
1976 EXPECT_FALSE(device_->running()); in TEST_F()
1977 EXPECT_TRUE(device_->enabled_persistent()); in TEST_F()
1978 EXPECT_EQ(Cellular::kStateDisabled, device_->state_); in TEST_F()
1984 device_->OnAfterResume(); in TEST_F()
1990 EXPECT_TRUE(device_->running()); in TEST_F()
1991 EXPECT_TRUE(device_->enabled_persistent()); in TEST_F()
1992 EXPECT_EQ(Cellular::kStateEnabled, device_->state_); in TEST_F()
1999 EXPECT_FALSE(device_->allow_roaming_); in TEST_F()
2000 EXPECT_FALSE(device_->SetAllowRoaming(false, &error)); in TEST_F()
2007 device_->set_found_networks(kTestNetworksCellular); in TEST_F()
2008 EXPECT_FALSE(device_->scanning_); in TEST_F()
2014 device_->Scan(Device::kFullScan, &error, ""); in TEST_F()
2016 EXPECT_FALSE(device_->scanning_); in TEST_F()
2017 EXPECT_EQ(kTestNetworksCellular, device_->found_networks()); in TEST_F()
2024 device_->set_found_networks(kTestNetworksCellular); in TEST_F()
2028 EXPECT_FALSE(device_->scanning_); in TEST_F()
2034 device_->Scan(Device::kFullScan, &error, ""); in TEST_F()
2036 EXPECT_TRUE(device_->scanning_); in TEST_F()
2041 EXPECT_FALSE(device_->scanning_); in TEST_F()
2042 EXPECT_TRUE(device_->found_networks().empty()); in TEST_F()
2049 device_->clear_found_networks(); in TEST_F()
2053 EXPECT_FALSE(device_->scanning_); in TEST_F()
2059 device_->Scan(Device::kFullScan, &error, ""); in TEST_F()
2061 EXPECT_TRUE(device_->scanning_); in TEST_F()
2067 EXPECT_FALSE(device_->scanning_); in TEST_F()
2068 EXPECT_EQ(kTestNetworksCellular, device_->found_networks()); in TEST_F()
2076 device_->state_ = Cellular::kStateConnected; in TEST_F()
2081 EXPECT_CALL(device_info_, GetFlags(device_->interface_index(), _)) in TEST_F()
2087 device_->EstablishLink(); in TEST_F()
2088 EXPECT_EQ(service, device_->selected_service()); in TEST_F()
2097 device_->state_ = Cellular::kStateConnected; in TEST_F()
2102 device_->EstablishLink(); in TEST_F()
2103 EXPECT_FALSE(device_->ipconfig()); // No DHCP client. in TEST_F()
2104 EXPECT_FALSE(device_->selected_service()); in TEST_F()
2105 EXPECT_FALSE(device_->is_ppp_authenticating_); in TEST_F()
2106 EXPECT_NE(nullptr, device_->ppp_task_); in TEST_F()
2129 device_->state_ = Cellular::kStateConnected; in TEST_F()
2134 EXPECT_CALL(device_info_, GetFlags(device_->interface_index(), _)) in TEST_F()
2137 device_->EstablishLink(); in TEST_F()
2138 EXPECT_EQ(service, device_->selected_service()); in TEST_F()
2139 ASSERT_TRUE(device_->ipconfig()); in TEST_F()
2140 EXPECT_EQ(kAddressFamily, device_->ipconfig()->properties().address_family); in TEST_F()
2141 EXPECT_EQ(kAddress, device_->ipconfig()->properties().address); in TEST_F()
2142 EXPECT_EQ(kGateway, device_->ipconfig()->properties().gateway); in TEST_F()
2143 EXPECT_EQ(kSubnetPrefix, device_->ipconfig()->properties().subnet_prefix); in TEST_F()
2144 ASSERT_EQ(3, device_->ipconfig()->properties().dns_servers.size()); in TEST_F()
2145 EXPECT_EQ(kDNS[0], device_->ipconfig()->properties().dns_servers[0]); in TEST_F()
2146 EXPECT_EQ(kDNS[1], device_->ipconfig()->properties().dns_servers[1]); in TEST_F()
2147 EXPECT_EQ(kDNS[2], device_->ipconfig()->properties().dns_servers[2]); in TEST_F()