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

Unified Diff: client/crash_report_database_test.cc

Issue 1391993002: win: Set last-upload-attempt time in CrashReportDatabaseWin (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 2 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 | « no previous file | client/crash_report_database_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/crash_report_database_test.cc
diff --git a/client/crash_report_database_test.cc b/client/crash_report_database_test.cc
index 5e728d928d68ff9048ceb7602719652668de217d..9ed7fe9837abeb98eb2f1155202c1b6f886dbc0e 100644
--- a/client/crash_report_database_test.cc
+++ b/client/crash_report_database_test.cc
@@ -65,14 +65,10 @@ class CrashReportDatabaseTest : public testing::Test {
}
void UploadReport(const UUID& uuid, bool successful, const std::string& id) {
-#if !defined(OS_WIN)
- // Enable when ported to Windows.
- // https://code.google.com/p/crashpad/issues/detail?id=13
Settings* const settings = db_->GetSettings();
ASSERT_TRUE(settings);
time_t times[2];
ASSERT_TRUE(settings->GetLastUploadAttemptTime(&times[0]));
-#endif
const CrashReportDatabase::Report* report = nullptr;
ASSERT_EQ(CrashReportDatabase::kNoError,
@@ -85,13 +81,9 @@ class CrashReportDatabaseTest : public testing::Test {
EXPECT_EQ(CrashReportDatabase::kNoError,
db_->RecordUploadAttempt(report, successful, id));
-#if !defined(OS_WIN)
- // Enable when ported to Windows.
- // https://code.google.com/p/crashpad/issues/detail?id=13
ASSERT_TRUE(settings->GetLastUploadAttemptTime(&times[1]));
EXPECT_NE(times[1], 0);
EXPECT_GE(times[1], times[0]);
-#endif
}
void ExpectPreparedCrashReport(const CrashReportDatabase::Report& report) {
@@ -122,9 +114,6 @@ TEST_F(CrashReportDatabaseTest, Initialize) {
// Initialize the database for the first time, creating it.
ASSERT_TRUE(db());
-#if !defined(OS_WIN)
- // Enable when ported to Windows.
- // https://code.google.com/p/crashpad/issues/detail?id=13
Settings* settings = db()->GetSettings();
UUID client_ids[2];
@@ -134,7 +123,6 @@ TEST_F(CrashReportDatabaseTest, Initialize) {
time_t last_upload_attempt_time;
ASSERT_TRUE(settings->GetLastUploadAttemptTime(&last_upload_attempt_time));
EXPECT_EQ(0, last_upload_attempt_time);
-#endif
// Close and reopen the database at the same path.
ResetDatabase();
@@ -142,9 +130,6 @@ TEST_F(CrashReportDatabaseTest, Initialize) {
auto db = CrashReportDatabase::Initialize(path());
ASSERT_TRUE(db);
-#if !defined(OS_WIN)
- // Enable when ported to Windows.
- // https://code.google.com/p/crashpad/issues/detail?id=13
settings = db->GetSettings();
ASSERT_TRUE(settings->GetClientID(&client_ids[1]));
@@ -152,7 +137,6 @@ TEST_F(CrashReportDatabaseTest, Initialize) {
ASSERT_TRUE(settings->GetLastUploadAttemptTime(&last_upload_attempt_time));
EXPECT_EQ(0, last_upload_attempt_time);
-#endif
std::vector<CrashReportDatabase::Report> reports;
EXPECT_EQ(CrashReportDatabase::kNoError, db->GetPendingReports(&reports));
« no previous file with comments | « no previous file | client/crash_report_database_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698