Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: chrome/browser/chromeos/cros/network_library_unittest.cc

Issue 10554013: Add a CONNECT_REQUESTED state to Network ConnectionState. (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: Rebase Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <cert.h> 5 #include <cert.h>
6 #include <pk11pub.h> 6 #include <pk11pub.h>
7 7
8 #include <vector> 8 #include <vector>
9 #include <string> 9 #include <string>
10 10
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // wifi6: disconnected 276 // wifi6: disconnected
277 // cellular1: connected, activated, not roaming 277 // cellular1: connected, activated, not roaming
278 // cellular2: disconnected, activated, roaming 278 // cellular2: disconnected, activated, roaming
279 279
280 TEST_F(NetworkLibraryStubTest, NetworkLibraryAccessors) { 280 TEST_F(NetworkLibraryStubTest, NetworkLibraryAccessors) {
281 // Set up state. 281 // Set up state.
282 // Set wifi2->connecting for these tests. 282 // Set wifi2->connecting for these tests.
283 WifiNetwork* wifi2 = cros_->FindWifiNetworkByPath("wifi2"); 283 WifiNetwork* wifi2 = cros_->FindWifiNetworkByPath("wifi2");
284 ASSERT_NE(static_cast<const Network*>(NULL), wifi2); 284 ASSERT_NE(static_cast<const Network*>(NULL), wifi2);
285 Network::TestApi test_wifi2(wifi2); 285 Network::TestApi test_wifi2(wifi2);
286 test_wifi2.SetConnecting(true); 286 test_wifi2.SetConnecting();
287 // Set cellular1->connecting for these tests. 287 // Set cellular1->connecting for these tests.
288 CellularNetwork* cellular1 = cros_->FindCellularNetworkByPath("cellular1"); 288 CellularNetwork* cellular1 = cros_->FindCellularNetworkByPath("cellular1");
289 ASSERT_NE(static_cast<const Network*>(NULL), cellular1); 289 ASSERT_NE(static_cast<const Network*>(NULL), cellular1);
290 Network::TestApi test_cellular1(cellular1); 290 Network::TestApi test_cellular1(cellular1);
291 test_cellular1.SetConnecting(true); 291 test_cellular1.SetConnecting();
292 292
293 // Ethernet 293 // Ethernet
294 ASSERT_NE(static_cast<const EthernetNetwork*>(NULL), 294 ASSERT_NE(static_cast<const EthernetNetwork*>(NULL),
295 cros_->ethernet_network()); 295 cros_->ethernet_network());
296 EXPECT_EQ("eth1", cros_->ethernet_network()->service_path()); 296 EXPECT_EQ("eth1", cros_->ethernet_network()->service_path());
297 EXPECT_NE(static_cast<const Network*>(NULL), 297 EXPECT_NE(static_cast<const Network*>(NULL),
298 cros_->FindNetworkByPath("eth1")); 298 cros_->FindNetworkByPath("eth1"));
299 EXPECT_TRUE(cros_->ethernet_connected()); 299 EXPECT_TRUE(cros_->ethernet_connected());
300 EXPECT_FALSE(cros_->ethernet_connecting()); 300 EXPECT_FALSE(cros_->ethernet_connecting());
301 301
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 424
425 // TODO(stevenjb): Test network profiles. 425 // TODO(stevenjb): Test network profiles.
426 426
427 // TODO(stevenjb): Test network devices. 427 // TODO(stevenjb): Test network devices.
428 428
429 // TODO(stevenjb): Test data plans. 429 // TODO(stevenjb): Test data plans.
430 430
431 // TODO(stevenjb): Test monitor network / device. 431 // TODO(stevenjb): Test monitor network / device.
432 432
433 } // namespace chromeos 433 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library_impl_stub.cc ('k') | chrome/browser/chromeos/cros/network_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698