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

Unified Diff: download_action_unittest.cc

Issue 3521016: AU: Start checkpointing update progress. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: address review comments 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 | « download_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: download_action_unittest.cc
diff --git a/download_action_unittest.cc b/download_action_unittest.cc
index 9ae952299e6d74bece936e903298c0c41549c0ab..3e8aabd0114451bfe1ebd314d430bd9ed70e05b0 100644
--- a/download_action_unittest.cc
+++ b/download_action_unittest.cc
@@ -4,13 +4,16 @@
#include <string>
#include <vector>
+
#include <glib.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
+
#include "update_engine/action_pipe.h"
#include "update_engine/download_action.h"
#include "update_engine/mock_http_fetcher.h"
#include "update_engine/omaha_hash_calculator.h"
+#include "update_engine/prefs_mock.h"
#include "update_engine/test_utils.h"
#include "update_engine/utils.h"
@@ -106,8 +109,9 @@ void TestWithData(const vector<char>& data,
"");
ObjectFeederAction<InstallPlan> feeder_action;
feeder_action.set_obj(install_plan);
- DownloadAction download_action(new MockHttpFetcher(&data[0],
- data.size()));
+ PrefsMock prefs;
+ DownloadAction download_action(&prefs, new MockHttpFetcher(&data[0],
+ data.size()));
download_action.SetTestFileWriter(&writer);
BondActions(&feeder_action, &download_action);
DownloadActionDelegateMock download_delegate;
@@ -225,7 +229,9 @@ void TestTerminateEarly(bool use_download_delegate) {
ObjectFeederAction<InstallPlan> feeder_action;
InstallPlan install_plan(true, "", 0, "", temp_file.GetPath(), "");
feeder_action.set_obj(install_plan);
- DownloadAction download_action(new MockHttpFetcher(&data[0], data.size()));
+ PrefsMock prefs;
+ DownloadAction download_action(&prefs,
+ new MockHttpFetcher(&data[0], data.size()));
download_action.SetTestFileWriter(&writer);
DownloadActionDelegateMock download_delegate;
if (use_download_delegate) {
@@ -327,7 +333,8 @@ TEST(DownloadActionTest, PassObjectOutTest) {
"/dev/null");
ObjectFeederAction<InstallPlan> feeder_action;
feeder_action.set_obj(install_plan);
- DownloadAction download_action(new MockHttpFetcher("x", 1));
+ PrefsMock prefs;
+ DownloadAction download_action(&prefs, new MockHttpFetcher("x", 1));
download_action.SetTestFileWriter(&writer);
DownloadActionTestAction test_action;
@@ -360,7 +367,8 @@ TEST(DownloadActionTest, BadOutFileTest) {
InstallPlan install_plan(true, "", 0, "", path, "");
ObjectFeederAction<InstallPlan> feeder_action;
feeder_action.set_obj(install_plan);
- DownloadAction download_action(new MockHttpFetcher("x", 1));
+ PrefsMock prefs;
+ DownloadAction download_action(&prefs, new MockHttpFetcher("x", 1));
download_action.SetTestFileWriter(&writer);
BondActions(&feeder_action, &download_action);
« no previous file with comments | « download_action.cc ('k') | generate_delta_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698