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

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

Issue 492008: AU: Try delta updates first, then full updates (Closed)
Patch Set: use mkstemp 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 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 #include <glib.h> 7 #include <glib.h>
8 #include <pthread.h> 8 #include <pthread.h>
9 #include <gtest/gtest.h> 9 #include <gtest/gtest.h>
10 #include "update_engine/download_action.h" 10 #include "update_engine/download_action.h"
(...skipping 22 matching lines...) Expand all
33 namespace { 33 namespace {
34 const char* kTestDir = "/tmp/update_engine-integration-test"; 34 const char* kTestDir = "/tmp/update_engine-integration-test";
35 35
36 class IntegrationTestProcessorDelegate : public ActionProcessorDelegate { 36 class IntegrationTestProcessorDelegate : public ActionProcessorDelegate {
37 public: 37 public:
38 IntegrationTestProcessorDelegate() 38 IntegrationTestProcessorDelegate()
39 : loop_(NULL), processing_done_called_(false) {} 39 : loop_(NULL), processing_done_called_(false) {}
40 virtual ~IntegrationTestProcessorDelegate() { 40 virtual ~IntegrationTestProcessorDelegate() {
41 EXPECT_TRUE(processing_done_called_); 41 EXPECT_TRUE(processing_done_called_);
42 } 42 }
43 virtual void ProcessingDone(const ActionProcessor* processor) { 43 virtual void ProcessingDone(const ActionProcessor* processor, bool success) {
44 processing_done_called_ = true; 44 processing_done_called_ = true;
45 g_main_loop_quit(loop_); 45 g_main_loop_quit(loop_);
46 } 46 }
47 47
48 virtual void ActionCompleted(ActionProcessor* processor, 48 virtual void ActionCompleted(ActionProcessor* processor,
49 AbstractAction* action, 49 AbstractAction* action,
50 bool success) { 50 bool success) {
51 // make sure actions always succeed 51 // make sure actions always succeed
52 EXPECT_TRUE(success); 52 EXPECT_TRUE(success);
53 53
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 "/tmp/update_engine_test_postinst_out.txt", 183 "/tmp/update_engine_test_postinst_out.txt",
184 &file_data)); 184 &file_data));
185 EXPECT_EQ("POSTINST_DONE\n", file_data); 185 EXPECT_EQ("POSTINST_DONE\n", file_data);
186 186
187 // cleanup 187 // cleanup
188 ASSERT_EQ(0, System(string("rm -rf ") + kTestDir)); 188 ASSERT_EQ(0, System(string("rm -rf ") + kTestDir));
189 ASSERT_EQ(0, system("rm -f /tmp/update_engine_test_postinst_out.txt")); 189 ASSERT_EQ(0, system("rm -f /tmp/update_engine_test_postinst_out.txt"));
190 } 190 }
191 191
192 } // namespace chromeos_update_engine 192 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « src/platform/update_engine/install_action_unittest.cc ('k') | src/platform/update_engine/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698