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

Unified Diff: client/crash_report_database_test.cc

Issue 875043004: win: Partial fixes for client_test after CrashReportDatabase added (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 11 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 | « client/client.gyp ('k') | no next file » | 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 93967b9caa4849ba59162cbf0a152ad4aa5f29ba..d2464863fea4e9b5914b98ab9d20347bdf0fb4ac 100644
--- a/client/crash_report_database_test.cc
+++ b/client/crash_report_database_test.cc
@@ -28,6 +28,9 @@ bool FileExistsAtPath(const base::FilePath& path) {
#if defined(OS_POSIX)
struct stat st;
return lstat(path.value().c_str(), &st) == 0;
+#elif defined(OS_WIN)
+ struct _stat st;
+ return _wstat(path.value().c_str(), &st);
#else
#error "Not implemented"
#endif
@@ -37,7 +40,11 @@ void CreateFile(const base::FilePath& path) {
FileHandle handle = LoggingOpenFileForWrite(path,
FileWriteMode::kCreateOrFail,
FilePermissions::kWorldReadable);
+#if defined(OS_POSIX)
ASSERT_GE(handle, 0);
+#elif defined(OS_WIN)
+ ASSERT_NE(handle, nullptr);
+#endif
ASSERT_TRUE(
LoggingWriteFile(handle, path.value().c_str(), path.value().length()));
ASSERT_TRUE(LoggingCloseFile(handle));
« no previous file with comments | « client/client.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698