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

Unified Diff: delta_performer_unittest.cc

Issue 3547019: AU: DeltaPerformer performs the download size/hash check now. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: 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 | « delta_performer.cc ('k') | download_action.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: delta_performer_unittest.cc
diff --git a/delta_performer_unittest.cc b/delta_performer_unittest.cc
index 12de8a9a24e1784d2e2e6e5ad20dad154165116c..cf3ff462ef78e79ec68452bc44e4ff961a1be631 100755
--- a/delta_performer_unittest.cc
+++ b/delta_performer_unittest.cc
@@ -247,8 +247,10 @@ TEST(DeltaPerformerTest, RunAsRootSmallImageTest) {
.WillRepeatedly(Return(true));
EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextDataOffset, _))
.WillRepeatedly(Return(true));
- EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSignedSHA256Context, _))
+ EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSHA256Context, _))
.WillRepeatedly(Return(true));
+ EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSignedSHA256Context, _))
+ .WillOnce(Return(true));
// Update the A image in place.
DeltaPerformer performer(&prefs);
@@ -274,7 +276,10 @@ TEST(DeltaPerformerTest, RunAsRootSmallImageTest) {
strlen(new_data_string)));
EXPECT_TRUE(utils::FileExists(kUnittestPublicKeyPath));
- EXPECT_TRUE(performer.VerifyPayload(kUnittestPublicKeyPath));
+ EXPECT_TRUE(performer.VerifyPayload(
+ kUnittestPublicKeyPath,
+ OmahaHashCalculator::OmahaHashOfData(delta),
+ delta.size()));
}
} // namespace chromeos_update_engine
« no previous file with comments | « delta_performer.cc ('k') | download_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698