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

Side by Side Diff: chromecast/crash/linux/minidump_writer_unittest.cc

Issue 2322573002: misc files A-P: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chromecast/crash/linux/minidump_writer.h" 5 #include "chromecast/crash/linux/minidump_writer.h"
6 6
7 #include <fstream> 7 #include <fstream>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 class MinidumpWriterTest : public testing::Test { 45 class MinidumpWriterTest : public testing::Test {
46 protected: 46 protected:
47 MinidumpWriterTest() {} 47 MinidumpWriterTest() {}
48 ~MinidumpWriterTest() override {} 48 ~MinidumpWriterTest() override {}
49 49
50 void SetUp() override { 50 void SetUp() override {
51 // Set up a temporary directory which will be used as our fake home dir. 51 // Set up a temporary directory which will be used as our fake home dir.
52 ASSERT_TRUE(fake_home_dir_.CreateUniqueTempDir()); 52 ASSERT_TRUE(fake_home_dir_.CreateUniqueTempDir());
53 home_.reset( 53 home_.reset(
54 new base::ScopedPathOverride(base::DIR_HOME, fake_home_dir_.path())); 54 new base::ScopedPathOverride(base::DIR_HOME, fake_home_dir_.GetPath()));
55 55
56 minidump_dir_ = fake_home_dir_.path().Append(kMinidumpSubdir); 56 minidump_dir_ = fake_home_dir_.GetPath().Append(kMinidumpSubdir);
57 dumplog_file_ = minidump_dir_.Append(kDumplogFile); 57 dumplog_file_ = minidump_dir_.Append(kDumplogFile);
58 lockfile_path_ = minidump_dir_.Append(kLockfileName); 58 lockfile_path_ = minidump_dir_.Append(kLockfileName);
59 metadata_path_ = minidump_dir_.Append(kMetadataName); 59 metadata_path_ = minidump_dir_.Append(kMetadataName);
60 60
61 // Create the minidump directory 61 // Create the minidump directory
62 ASSERT_TRUE(base::CreateDirectory(minidump_dir_)); 62 ASSERT_TRUE(base::CreateDirectory(minidump_dir_));
63 63
64 // Lockfile will be automatically created by AppendLockFile 64 // Lockfile will be automatically created by AppendLockFile
65 } 65 }
66 66
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 TEST_F(MinidumpWriterTest, Write_FailsWithSubdirInCorrectPath) { 121 TEST_F(MinidumpWriterTest, Write_FailsWithSubdirInCorrectPath) {
122 MinidumpWriter writer(&fake_generator_, 122 MinidumpWriter writer(&fake_generator_,
123 dumplog_file_.Append("subdir/logfile").value(), 123 dumplog_file_.Append("subdir/logfile").value(),
124 MinidumpParams(), 124 MinidumpParams(),
125 base::Bind(&FakeDumpState)); 125 base::Bind(&FakeDumpState));
126 ASSERT_EQ(-1, writer.Write()); 126 ASSERT_EQ(-1, writer.Write());
127 } 127 }
128 128
129 } // namespace chromecast 129 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/crash/linux/minidump_uploader_unittest.cc ('k') | chromecast/crash/linux/synchronized_minidump_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698