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

Side by Side Diff: delta_performer_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « delta_performer.cc ('k') | download_action.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sys/mount.h> 5 #include <sys/mount.h>
6 #include <inttypes.h> 6 #include <inttypes.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 EXPECT_FALSE(manifest.new_kernel_info().hash().empty()); 252 EXPECT_FALSE(manifest.new_kernel_info().hash().empty());
253 EXPECT_FALSE(manifest.old_rootfs_info().hash().empty()); 253 EXPECT_FALSE(manifest.old_rootfs_info().hash().empty());
254 EXPECT_FALSE(manifest.new_rootfs_info().hash().empty()); 254 EXPECT_FALSE(manifest.new_rootfs_info().hash().empty());
255 } 255 }
256 256
257 PrefsMock prefs; 257 PrefsMock prefs;
258 EXPECT_CALL(prefs, SetInt64(kPrefsManifestMetadataSize, 258 EXPECT_CALL(prefs, SetInt64(kPrefsManifestMetadataSize,
259 manifest_metadata_size)).WillOnce(Return(true)); 259 manifest_metadata_size)).WillOnce(Return(true));
260 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextOperation, _)) 260 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextOperation, _))
261 .WillRepeatedly(Return(true)); 261 .WillRepeatedly(Return(true));
262 EXPECT_CALL(prefs, GetInt64(kPrefsUpdateStateNextOperation, _))
263 .WillOnce(Return(false));
262 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextDataOffset, _)) 264 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextDataOffset, _))
263 .WillRepeatedly(Return(true)); 265 .WillRepeatedly(Return(true));
264 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSHA256Context, _)) 266 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSHA256Context, _))
265 .WillRepeatedly(Return(true)); 267 .WillRepeatedly(Return(true));
266 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSignedSHA256Context, _)) 268 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSignedSHA256Context, _))
267 .WillOnce(Return(true)); 269 .WillOnce(Return(true));
268 270
269 // Update the A image in place. 271 // Update the A image in place.
270 DeltaPerformer performer(&prefs); 272 DeltaPerformer performer(&prefs);
271 273
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 graph[i].op.dst_extents(0).num_blocks()); 353 graph[i].op.dst_extents(0).num_blocks());
352 if (graph[i].op.type() != 354 if (graph[i].op.type() !=
353 DeltaArchiveManifest_InstallOperation_Type_REPLACE) { 355 DeltaArchiveManifest_InstallOperation_Type_REPLACE) {
354 EXPECT_EQ(DeltaArchiveManifest_InstallOperation_Type_REPLACE_BZ, 356 EXPECT_EQ(DeltaArchiveManifest_InstallOperation_Type_REPLACE_BZ,
355 graph[i].op.type()); 357 graph[i].op.type());
356 } 358 }
357 } 359 }
358 } 360 }
359 361
360 } // namespace chromeos_update_engine 362 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « delta_performer.cc ('k') | download_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698