Lines Matching refs:device_

59         device_(new WiMax(&control_, &dispatcher_, &metrics_, &manager_,  in WiMaxTest()
74 device_->set_dhcp_provider(&dhcp_provider_); in SetUp()
78 device_->SelectService(nullptr); in TearDown()
79 device_->pending_service_ = nullptr; in TearDown()
89 WiMaxRefPtr device_; member in shill::WiMaxTest
93 EXPECT_EQ(kTestPath, device_->path()); in TEST_F()
94 EXPECT_FALSE(device_->scanning()); in TEST_F()
98 EXPECT_FALSE(device_->proxy_.get()); in TEST_F()
105 device_->Start(nullptr, EnabledStateChangedCallback()); in TEST_F()
106 ASSERT_TRUE(device_->proxy_.get()); in TEST_F()
110 device_->pending_service_ = service; in TEST_F()
112 device_->networks_.insert("path"); in TEST_F()
116 device_->StartConnectTimeout(); in TEST_F()
117 device_->Stop(nullptr, EnabledStateChangedCallback()); in TEST_F()
118 EXPECT_TRUE(device_->networks_.empty()); in TEST_F()
119 EXPECT_FALSE(device_->IsConnectTimeoutStarted()); in TEST_F()
120 EXPECT_FALSE(device_->pending_service_); in TEST_F()
128 device_->SelectService(service0); in TEST_F()
129 device_->pending_service_ = service1; in TEST_F()
131 device_->OnServiceStopped(nullptr); in TEST_F()
132 EXPECT_TRUE(device_->selected_service()); in TEST_F()
133 EXPECT_TRUE(device_->pending_service_); in TEST_F()
135 device_->OnServiceStopped(service0); in TEST_F()
136 EXPECT_FALSE(device_->selected_service()); in TEST_F()
137 EXPECT_TRUE(device_->pending_service_); in TEST_F()
139 device_->OnServiceStopped(service1); in TEST_F()
140 EXPECT_FALSE(device_->selected_service()); in TEST_F()
141 EXPECT_FALSE(device_->pending_service_); in TEST_F()
148 device_->networks_.insert("foo"); in TEST_F()
153 device_->OnNetworksChanged(networks); in TEST_F()
154 EXPECT_EQ(2, device_->networks_.size()); in TEST_F()
155 EXPECT_TRUE(ContainsKey(device_->networks_, "bar")); in TEST_F()
156 EXPECT_TRUE(ContainsKey(device_->networks_, "zoo")); in TEST_F()
162 device_->pending_service_ = service; in TEST_F()
164 EXPECT_TRUE(device_->pending_service_); in TEST_F()
166 device_->OnConnectComplete(Error(Error::kOperationFailed)); in TEST_F()
167 EXPECT_FALSE(device_->pending_service_); in TEST_F()
174 EXPECT_EQ(wimax_manager::kDeviceStatusUninitialized, device_->status_); in TEST_F()
175 device_->pending_service_ = service; in TEST_F()
178 device_->OnStatusChanged(wimax_manager::kDeviceStatusScanning); in TEST_F()
179 EXPECT_TRUE(device_->pending_service_); in TEST_F()
180 EXPECT_EQ(wimax_manager::kDeviceStatusScanning, device_->status_); in TEST_F()
182 device_->status_ = wimax_manager::kDeviceStatusConnecting; in TEST_F()
185 device_->OnStatusChanged(wimax_manager::kDeviceStatusScanning); in TEST_F()
186 EXPECT_FALSE(device_->pending_service_); in TEST_F()
188 device_->status_ = wimax_manager::kDeviceStatusConnecting; in TEST_F()
189 device_->SelectService(service); in TEST_F()
193 device_->OnStatusChanged(wimax_manager::kDeviceStatusScanning); in TEST_F()
194 EXPECT_FALSE(device_->selected_service()); in TEST_F()
196 device_->pending_service_ = service; in TEST_F()
197 device_->SelectService(service); in TEST_F()
200 device_->OnStatusChanged(wimax_manager::kDeviceStatusConnecting); in TEST_F()
201 EXPECT_TRUE(device_->pending_service_); in TEST_F()
202 EXPECT_TRUE(device_->selected_service()); in TEST_F()
203 EXPECT_EQ(wimax_manager::kDeviceStatusConnecting, device_->status_); in TEST_F()
206 device_->SelectService(nullptr); in TEST_F()
212 device_->AcquireIPConfig(); in TEST_F()
220 device_->SelectService(service0); in TEST_F()
221 device_->pending_service_ = service1; in TEST_F()
222 device_->StartConnectTimeout(); in TEST_F()
226 device_->DropService(Service::kStateIdle); in TEST_F()
227 EXPECT_FALSE(device_->selected_service()); in TEST_F()
228 EXPECT_FALSE(device_->pending_service_); in TEST_F()
229 EXPECT_FALSE(device_->IsConnectTimeoutStarted()); in TEST_F()
232 device_->DropService(Service::kStateFailure); in TEST_F()
236 device_->proxy_.reset(proxy_.release()); in TEST_F()
239 device_->pending_service_ = service; in TEST_F()
241 device_->OnDeviceVanished(); in TEST_F()
242 EXPECT_FALSE(device_->proxy_.get()); in TEST_F()
243 EXPECT_FALSE(device_->pending_service_); in TEST_F()
251 device_->proxy_.reset(proxy_.release()); in TEST_F()
258 device_->OnEnableComplete(callback, error); in TEST_F()
259 EXPECT_EQ(1, device_->networks_.size()); in TEST_F()
260 EXPECT_TRUE(ContainsKey(device_->networks_, "path")); in TEST_F()
262 EXPECT_TRUE(device_->proxy_.get()); in TEST_F()
265 device_->OnEnableComplete(callback, error); in TEST_F()
266 EXPECT_FALSE(device_->proxy_.get()); in TEST_F()
270 EXPECT_EQ(&dispatcher_, device_->dispatcher()); in TEST_F()
271 EXPECT_TRUE(device_->connect_timeout_callback_.IsCancelled()); in TEST_F()
272 EXPECT_FALSE(device_->IsConnectTimeoutStarted()); in TEST_F()
274 device_->connect_timeout_seconds_); in TEST_F()
275 device_->connect_timeout_seconds_ = 0; in TEST_F()
276 device_->StartConnectTimeout(); in TEST_F()
277 EXPECT_FALSE(device_->connect_timeout_callback_.IsCancelled()); in TEST_F()
278 EXPECT_TRUE(device_->IsConnectTimeoutStarted()); in TEST_F()
279 device_->dispatcher_ = nullptr; in TEST_F()
280 device_->StartConnectTimeout(); // Expect no crash. in TEST_F()
283 device_->pending_service_ = service; in TEST_F()
286 EXPECT_TRUE(device_->connect_timeout_callback_.IsCancelled()); in TEST_F()
287 EXPECT_FALSE(device_->IsConnectTimeoutStarted()); in TEST_F()
288 EXPECT_FALSE(device_->pending_service_); in TEST_F()
296 device_->status_ = wimax_manager::kDeviceStatusScanning; in TEST_F()
300 device_->proxy_.reset(proxy_.release()); in TEST_F()
302 device_->ConnectTo(service, &error); in TEST_F()
304 EXPECT_EQ(service.get(), device_->pending_service_.get()); in TEST_F()
305 EXPECT_EQ(wimax_manager::kDeviceStatusUninitialized, device_->status_); in TEST_F()
306 EXPECT_TRUE(device_->IsConnectTimeoutStarted()); in TEST_F()
308 device_->ConnectTo(service, &error); in TEST_F()
311 device_->pending_service_ = nullptr; in TEST_F()
315 EXPECT_TRUE(device_->IsIdle()); in TEST_F()
318 device_->pending_service_ = service; in TEST_F()
319 EXPECT_FALSE(device_->IsIdle()); in TEST_F()
320 device_->pending_service_ = nullptr; in TEST_F()
321 device_->SelectService(service); in TEST_F()
322 EXPECT_FALSE(device_->IsIdle()); in TEST_F()