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_connection_handler.h" | 5 #include "chromeos/network/network_connection_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 dbus_manager->GetShillProfileClient()->GetTestInterface()->AddProfile( | 91 dbus_manager->GetShillProfileClient()->GetTestInterface()->AddProfile( |
92 "shared_profile_path", std::string() /* shared profile */); | 92 "shared_profile_path", std::string() /* shared profile */); |
93 dbus_manager->GetShillProfileClient()->GetTestInterface()->AddProfile( | 93 dbus_manager->GetShillProfileClient()->GetTestInterface()->AddProfile( |
94 "user_profile_path", user_.username_hash()); | 94 "user_profile_path", user_.username_hash()); |
95 | 95 |
96 base::RunLoop().RunUntilIdle(); | 96 base::RunLoop().RunUntilIdle(); |
97 LoginState::Initialize(); | 97 LoginState::Initialize(); |
98 network_state_handler_.reset(NetworkStateHandler::InitializeForTest()); | 98 network_state_handler_.reset(NetworkStateHandler::InitializeForTest()); |
99 network_config_handler_.reset( | 99 network_config_handler_.reset( |
100 NetworkConfigurationHandler::InitializeForTest( | 100 NetworkConfigurationHandler::InitializeForTest( |
101 network_state_handler_.get())); | 101 network_state_handler_.get(), NULL /* network_device_handler */)); |
102 | 102 |
103 network_profile_handler_.reset(new NetworkProfileHandler()); | 103 network_profile_handler_.reset(new NetworkProfileHandler()); |
104 network_profile_handler_->Init(); | 104 network_profile_handler_->Init(); |
105 | 105 |
106 managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); | 106 managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); |
107 managed_config_handler_->Init(network_state_handler_.get(), | 107 managed_config_handler_->Init(network_state_handler_.get(), |
108 network_profile_handler_.get(), | 108 network_profile_handler_.get(), |
109 network_config_handler_.get(), | 109 network_config_handler_.get(), |
110 NULL /* network_device_handler */); | 110 NULL /* network_device_handler */); |
111 | 111 |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 GetResultAndReset()); | 422 GetResultAndReset()); |
423 | 423 |
424 EXPECT_TRUE(Configure(kConfigConnectable)); | 424 EXPECT_TRUE(Configure(kConfigConnectable)); |
425 Disconnect("wifi0"); | 425 Disconnect("wifi0"); |
426 EXPECT_EQ(NetworkConnectionHandler::kErrorNotConnected, GetResultAndReset()); | 426 EXPECT_EQ(NetworkConnectionHandler::kErrorNotConnected, GetResultAndReset()); |
427 } | 427 } |
428 | 428 |
429 } // namespace chromeos | 429 } // namespace chromeos |
430 | 430 |
431 #endif | 431 #endif |
OLD | NEW |