OLD | NEW |
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 <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 #include "third_party/cros_system_api/dbus/service_constants.h" | 24 #include "third_party/cros_system_api/dbus/service_constants.h" |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 void ErrorCallbackFunction(const std::string& error_name, | 28 void ErrorCallbackFunction(const std::string& error_name, |
29 const std::string& error_message) { | 29 const std::string& error_message) { |
30 LOG(ERROR) << "Shill Error: " << error_name << " : " << error_message; | 30 LOG(ERROR) << "Shill Error: " << error_name << " : " << error_message; |
31 } | 31 } |
32 | 32 |
33 const std::string kShillManagerClientStubDefaultService = "eth1"; | 33 const char* kShillManagerClientStubDefaultService = "eth1"; |
34 const std::string kShillManagerClientStubDefaultWireless = "wifi1"; | 34 const char* kShillManagerClientStubDefaultWireless = "wifi1"; |
35 const std::string kShillManagerClientStubWireless2 = "wifi2"; | 35 const char* kShillManagerClientStubWireless2 = "wifi2"; |
36 const std::string kShillManagerClientStubCellular = "cellular1"; | 36 const char* kShillManagerClientStubCellular = "cellular1"; |
37 | 37 |
38 using chromeos::NetworkState; | 38 using chromeos::NetworkState; |
39 using chromeos::NetworkStateHandler; | 39 using chromeos::NetworkStateHandler; |
40 | 40 |
41 class TestObserver : public chromeos::NetworkStateHandlerObserver { | 41 class TestObserver : public chromeos::NetworkStateHandlerObserver { |
42 public: | 42 public: |
43 explicit TestObserver(NetworkStateHandler* handler) | 43 explicit TestObserver(NetworkStateHandler* handler) |
44 : handler_(handler), | 44 : handler_(handler), |
45 manager_changed_count_(0), | 45 manager_changed_count_(0), |
46 network_count_(0), | 46 network_count_(0), |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 // Other networks should have 2 updates (inital + request). | 386 // Other networks should have 2 updates (inital + request). |
387 EXPECT_EQ(2, test_observer_->PropertyUpdatesForService( | 387 EXPECT_EQ(2, test_observer_->PropertyUpdatesForService( |
388 kShillManagerClientStubDefaultService)); | 388 kShillManagerClientStubDefaultService)); |
389 EXPECT_EQ(2, test_observer_->PropertyUpdatesForService( | 389 EXPECT_EQ(2, test_observer_->PropertyUpdatesForService( |
390 kShillManagerClientStubWireless2)); | 390 kShillManagerClientStubWireless2)); |
391 EXPECT_EQ(2, test_observer_->PropertyUpdatesForService( | 391 EXPECT_EQ(2, test_observer_->PropertyUpdatesForService( |
392 kShillManagerClientStubCellular)); | 392 kShillManagerClientStubCellular)); |
393 } | 393 } |
394 | 394 |
395 } // namespace chromeos | 395 } // namespace chromeos |
OLD | NEW |