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

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

Issue 1819002: AU: delta compress the kernel partition (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review Created 10 years, 7 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
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 <gtest/gtest.h> 8 #include <gtest/gtest.h>
9 #include "update_engine/action_pipe.h" 9 #include "update_engine/action_pipe.h"
10 #include "update_engine/download_action.h" 10 #include "update_engine/download_action.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 processor.EnqueueAction(&feeder_action); 167 processor.EnqueueAction(&feeder_action);
168 processor.EnqueueAction(&download_action); 168 processor.EnqueueAction(&download_action);
169 BondActions(&feeder_action, &download_action); 169 BondActions(&feeder_action, &download_action);
170 170
171 g_timeout_add(0, &TerminateEarlyTestStarter, &processor); 171 g_timeout_add(0, &TerminateEarlyTestStarter, &processor);
172 g_main_loop_run(loop); 172 g_main_loop_run(loop);
173 g_main_loop_unref(loop); 173 g_main_loop_unref(loop);
174 } 174 }
175 175
176 // 1 or 0 chunks should have come through 176 // 1 or 0 chunks should have come through
177 const off_t resulting_file_size(FileSize(path)); 177 const off_t resulting_file_size(utils::FileSize(path));
178 if (resulting_file_size != 0) 178 if (resulting_file_size != 0)
179 EXPECT_EQ(kMockHttpFetcherChunkSize, resulting_file_size); 179 EXPECT_EQ(kMockHttpFetcherChunkSize, resulting_file_size);
180 } 180 }
181 181
182 class DownloadActionTestAction; 182 class DownloadActionTestAction;
183 183
184 template<> 184 template<>
185 class ActionTraits<DownloadActionTestAction> { 185 class ActionTraits<DownloadActionTestAction> {
186 public: 186 public:
187 typedef InstallPlan OutputObjectType; 187 typedef InstallPlan OutputObjectType;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 ActionProcessor processor; 274 ActionProcessor processor;
275 processor.EnqueueAction(&feeder_action); 275 processor.EnqueueAction(&feeder_action);
276 processor.EnqueueAction(&download_action); 276 processor.EnqueueAction(&download_action);
277 processor.StartProcessing(); 277 processor.StartProcessing();
278 ASSERT_FALSE(processor.IsRunning()); 278 ASSERT_FALSE(processor.IsRunning());
279 279
280 g_main_loop_unref(loop); 280 g_main_loop_unref(loop);
281 } 281 }
282 282
283 } // namespace chromeos_update_engine 283 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « src/platform/update_engine/delta_performer_unittest.cc ('k') | src/platform/update_engine/extent_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698