| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <gflags/gflags.h> | 5 #include <gflags/gflags.h> |
| 6 #include <gtest/gtest.h> | 6 #include <gtest/gtest.h> |
| 7 | 7 |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "crash/system_logging_mock.h" | 9 #include "crash-reporter/system_logging_mock.h" |
| 10 #include "crash/user_collector.h" | 10 #include "crash-reporter/user_collector.h" |
| 11 | 11 |
| 12 int s_crashes = 0; | 12 int s_crashes = 0; |
| 13 bool s_metrics = false; | 13 bool s_metrics = false; |
| 14 | 14 |
| 15 static const char kFilePath[] = "/my/path"; | 15 static const char kFilePath[] = "/my/path"; |
| 16 | 16 |
| 17 void CountCrash() { | 17 void CountCrash() { |
| 18 ++s_crashes; | 18 ++s_crashes; |
| 19 } | 19 } |
| 20 | 20 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 ASSERT_NE(logging_.log().find( | 93 ASSERT_NE(logging_.log().find( |
| 94 "Received crash notification for chrome[5] sig 2"), | 94 "Received crash notification for chrome[5] sig 2"), |
| 95 std::string::npos); | 95 std::string::npos); |
| 96 ASSERT_EQ(s_crashes, 1); | 96 ASSERT_EQ(s_crashes, 1); |
| 97 } | 97 } |
| 98 | 98 |
| 99 int main(int argc, char **argv) { | 99 int main(int argc, char **argv) { |
| 100 ::testing::InitGoogleTest(&argc, argv); | 100 ::testing::InitGoogleTest(&argc, argv); |
| 101 return RUN_ALL_TESTS(); | 101 return RUN_ALL_TESTS(); |
| 102 } | 102 } |
| OLD | NEW |