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

Unified Diff: filesystem_copier_action_unittest.cc

Issue 3620013: AU: Resume interrupted update attempts. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: fix setup download 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 | « filesystem_copier_action.cc ('k') | generate_delta_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filesystem_copier_action_unittest.cc
diff --git a/filesystem_copier_action_unittest.cc b/filesystem_copier_action_unittest.cc
index f82097eb7388176e0bc2ae5fbe7b467e75f757a1..d9305ff55deb0dfb7b7ac857b4981a7b250c0595 100644
--- a/filesystem_copier_action_unittest.cc
+++ b/filesystem_copier_action_unittest.cc
@@ -249,6 +249,32 @@ TEST_F(FilesystemCopierActionTest, FullUpdateTest) {
EXPECT_EQ(kUrl, collector_action.object().download_url);
}
+TEST_F(FilesystemCopierActionTest, ResumeTest) {
+ ActionProcessor processor;
+ FilesystemCopierActionTest2Delegate delegate;
+
+ processor.set_delegate(&delegate);
+
+ ObjectFeederAction<InstallPlan> feeder_action;
+ const char* kUrl = "http://some/url";
+ InstallPlan install_plan(false, true, kUrl, 0, "", "", "");
+ feeder_action.set_obj(install_plan);
+ FilesystemCopierAction copier_action(false);
+ ObjectCollectorAction<InstallPlan> collector_action;
+
+ BondActions(&feeder_action, &copier_action);
+ BondActions(&copier_action, &collector_action);
+
+ processor.EnqueueAction(&feeder_action);
+ processor.EnqueueAction(&copier_action);
+ processor.EnqueueAction(&collector_action);
+ processor.StartProcessing();
+ EXPECT_FALSE(processor.IsRunning());
+ EXPECT_TRUE(delegate.ran_);
+ EXPECT_EQ(kActionCodeSuccess, delegate.code_);
+ EXPECT_EQ(kUrl, collector_action.object().download_url);
+}
+
TEST_F(FilesystemCopierActionTest, NonExistentDriveTest) {
ActionProcessor processor;
FilesystemCopierActionTest2Delegate delegate;
« no previous file with comments | « filesystem_copier_action.cc ('k') | generate_delta_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698