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

Unified Diff: update_attempter_unittest.cc

Issue 6836025: Add support to update_engine to poke Omaha after an update has been applied (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Change to use <ping> element with active=1 Created 9 years, 8 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
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
« update_attempter.cc ('K') | « update_attempter.cc ('k') | update_check_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698