| 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 <map> | 5 #include <map> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return arg.Equals(value); | 39 return arg.Equals(value); |
| 40 } | 40 } |
| 41 | 41 |
| 42 namespace chromeos { | 42 namespace chromeos { |
| 43 | 43 |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 static std::string PrettyJson(const base::DictionaryValue& value) { | 46 static std::string PrettyJson(const base::DictionaryValue& value) { |
| 47 std::string pretty; | 47 std::string pretty; |
| 48 base::JSONWriter::WriteWithOptions( | 48 base::JSONWriter::WriteWithOptions( |
| 49 &value, base::JSONWriter::OPTIONS_PRETTY_PRINT, &pretty); | 49 value, base::JSONWriter::OPTIONS_PRETTY_PRINT, &pretty); |
| 50 return pretty; | 50 return pretty; |
| 51 } | 51 } |
| 52 | 52 |
| 53 void DictionaryValueCallback(const std::string& expected_id, | 53 void DictionaryValueCallback(const std::string& expected_id, |
| 54 const std::string& expected_json, | 54 const std::string& expected_json, |
| 55 const std::string& service_path, | 55 const std::string& service_path, |
| 56 const base::DictionaryValue& dictionary) { | 56 const base::DictionaryValue& dictionary) { |
| 57 std::string dict_str = PrettyJson(dictionary); | 57 std::string dict_str = PrettyJson(dictionary); |
| 58 EXPECT_EQ(expected_json, dict_str); | 58 EXPECT_EQ(expected_json, dict_str); |
| 59 EXPECT_EQ(expected_id, service_path); | 59 EXPECT_EQ(expected_id, service_path); |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 EXPECT_FALSE(test_observer->HasConfiguration(service_path)); | 738 EXPECT_FALSE(test_observer->HasConfiguration(service_path)); |
| 739 EXPECT_FALSE(test_observer->HasConfigurationInProfile( | 739 EXPECT_FALSE(test_observer->HasConfigurationInProfile( |
| 740 service_path, NetworkProfileHandler::GetSharedProfilePath())); | 740 service_path, NetworkProfileHandler::GetSharedProfilePath())); |
| 741 EXPECT_FALSE( | 741 EXPECT_FALSE( |
| 742 test_observer->HasConfigurationInProfile(service_path, user_profile)); | 742 test_observer->HasConfigurationInProfile(service_path, user_profile)); |
| 743 | 743 |
| 744 network_configuration_handler_->RemoveObserver(test_observer.get()); | 744 network_configuration_handler_->RemoveObserver(test_observer.get()); |
| 745 } | 745 } |
| 746 | 746 |
| 747 } // namespace chromeos | 747 } // namespace chromeos |
| OLD | NEW |