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

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

Issue 15774005: chromeos: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
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_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/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chromeos/dbus/dbus_thread_manager.h" 10 #include "chromeos/dbus/dbus_thread_manager.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface()-> 113 DBusThreadManager::Get()->GetShillServiceClient()->GetTestInterface()->
114 GetServiceProperties(service_path); 114 GetServiceProperties(service_path);
115 if (properties) 115 if (properties)
116 properties->GetStringWithoutPathExpansion(key, &result); 116 properties->GetStringWithoutPathExpansion(key, &result);
117 return result; 117 return result;
118 } 118 }
119 119
120 scoped_ptr<NetworkStateHandler> network_state_handler_; 120 scoped_ptr<NetworkStateHandler> network_state_handler_;
121 scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_; 121 scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_;
122 scoped_ptr<NetworkConnectionHandler> network_connection_handler_; 122 scoped_ptr<NetworkConnectionHandler> network_connection_handler_;
123 MessageLoopForUI message_loop_; 123 base::MessageLoopForUI message_loop_;
124 std::string result_; 124 std::string result_;
125 125
126 private: 126 private:
127 DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandlerTest); 127 DISALLOW_COPY_AND_ASSIGN(NetworkConnectionHandlerTest);
128 }; 128 };
129 129
130 namespace { 130 namespace {
131 131
132 const char* kConfigConnectable = 132 const char* kConfigConnectable =
133 "{ \"GUID\": \"wifi0\", \"Type\": \"wifi\", \"State\": \"idle\" }"; 133 "{ \"GUID\": \"wifi0\", \"Type\": \"wifi\", \"State\": \"idle\" }";
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 NetworkConnectionHandlerDisconnectFailure) { 210 NetworkConnectionHandlerDisconnectFailure) {
211 Connect("no-network"); 211 Connect("no-network");
212 EXPECT_EQ(NetworkConnectionHandler::kErrorNotFound, GetResultAndReset()); 212 EXPECT_EQ(NetworkConnectionHandler::kErrorNotFound, GetResultAndReset());
213 213
214 EXPECT_TRUE(Configure(kConfigConnectable)); 214 EXPECT_TRUE(Configure(kConfigConnectable));
215 Disconnect("wifi0"); 215 Disconnect("wifi0");
216 EXPECT_EQ(NetworkConnectionHandler::kErrorNotConnected, GetResultAndReset()); 216 EXPECT_EQ(NetworkConnectionHandler::kErrorNotConnected, GetResultAndReset());
217 } 217 }
218 218
219 } // namespace chromeos 219 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_configuration_handler_unittest.cc ('k') | chromeos/network/network_sms_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698