| 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 "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/message_loop.h" | 7 #include "base/message_loop/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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 value.SetWithoutPathExpansion(shill::kProfileProperty, | 352 value.SetWithoutPathExpansion(shill::kProfileProperty, |
| 353 base::Value::CreateStringValue(profile)); | 353 base::Value::CreateStringValue(profile)); |
| 354 | 354 |
| 355 EXPECT_CALL(*mock_manager_client_, | 355 EXPECT_CALL(*mock_manager_client_, |
| 356 ConfigureServiceForProfile(dbus::ObjectPath(profile), _, _, _)) | 356 ConfigureServiceForProfile(dbus::ObjectPath(profile), _, _, _)) |
| 357 .WillOnce( | 357 .WillOnce( |
| 358 Invoke(this, &NetworkConfigurationHandlerTest::OnConfigureService)); | 358 Invoke(this, &NetworkConfigurationHandlerTest::OnConfigureService)); |
| 359 network_configuration_handler_->CreateConfiguration( | 359 network_configuration_handler_->CreateConfiguration( |
| 360 value, | 360 value, |
| 361 base::Bind(&StringResultCallback, std::string("/service/2")), | 361 base::Bind(&StringResultCallback, std::string("/service/2")), |
| 362 base::Bind(&ErrorCallback, false, std::string(""))); | 362 base::Bind(&ErrorCallback, false, std::string())); |
| 363 message_loop_.RunUntilIdle(); | 363 message_loop_.RunUntilIdle(); |
| 364 } | 364 } |
| 365 | 365 |
| 366 TEST_F(NetworkConfigurationHandlerTest, RemoveConfiguration) { | 366 TEST_F(NetworkConfigurationHandlerTest, RemoveConfiguration) { |
| 367 std::string service_path = "/service/1"; | 367 std::string service_path = "/service/1"; |
| 368 | 368 |
| 369 TestCallback test_callback; | 369 TestCallback test_callback; |
| 370 EXPECT_CALL( | 370 EXPECT_CALL( |
| 371 *mock_service_client_, | 371 *mock_service_client_, |
| 372 GetLoadableProfileEntries(_, _)).WillOnce(Invoke( | 372 GetLoadableProfileEntries(_, _)).WillOnce(Invoke( |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 create_service_path_, shill::kGuidProperty, &guid)); | 617 create_service_path_, shill::kGuidProperty, &guid)); |
| 618 EXPECT_EQ(service_path, guid); | 618 EXPECT_EQ(service_path, guid); |
| 619 | 619 |
| 620 std::string actual_profile; | 620 std::string actual_profile; |
| 621 EXPECT_TRUE(GetServiceStringProperty( | 621 EXPECT_TRUE(GetServiceStringProperty( |
| 622 create_service_path_, shill::kProfileProperty, &actual_profile)); | 622 create_service_path_, shill::kProfileProperty, &actual_profile)); |
| 623 EXPECT_EQ(shill_stub_helper::kSharedProfilePath, actual_profile); | 623 EXPECT_EQ(shill_stub_helper::kSharedProfilePath, actual_profile); |
| 624 } | 624 } |
| 625 | 625 |
| 626 } // namespace chromeos | 626 } // namespace chromeos |
| OLD | NEW |