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

Side by Side Diff: filesystem_copier_action_unittest.cc

Issue 5205002: AU: Manual proxy support (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: missed one fix for review Created 10 years, 1 month 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 | « download_action_unittest.cc ('k') | http_fetcher.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) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 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 <fcntl.h> 5 #include <fcntl.h>
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 // Make sure everything in the out_image is there 186 // Make sure everything in the out_image is there
187 vector<char> a_out; 187 vector<char> a_out;
188 vector<char> b_out; 188 vector<char> b_out;
189 EXPECT_TRUE(utils::ReadFile(a_dev, &a_out)); 189 EXPECT_TRUE(utils::ReadFile(a_dev, &a_out));
190 EXPECT_TRUE(utils::ReadFile(b_dev, &b_out)); 190 EXPECT_TRUE(utils::ReadFile(b_dev, &b_out));
191 EXPECT_TRUE(ExpectVectorsEq(a_out, b_out)); 191 EXPECT_TRUE(ExpectVectorsEq(a_out, b_out));
192 EXPECT_TRUE(ExpectVectorsEq(a_loop_data, a_out)); 192 EXPECT_TRUE(ExpectVectorsEq(a_loop_data, a_out));
193 193
194 EXPECT_TRUE(collector_action.object() == install_plan); 194 EXPECT_TRUE(collector_action.object() == install_plan);
195 if (terminate_early) {
196 // sleep so OS can clean up
197 sleep(1);
198 }
195 } 199 }
196 200
197 class FilesystemCopierActionTest2Delegate : public ActionProcessorDelegate { 201 class FilesystemCopierActionTest2Delegate : public ActionProcessorDelegate {
198 public: 202 public:
199 void ActionCompleted(ActionProcessor* processor, 203 void ActionCompleted(ActionProcessor* processor,
200 AbstractAction* action, 204 AbstractAction* action,
201 ActionExitCode code) { 205 ActionExitCode code) {
202 if (action->Type() == FilesystemCopierAction::StaticType()) { 206 if (action->Type() == FilesystemCopierAction::StaticType()) {
203 ran_ = true; 207 ran_ = true;
204 code_ = code; 208 code_ = code;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 ScopedFdCloser fd_closer(&fd); 344 ScopedFdCloser fd_closer(&fd);
341 action.DetermineFilesystemSize(fd); 345 action.DetermineFilesystemSize(fd);
342 } 346 }
343 EXPECT_EQ(is_kernel ? kint64max : 10 * 1024 * 1024, 347 EXPECT_EQ(is_kernel ? kint64max : 10 * 1024 * 1024,
344 action.filesystem_size_); 348 action.filesystem_size_);
345 } 349 }
346 } 350 }
347 351
348 352
349 } // namespace chromeos_update_engine 353 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « download_action_unittest.cc ('k') | http_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698