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

Side by Side Diff: src/platform/update_engine/install_action_unittest.cc

Issue 467051: AU: Use Omaha ID rather than MAC address in delta updater (Closed)
Patch Set: fixes for review Created 11 years 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium 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/stat.h> 5 #include <sys/stat.h>
6 #include <sys/types.h> 6 #include <sys/types.h>
7 #include <errno.h> 7 #include <errno.h>
8 #include <utime.h> 8 #include <utime.h>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include <gtest/gtest.h> 13 #include <gtest/gtest.h>
14 #include "update_engine/delta_diff_generator.h" 14 #include "update_engine/delta_diff_generator.h"
15 #include "update_engine/filesystem_iterator.h" 15 #include "update_engine/filesystem_iterator.h"
16 #include "update_engine/install_action.h" 16 #include "update_engine/install_action.h"
17 #include "update_engine/test_utils.h" 17 #include "update_engine/test_utils.h"
18 #include "update_engine/utils.h" 18 #include "update_engine/utils.h"
19 19
20 using chromeos_update_engine::DeltaDiffGenerator; 20 using chromeos_update_engine::DeltaDiffGenerator;
21 using chromeos_update_engine::kRandomString; 21 using chromeos_update_engine::kRandomString;
22 using chromeos_update_engine::System; 22 using chromeos_update_engine::System;
23 using chromeos_update_engine::WriteFile; 23 using chromeos_update_engine::utils::WriteFile;
24 using std::set; 24 using std::set;
25 using std::string; 25 using std::string;
26 using std::vector; 26 using std::vector;
27 27
28 namespace { 28 namespace {
29 void GenerateFilesAtPath(const string& base) { 29 void GenerateFilesAtPath(const string& base) {
30 EXPECT_EQ(0, System(StringPrintf("echo hi > %s/hi", base.c_str()))); 30 EXPECT_EQ(0, System(StringPrintf("echo hi > %s/hi", base.c_str())));
31 EXPECT_EQ(0, System(StringPrintf("ln %s/hi %s/hard_link", base.c_str(), 31 EXPECT_EQ(0, System(StringPrintf("ln %s/hi %s/hard_link", base.c_str(),
32 base.c_str()))); 32 base.c_str())));
33 EXPECT_EQ(0, System(StringPrintf("mkdir -p %s/dir", base.c_str()))); 33 EXPECT_EQ(0, System(StringPrintf("mkdir -p %s/dir", base.c_str())));
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 InstallPlan install_plan(false, "", "", "no_such_file", "install_path"); 265 InstallPlan install_plan(false, "", "", "no_such_file", "install_path");
266 feeder_action.set_obj(install_plan); 266 feeder_action.set_obj(install_plan);
267 267
268 processor.StartProcessing(); 268 processor.StartProcessing();
269 EXPECT_FALSE(processor.IsRunning()) << "Update to handle async actions"; 269 EXPECT_FALSE(processor.IsRunning()) << "Update to handle async actions";
270 EXPECT_TRUE(collector_action.object().empty()); 270 EXPECT_TRUE(collector_action.object().empty());
271 } 271 }
272 272
273 } // namespace chromeos_update_engine 273 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « src/platform/update_engine/delta_diff_generator_unittest.cc ('k') | src/platform/update_engine/integration_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698