| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 network_state_handler_.reset(new NetworkStateHandler); | 186 network_state_handler_.reset(new NetworkStateHandler); |
| 187 test_observer_.reset(new TestObserver(network_state_handler_.get())); | 187 test_observer_.reset(new TestObserver(network_state_handler_.get())); |
| 188 network_state_handler_->AddObserver(test_observer_.get(), FROM_HERE); | 188 network_state_handler_->AddObserver(test_observer_.get(), FROM_HERE); |
| 189 network_state_handler_->InitShillPropertyHandler(); | 189 network_state_handler_->InitShillPropertyHandler(); |
| 190 base::RunLoop().RunUntilIdle(); | 190 base::RunLoop().RunUntilIdle(); |
| 191 test_observer_->reset_change_counts(); | 191 test_observer_->reset_change_counts(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void TearDown() override { | 194 void TearDown() override { |
| 195 network_state_handler_->RemoveObserver(test_observer_.get(), FROM_HERE); | 195 network_state_handler_->RemoveObserver(test_observer_.get(), FROM_HERE); |
| 196 network_state_handler_->Shutdown(); |
| 196 test_observer_.reset(); | 197 test_observer_.reset(); |
| 197 network_state_handler_.reset(); | 198 network_state_handler_.reset(); |
| 198 DBusThreadManager::Shutdown(); | 199 DBusThreadManager::Shutdown(); |
| 199 } | 200 } |
| 200 | 201 |
| 201 protected: | 202 protected: |
| 202 void AddService(const std::string& service_path, | 203 void AddService(const std::string& service_path, |
| 203 const std::string& guid, | 204 const std::string& guid, |
| 204 const std::string& name, | 205 const std::string& name, |
| 205 const std::string& type, | 206 const std::string& type, |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 kShillManagerClientStubDefaultWifi, shill::kIPConfigProperty, | 796 kShillManagerClientStubDefaultWifi, shill::kIPConfigProperty, |
| 796 base::StringValue(kIPConfigPath)); | 797 base::StringValue(kIPConfigPath)); |
| 797 UpdateManagerProperties(); | 798 UpdateManagerProperties(); |
| 798 EXPECT_EQ(1, test_observer_->PropertyUpdatesForDevice( | 799 EXPECT_EQ(1, test_observer_->PropertyUpdatesForDevice( |
| 799 kShillManagerClientStubWifiDevice)); | 800 kShillManagerClientStubWifiDevice)); |
| 800 EXPECT_EQ(1, test_observer_->PropertyUpdatesForService( | 801 EXPECT_EQ(1, test_observer_->PropertyUpdatesForService( |
| 801 kShillManagerClientStubDefaultWifi)); | 802 kShillManagerClientStubDefaultWifi)); |
| 802 } | 803 } |
| 803 | 804 |
| 804 } // namespace chromeos | 805 } // namespace chromeos |
| OLD | NEW |