| 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 "chromeos/network/onc/onc_test_utils.h" |   5 #include "chromeos/network/onc/onc_test_utils.h" | 
|   6  |   6  | 
|   7 #include "base/file_util.h" |   7 #include "base/file_util.h" | 
|   8 #include "base/files/file_path.h" |   8 #include "base/files/file_path.h" | 
|   9 #include "base/json/json_file_value_serializer.h" |   9 #include "base/json/json_file_value_serializer.h" | 
|  10 #include "base/logging.h" |  10 #include "base/logging.h" | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
|  26 std::string ReadTestData(const std::string& filename) { |  26 std::string ReadTestData(const std::string& filename) { | 
|  27   base::FilePath path; |  27   base::FilePath path; | 
|  28   if (!chromeos::test_utils::GetTestDataPath(kNetworkComponentDirectory, |  28   if (!chromeos::test_utils::GetTestDataPath(kNetworkComponentDirectory, | 
|  29                                              filename, |  29                                              filename, | 
|  30                                              &path)) { |  30                                              &path)) { | 
|  31     NOTREACHED() << "Unable to get test data path for " |  31     NOTREACHED() << "Unable to get test data path for " | 
|  32                  << kNetworkComponentDirectory << "/" << filename; |  32                  << kNetworkComponentDirectory << "/" << filename; | 
|  33     return ""; |  33     return ""; | 
|  34   } |  34   } | 
|  35   std::string result; |  35   std::string result; | 
|  36   file_util::ReadFileToString(path, &result); |  36   base::ReadFileToString(path, &result); | 
|  37   return result; |  37   return result; | 
|  38 } |  38 } | 
|  39  |  39  | 
|  40 scoped_ptr<base::DictionaryValue> ReadTestDictionary( |  40 scoped_ptr<base::DictionaryValue> ReadTestDictionary( | 
|  41     const std::string& filename) { |  41     const std::string& filename) { | 
|  42   base::DictionaryValue* dict = NULL; |  42   base::DictionaryValue* dict = NULL; | 
|  43   base::FilePath path; |  43   base::FilePath path; | 
|  44   if (!chromeos::test_utils::GetTestDataPath(kNetworkComponentDirectory, |  44   if (!chromeos::test_utils::GetTestDataPath(kNetworkComponentDirectory, | 
|  45                                              filename, |  45                                              filename, | 
|  46                                              &path)) { |  46                                              &path)) { | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
|  74     return ::testing::AssertionSuccess() << "Values are equal"; |  74     return ::testing::AssertionSuccess() << "Values are equal"; | 
|  75  |  75  | 
|  76   return ::testing::AssertionFailure() << "Values are unequal.\n" |  76   return ::testing::AssertionFailure() << "Values are unequal.\n" | 
|  77                                        << "Expected value:\n" << *expected |  77                                        << "Expected value:\n" << *expected | 
|  78                                        << "Actual value:\n" << *actual; |  78                                        << "Actual value:\n" << *actual; | 
|  79 } |  79 } | 
|  80  |  80  | 
|  81 }  // namespace test_utils |  81 }  // namespace test_utils | 
|  82 }  // namespace onc |  82 }  // namespace onc | 
|  83 }  // namespace chromeos |  83 }  // namespace chromeos | 
| OLD | NEW |