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

Side by Side Diff: src/platform/update_engine/update_check_action_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 <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/update_check_action.h" 10 #include "update_engine/update_check_action.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 "size=\"" + size + "\" status=\"ok\"/></app></gupdate>"; 47 "size=\"" + size + "\" status=\"ok\"/></app></gupdate>";
48 } 48 }
49 49
50 class UpdateCheckActionTestProcessorDelegate : public ActionProcessorDelegate { 50 class UpdateCheckActionTestProcessorDelegate : public ActionProcessorDelegate {
51 public: 51 public:
52 UpdateCheckActionTestProcessorDelegate() 52 UpdateCheckActionTestProcessorDelegate()
53 : loop_(NULL), 53 : loop_(NULL),
54 expected_success_(true) {} 54 expected_success_(true) {}
55 virtual ~UpdateCheckActionTestProcessorDelegate() { 55 virtual ~UpdateCheckActionTestProcessorDelegate() {
56 } 56 }
57 virtual void ProcessingDone(const ActionProcessor* processor) { 57 virtual void ProcessingDone(const ActionProcessor* processor, bool success) {
58 ASSERT_TRUE(loop_); 58 ASSERT_TRUE(loop_);
59 g_main_loop_quit(loop_); 59 g_main_loop_quit(loop_);
60 } 60 }
61 61
62 virtual void ActionCompleted(ActionProcessor* processor, 62 virtual void ActionCompleted(ActionProcessor* processor,
63 AbstractAction* action, 63 AbstractAction* action,
64 bool success) { 64 bool success) {
65 // make sure actions always succeed 65 // make sure actions always succeed
66 if (action->Type() == UpdateCheckAction::StaticType()) 66 if (action->Type() == UpdateCheckAction::StaticType())
67 EXPECT_EQ(expected_success_, success); 67 EXPECT_EQ(expected_success_, success);
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 // overflows int32: 503 // overflows int32:
504 "123123123123123"), // size 504 "123123123123123"), // size
505 true, 505 true,
506 &response, 506 &response,
507 NULL)); 507 NULL));
508 508
509 EXPECT_EQ(response.size, 123123123123123ll); 509 EXPECT_EQ(response.size, 123123123123123ll);
510 } 510 }
511 511
512 } // namespace chromeos_update_engine 512 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « src/platform/update_engine/update_check_action.h ('k') | src/platform/update_engine/update_metadata.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698