| Index: chromeos/network/onc/onc_test_utils.cc
|
| diff --git a/chromeos/network/onc/onc_test_utils.cc b/chromeos/network/onc/onc_test_utils.cc
|
| index 0a948bfc432555c6707011f86aee8bb97af24933..65bbd3d118dc1ae329fbdc88c993675575656aa4 100644
|
| --- a/chromeos/network/onc/onc_test_utils.cc
|
| +++ b/chromeos/network/onc/onc_test_utils.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chromeos/network/onc/onc_test_utils.h"
|
|
|
| #include "base/file_path.h"
|
| +#include "base/file_util.h"
|
| #include "base/json/json_file_value_serializer.h"
|
| #include "base/logging.h"
|
| #include "base/path_service.h"
|
| @@ -22,6 +23,20 @@ const char kNetworkComponentDirectory[] = "network";
|
|
|
| } // namespace
|
|
|
| +std::string ReadTestData(const std::string& filename) {
|
| + FilePath path;
|
| + if (!chromeos::test_utils::GetTestDataPath(kNetworkComponentDirectory,
|
| + filename,
|
| + &path)) {
|
| + NOTREACHED() << "Unable to get test data path for "
|
| + << kNetworkComponentDirectory << "/" << filename;
|
| + return "";
|
| + }
|
| + std::string result;
|
| + file_util::ReadFileToString(path, &result);
|
| + return result;
|
| +}
|
| +
|
| scoped_ptr<base::DictionaryValue> ReadTestDictionary(
|
| const std::string& filename) {
|
| base::DictionaryValue* dict = NULL;
|
|
|