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

Unified Diff: base/json/json_value_serializer_unittest.cc

Issue 2275553005: //base: Make ScopedTempDir::path() a GetPath() with a DCHECK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 4 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/files/scoped_temp_dir_unittest.cc ('k') | base/mac/mac_util_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_value_serializer_unittest.cc
diff --git a/base/json/json_value_serializer_unittest.cc b/base/json/json_value_serializer_unittest.cc
index f1c1999849cf36a85a9ba54ab56615cd13e92236..5bf07fd386cde55f45f30a3300ec6188d7430d10 100644
--- a/base/json/json_value_serializer_unittest.cc
+++ b/base/json/json_value_serializer_unittest.cc
@@ -148,7 +148,7 @@ TEST(JSONValueDeserializerTest, ReadProperJSONFromFile) {
ScopedTempDir tempdir;
ASSERT_TRUE(tempdir.CreateUniqueTempDir());
// Write it down in the file.
- FilePath temp_file(tempdir.path().AppendASCII("test.json"));
+ FilePath temp_file(tempdir.GetPath().AppendASCII("test.json"));
ASSERT_EQ(static_cast<int>(strlen(kProperJSON)),
WriteFile(temp_file, kProperJSON, strlen(kProperJSON)));
@@ -172,7 +172,7 @@ TEST(JSONValueDeserializerTest, ReadJSONWithCommasFromFile) {
ScopedTempDir tempdir;
ASSERT_TRUE(tempdir.CreateUniqueTempDir());
// Write it down in the file.
- FilePath temp_file(tempdir.path().AppendASCII("test.json"));
+ FilePath temp_file(tempdir.GetPath().AppendASCII("test.json"));
ASSERT_EQ(static_cast<int>(strlen(kProperJSONWithCommas)),
WriteFile(temp_file, kProperJSONWithCommas,
strlen(kProperJSONWithCommas)));
@@ -431,7 +431,7 @@ TEST_F(JSONFileValueSerializerTest, Roundtrip) {
// Now try writing.
const FilePath written_file_path =
- temp_dir_.path().AppendASCII("test_output.js");
+ temp_dir_.GetPath().AppendASCII("test_output.js");
ASSERT_FALSE(PathExists(written_file_path));
JSONFileValueSerializer serializer(written_file_path);
@@ -456,7 +456,8 @@ TEST_F(JSONFileValueSerializerTest, RoundtripNested) {
ASSERT_TRUE(root);
// Now try writing.
- FilePath written_file_path = temp_dir_.path().AppendASCII("test_output.json");
+ FilePath written_file_path =
+ temp_dir_.GetPath().AppendASCII("test_output.json");
ASSERT_FALSE(PathExists(written_file_path));
JSONFileValueSerializer serializer(written_file_path);
« no previous file with comments | « base/files/scoped_temp_dir_unittest.cc ('k') | base/mac/mac_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698