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

Side by Side Diff: chromeos/network/onc/onc_utils_unittest.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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 (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_utils.h" 5 #include "chromeos/network/onc/onc_utils.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 15 matching lines...) Expand all
26 base::FilePath path; 26 base::FilePath path;
27 std::unique_ptr<base::Value> result; 27 std::unique_ptr<base::Value> result;
28 if (!test_utils::GetTestDataPath("network", filename, &path)) { 28 if (!test_utils::GetTestDataPath("network", filename, &path)) {
29 NOTREACHED() << "Unable to get test file path for: " << filename; 29 NOTREACHED() << "Unable to get test file path for: " << filename;
30 return result; 30 return result;
31 } 31 }
32 JSONFileValueDeserializer deserializer(path, 32 JSONFileValueDeserializer deserializer(path,
33 base::JSON_ALLOW_TRAILING_COMMAS); 33 base::JSON_ALLOW_TRAILING_COMMAS);
34 std::string error_message; 34 std::string error_message;
35 result = deserializer.Deserialize(nullptr, &error_message); 35 result = deserializer.Deserialize(nullptr, &error_message);
36 CHECK(result != nullptr) << "Couldn't json-deserialize file: " << filename 36 CHECK(result != nullptr);
37 << ": " << error_message;
38 return result; 37 return result;
39 } 38 }
40 39
41 } // namespace 40 } // namespace
42 41
43 namespace onc { 42 namespace onc {
44 43
45 TEST(ONCDecrypterTest, BrokenEncryptionIterations) { 44 TEST(ONCDecrypterTest, BrokenEncryptionIterations) {
46 std::unique_ptr<base::DictionaryValue> encrypted_onc = 45 std::unique_ptr<base::DictionaryValue> encrypted_onc =
47 test_utils::ReadTestDictionary("broken-encrypted-iterations.onc"); 46 test_utils::ReadTestDictionary("broken-encrypted-iterations.onc");
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 214
216 std::unique_ptr<base::DictionaryValue> actual_proxy_settings = 215 std::unique_ptr<base::DictionaryValue> actual_proxy_settings =
217 ConvertProxyConfigToOncProxySettings(*shill_proxy_config); 216 ConvertProxyConfigToOncProxySettings(*shill_proxy_config);
218 EXPECT_TRUE( 217 EXPECT_TRUE(
219 test_utils::Equals(onc_proxy_settings, actual_proxy_settings.get())); 218 test_utils::Equals(onc_proxy_settings, actual_proxy_settings.get()));
220 } 219 }
221 } 220 }
222 221
223 } // namespace onc 222 } // namespace onc
224 } // namespace chromeos 223 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698