| Index: utils_unittest.cc
|
| diff --git a/utils_unittest.cc b/utils_unittest.cc
|
| index d8bc866a286f264ce8cf8b727cc70016f40f4fd3..185ab9a42824e4e14d42a801b22d31c8224ac819 100644
|
| --- a/utils_unittest.cc
|
| +++ b/utils_unittest.cc
|
| @@ -255,4 +255,22 @@ TEST(UtilsTest, RunAsRootGetFilesystemSizeTest) {
|
| EXPECT_EQ(10 * 1024 * 1024 / 4096, block_count);
|
| }
|
|
|
| +namespace {
|
| +gboolean TerminateScheduleCrashReporterUploadTest(void* arg) {
|
| + GMainLoop* loop = reinterpret_cast<GMainLoop*>(arg);
|
| + g_main_loop_quit(loop);
|
| + return FALSE; // Don't call this callback again
|
| +}
|
| +} // namespace {}
|
| +
|
| +TEST(UtilsTest, ScheduleCrashReporterUploadTest) {
|
| + // Not much to test. At least this tests for memory leaks, crashes,
|
| + // log errors.
|
| + GMainLoop* loop = g_main_loop_new(g_main_context_default(), FALSE);
|
| + utils::ScheduleCrashReporterUpload();
|
| + g_timeout_add_seconds(1, &TerminateScheduleCrashReporterUploadTest, loop);
|
| + g_main_loop_run(loop);
|
| + g_main_loop_unref(loop);
|
| +}
|
| +
|
| } // namespace chromeos_update_engine
|
|
|