Index: update_attempter_unittest.cc |
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc |
index 2c5c33c10c683b3836a0411cc37e173cba6ed94e..9886d63e135e5536d49c5ce4009dc93dfc36a4a9 100644 |
--- a/update_attempter_unittest.cc |
+++ b/update_attempter_unittest.cc |
@@ -299,4 +299,19 @@ TEST_F(UpdateAttempterTest, UpdateTest) { |
loop_ = NULL; |
} |
+TEST_F(UpdateAttempterTest, PingOmahaTest) { |
adlr
2011/04/15 22:04:51
you should probably set up a GMainLoop in here and
thieule
2011/04/15 23:32:57
Done.
|
+ EXPECT_CALL(*processor_, |
+ EnqueueAction(Property(&AbstractAction::Type, |
+ OmahaRequestAction::StaticType()))) |
+ .Times(1); |
+ EXPECT_CALL(*processor_, StartProcessing()).Times(1); |
+ UpdateCheckScheduler scheduler(&attempter_); |
+ scheduler.enabled_ = true; |
+ EXPECT_EQ(false, scheduler.scheduled_); |
+ attempter_.set_update_check_scheduler(&scheduler); |
+ attempter_.PingOmaha(); |
+ EXPECT_EQ(UPDATE_STATUS_UPDATED_NEED_REBOOT, attempter_.status()); |
+ EXPECT_EQ(true, scheduler.scheduled_); |
+} |
+ |
} // namespace chromeos_update_engine |