Index: third_party/crashpad/crashpad/client/crash_report_database_test.cc |
diff --git a/third_party/crashpad/crashpad/client/crash_report_database_test.cc b/third_party/crashpad/crashpad/client/crash_report_database_test.cc |
index 0d05df1522025136a4a3cd1e3cf90e102c0e00ea..da44ebfb6c2845b45e70ba57cc531c1b04f715af 100644 |
--- a/third_party/crashpad/crashpad/client/crash_report_database_test.cc |
+++ b/third_party/crashpad/crashpad/client/crash_report_database_test.cc |
@@ -478,6 +478,22 @@ TEST_F(CrashReportDatabaseTest, DuelingUploads) { |
CrashReportDatabase::kNoError); |
} |
+TEST_F(CrashReportDatabaseTest, UploadAlreadyUploaded) { |
+ CrashReportDatabase::Report report; |
+ CreateCrashReport(&report); |
+ |
+ const CrashReportDatabase::Report* upload_report; |
+ EXPECT_EQ(db()->GetReportForUploading(report.uuid, &upload_report), |
+ CrashReportDatabase::kNoError); |
+ EXPECT_EQ(db()->RecordUploadAttempt(upload_report, true, std::string()), |
+ CrashReportDatabase::kNoError); |
+ |
+ const CrashReportDatabase::Report* upload_report_2 = nullptr; |
+ EXPECT_EQ(db()->GetReportForUploading(report.uuid, &upload_report_2), |
+ CrashReportDatabase::kReportNotFound); |
+ EXPECT_FALSE(upload_report_2); |
+} |
+ |
TEST_F(CrashReportDatabaseTest, MoveDatabase) { |
CrashReportDatabase::NewReport* new_report; |
EXPECT_EQ(db()->PrepareNewCrashReport(&new_report), |