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

Side by Side Diff: integration_unittest.cc

Issue 2981008: Initial implementation of sending an install success even to Omaha. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Fix indentation. Created 10 years, 5 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 | « no previous file | omaha_request_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 <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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 ASSERT_EQ(0, getuid()); 98 ASSERT_EQ(0, getuid());
99 GMainLoop *loop = g_main_loop_new(g_main_context_default(), FALSE); 99 GMainLoop *loop = g_main_loop_new(g_main_context_default(), FALSE);
100 100
101 ActionProcessor processor; 101 ActionProcessor processor;
102 IntegrationTestProcessorDelegate delegate; 102 IntegrationTestProcessorDelegate delegate;
103 delegate.set_loop(loop); 103 delegate.set_loop(loop);
104 processor.set_delegate(&delegate); 104 processor.set_delegate(&delegate);
105 105
106 // Actions: 106 // Actions:
107 OmahaRequestPrepAction request_prep_action(false); 107 OmahaRequestPrepAction request_prep_action(false);
108 OmahaRequestAction update_check_action(new LibcurlHttpFetcher); 108 OmahaRequestAction update_check_action(NULL, new LibcurlHttpFetcher);
109 OmahaResponseHandlerAction response_handler_action; 109 OmahaResponseHandlerAction response_handler_action;
110 DownloadAction download_action(new LibcurlHttpFetcher); 110 DownloadAction download_action(new LibcurlHttpFetcher);
111 InstallAction install_action; 111 InstallAction install_action;
112 PostinstallRunnerAction postinstall_runner_action; 112 PostinstallRunnerAction postinstall_runner_action;
113 SetBootableFlagAction set_bootable_flag_action; 113 SetBootableFlagAction set_bootable_flag_action;
114 114
115 // Enqueue the actions 115 // Enqueue the actions
116 processor.EnqueueAction(&request_prep_action); 116 processor.EnqueueAction(&request_prep_action);
117 processor.EnqueueAction(&update_check_action); 117 processor.EnqueueAction(&update_check_action);
118 processor.EnqueueAction(&response_handler_action); 118 processor.EnqueueAction(&response_handler_action);
(...skipping 64 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 | « no previous file | omaha_request_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698