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

Side by Side Diff: chromeos/network/network_configuration_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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/json/json_writer.h" 6 #include "base/json/json_writer.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chromeos/dbus/dbus_thread_manager.h" 10 #include "chromeos/dbus/dbus_thread_manager.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 const base::Closure& callback, 147 const base::Closure& callback,
148 const ShillClientHelper::ErrorCallback& error_callback) { 148 const ShillClientHelper::ErrorCallback& error_callback) {
149 callback.Run(); 149 callback.Run();
150 } 150 }
151 151
152 protected: 152 protected:
153 MockShillManagerClient* mock_manager_client_; 153 MockShillManagerClient* mock_manager_client_;
154 MockShillServiceClient* mock_service_client_; 154 MockShillServiceClient* mock_service_client_;
155 scoped_ptr<NetworkStateHandler> network_state_handler_; 155 scoped_ptr<NetworkStateHandler> network_state_handler_;
156 scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_; 156 scoped_ptr<NetworkConfigurationHandler> network_configuration_handler_;
157 MessageLoop message_loop_; 157 base::MessageLoop message_loop_;
158 base::DictionaryValue* dictionary_value_result_; 158 base::DictionaryValue* dictionary_value_result_;
159 }; 159 };
160 160
161 TEST_F(NetworkConfigurationHandlerTest, GetProperties) { 161 TEST_F(NetworkConfigurationHandlerTest, GetProperties) {
162 std::string service_path = "/service/1"; 162 std::string service_path = "/service/1";
163 std::string expected_json = "{\n \"SSID\": \"MyNetwork\"\n}\n"; 163 std::string expected_json = "{\n \"SSID\": \"MyNetwork\"\n}\n";
164 std::string networkName = "MyNetwork"; 164 std::string networkName = "MyNetwork";
165 std::string key = "SSID"; 165 std::string key = "SSID";
166 scoped_ptr<base::StringValue> networkNameValue( 166 scoped_ptr<base::StringValue> networkNameValue(
167 base::Value::CreateStringValue(networkName)); 167 base::Value::CreateStringValue(networkName));
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 Invoke(this, 319 Invoke(this,
320 &NetworkConfigurationHandlerTest::OnRemove)); 320 &NetworkConfigurationHandlerTest::OnRemove));
321 network_configuration_handler_->RemoveConfiguration( 321 network_configuration_handler_->RemoveConfiguration(
322 service_path, 322 service_path,
323 base::Bind(&base::DoNothing), 323 base::Bind(&base::DoNothing),
324 base::Bind(&ErrorCallback, false, service_path)); 324 base::Bind(&ErrorCallback, false, service_path));
325 message_loop_.RunUntilIdle(); 325 message_loop_.RunUntilIdle();
326 } 326 }
327 327
328 } // namespace chromeos 328 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698