Index: client/crash_report_database_test.cc |
diff --git a/client/crash_report_database_test.cc b/client/crash_report_database_test.cc |
index d2464863fea4e9b5914b98ab9d20347bdf0fb4ac..60bcf43bd0812f0c38bb2adc212420239e627ccb 100644 |
--- a/client/crash_report_database_test.cc |
+++ b/client/crash_report_database_test.cc |
@@ -133,6 +133,7 @@ TEST_F(CrashReportDatabaseTest, NewCrashReport) { |
CrashReportDatabase::NewReport* new_report; |
EXPECT_EQ(CrashReportDatabase::kNoError, |
db()->PrepareNewCrashReport(&new_report)); |
+ EXPECT_TRUE(FileExistsAtPath(new_report->path)) << new_report->path.value(); |
UUID uuid; |
EXPECT_EQ(CrashReportDatabase::kNoError, |
db()->FinishedWritingCrashReport(new_report, &uuid)); |
@@ -154,6 +155,17 @@ TEST_F(CrashReportDatabaseTest, NewCrashReport) { |
EXPECT_TRUE(reports.empty()); |
} |
+TEST_F(CrashReportDatabaseTest, ErrorWritingCrashReport) { |
+ CrashReportDatabase::NewReport* new_report; |
+ EXPECT_EQ(CrashReportDatabase::kNoError, |
+ db()->PrepareNewCrashReport(&new_report)); |
+ base::FilePath new_report_path = new_report->path; |
+ EXPECT_TRUE(FileExistsAtPath(new_report_path)) << new_report_path.value(); |
+ EXPECT_EQ(CrashReportDatabase::kNoError, |
+ db()->ErrorWritingCrashReport(new_report)); |
+ EXPECT_FALSE(FileExistsAtPath(new_report_path)) << new_report_path.value(); |
+} |
+ |
TEST_F(CrashReportDatabaseTest, LookUpCrashReport) { |
UUID uuid; |