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

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

Issue 2689223002: Defer NetworkConfigurationHandler::CreateShillConfiguration callback (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <memory> 5 #include <memory>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 base::ListValue test_ip_configs; 65 base::ListValue test_ip_configs;
66 test_ip_configs.AppendString("ip_config1"); 66 test_ip_configs.AppendString("ip_config1");
67 device_test->SetDeviceProperty( 67 device_test->SetDeviceProperty(
68 kDefaultWifiDevicePath, shill::kIPConfigsProperty, test_ip_configs); 68 kDefaultWifiDevicePath, shill::kIPConfigsProperty, test_ip_configs);
69 69
70 base::RunLoop().RunUntilIdle(); 70 base::RunLoop().RunUntilIdle();
71 } 71 }
72 72
73 void TearDown() override { 73 void TearDown() override {
74 network_state_handler_->Shutdown();
74 network_device_handler_.reset(); 75 network_device_handler_.reset();
75 network_state_handler_.reset(); 76 network_state_handler_.reset();
76 DBusThreadManager::Shutdown(); 77 DBusThreadManager::Shutdown();
77 } 78 }
78 79
79 void ErrorCallback(const std::string& error_name, 80 void ErrorCallback(const std::string& error_name,
80 std::unique_ptr<base::DictionaryValue> error_data) { 81 std::unique_ptr<base::DictionaryValue> error_data) {
81 VLOG(1) << "ErrorCallback: " << error_name; 82 VLOG(1) << "ErrorCallback: " << error_name;
82 result_ = error_name; 83 result_ = error_name;
83 } 84 }
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 391
391 // Test that the shill error propagates to the error callback. 392 // Test that the shill error propagates to the error callback.
392 network_device_handler_->ChangePin(kDefaultCellularDevicePath, kIncorrectPin, 393 network_device_handler_->ChangePin(kDefaultCellularDevicePath, kIncorrectPin,
393 kNewPin, success_callback_, 394 kNewPin, success_callback_,
394 error_callback_); 395 error_callback_);
395 base::RunLoop().RunUntilIdle(); 396 base::RunLoop().RunUntilIdle();
396 EXPECT_EQ(NetworkDeviceHandler::kErrorIncorrectPin, result_); 397 EXPECT_EQ(NetworkDeviceHandler::kErrorIncorrectPin, result_);
397 } 398 }
398 399
399 } // namespace chromeos 400 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_connection_handler_unittest.cc ('k') | chromeos/network/network_state_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698