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

Unified Diff: crash_collector_test.cc

Issue 4088003: crash-reporter: write conversion failure diagnostics into fake dmp files (Closed) Base URL: http://git.chromium.org/git/crash-reporter.git
Patch Set: Add signature for error logs Created 10 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 | « crash_collector.cc ('k') | crash_sender » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crash_collector_test.cc
diff --git a/crash_collector_test.cc b/crash_collector_test.cc
index ffab06af85cdbfea44a7955b3be01d43188e72f5..859653b13288acef286d2fecaf601e828233d3bf 100644
--- a/crash_collector_test.cc
+++ b/crash_collector_test.cc
@@ -120,6 +120,18 @@ TEST_F(CrashCollectorTest, FormatDumpBasename) {
ASSERT_EQ("foo.20100523.135015.100", basename);
}
+TEST_F(CrashCollectorTest, GetCrashPath) {
+ EXPECT_EQ("/var/spool/crash/myprog.20100101.1200.1234.core",
+ collector_.GetCrashPath(FilePath("/var/spool/crash"),
+ "myprog.20100101.1200.1234",
+ "core").value());
+ EXPECT_EQ("/home/chronos/user/crash/chrome.20100101.1200.1234.dmp",
+ collector_.GetCrashPath(FilePath("/home/chronos/user/crash"),
+ "chrome.20100101.1200.1234",
+ "dmp").value());
+}
+
+
bool CrashCollectorTest::CheckHasCapacity() {
static const char kFullMessage[] = "Crash directory test already full";
bool has_capacity = collector_.CheckHasCapacity(test_dir_);
@@ -238,6 +250,7 @@ TEST_F(CrashCollectorTest, MetaData) {
EXPECT_EQ("foo=bar\n"
"exec_name=kernel\n"
"ver=version\n"
+ "payload=test/payload-file\n"
"payload_size=3\n"
"done=1\n", contents);
}
« no previous file with comments | « crash_collector.cc ('k') | crash_sender » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698