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

Side by Side Diff: chromeos/network/network_state_handler_unittest.cc

Issue 2913103002: Add Tether to Mobile NetworkTypePattern. (Closed)
Patch Set: fixed usage of Cellular vs Mobile in some files Created 3 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 "chromeos/network/network_state_handler.h" 5 #include "chromeos/network/network_state_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 test_observer_->default_network()); 330 test_observer_->default_network());
331 ASSERT_TRUE(network_state_handler_->DefaultNetwork()); 331 ASSERT_TRUE(network_state_handler_->DefaultNetwork());
332 EXPECT_EQ(kShillManagerClientStubDefaultService, 332 EXPECT_EQ(kShillManagerClientStubDefaultService,
333 network_state_handler_->DefaultNetwork()->path()); 333 network_state_handler_->DefaultNetwork()->path());
334 EXPECT_EQ(kShillManagerClientStubDefaultService, 334 EXPECT_EQ(kShillManagerClientStubDefaultService,
335 network_state_handler_->ConnectedNetworkByType( 335 network_state_handler_->ConnectedNetworkByType(
336 NetworkTypePattern::Ethernet())->path()); 336 NetworkTypePattern::Ethernet())->path());
337 EXPECT_EQ(kShillManagerClientStubDefaultWifi, 337 EXPECT_EQ(kShillManagerClientStubDefaultWifi,
338 network_state_handler_->ConnectedNetworkByType( 338 network_state_handler_->ConnectedNetworkByType(
339 NetworkTypePattern::WiFi())->path()); 339 NetworkTypePattern::WiFi())->path());
340 EXPECT_EQ(kShillManagerClientStubCellular,
341 network_state_handler_->FirstNetworkByType(
342 NetworkTypePattern::Mobile())->path());
343 EXPECT_EQ( 340 EXPECT_EQ(
344 kShillManagerClientStubCellular, 341 kShillManagerClientStubCellular,
345 network_state_handler_->FirstNetworkByType(NetworkTypePattern::Cellular()) 342 network_state_handler_->FirstNetworkByType(NetworkTypePattern::Cellular())
343 ->path());
344 EXPECT_EQ(
Kyle Horimoto 2017/06/01 22:12:23 Isn't this the same exact assertion as above?
stevenjb 2017/06/01 22:29:47 It is. I'm not sure why this changed, Mobile() sho
lesliewatkins 2017/06/02 21:31:17 Done. Oops!
345 kShillManagerClientStubCellular,
346 network_state_handler_->FirstNetworkByType(NetworkTypePattern::Cellular())
346 ->path()); 347 ->path());
347 EXPECT_EQ(shill::kStateOnline, 348 EXPECT_EQ(shill::kStateOnline,
348 test_observer_->default_network_connection_state()); 349 test_observer_->default_network_connection_state());
349 } 350 }
350 351
351 TEST_F(NetworkStateHandlerTest, GetNetworkList) { 352 TEST_F(NetworkStateHandlerTest, GetNetworkList) {
352 network_state_handler_->SetTetherTechnologyState( 353 network_state_handler_->SetTetherTechnologyState(
353 NetworkStateHandler::TECHNOLOGY_ENABLED); 354 NetworkStateHandler::TECHNOLOGY_ENABLED);
354 355
355 // Ensure that the network list is the expected size. 356 // Ensure that the network list is the expected size.
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 shill::kIPConfigProperty, 1230 shill::kIPConfigProperty,
1230 base::Value(kIPConfigPath)); 1231 base::Value(kIPConfigPath));
1231 UpdateManagerProperties(); 1232 UpdateManagerProperties();
1232 EXPECT_EQ(1, test_observer_->PropertyUpdatesForDevice( 1233 EXPECT_EQ(1, test_observer_->PropertyUpdatesForDevice(
1233 kShillManagerClientStubWifiDevice)); 1234 kShillManagerClientStubWifiDevice));
1234 EXPECT_EQ(1, test_observer_->PropertyUpdatesForService( 1235 EXPECT_EQ(1, test_observer_->PropertyUpdatesForService(
1235 kShillManagerClientStubDefaultWifi)); 1236 kShillManagerClientStubDefaultWifi));
1236 } 1237 }
1237 1238
1238 } // namespace chromeos 1239 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698