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

Side by Side Diff: chrome/installer/util/work_item_mocks.h

Issue 1976443005: Revert of Add best-effort/allow rollback flags on WorkItem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple_list_tests
Patch Set: Created 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CHROME_INSTALLER_UTIL_WORK_ITEM_MOCKS_H_ 5 #ifndef CHROME_INSTALLER_UTIL_WORK_ITEM_MOCKS_H_
6 #define CHROME_INSTALLER_UTIL_WORK_ITEM_MOCKS_H_ 6 #define CHROME_INSTALLER_UTIL_WORK_ITEM_MOCKS_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/installer/util/conditional_work_item_list.h" 9 #include "chrome/installer/util/conditional_work_item_list.h"
10 #include "chrome/installer/util/work_item.h" 10 #include "chrome/installer/util/work_item.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 12
13 class MockWorkItem : public WorkItem { 13 class MockWorkItem : public WorkItem {
14 public: 14 public:
15 MockWorkItem(); 15 MockWorkItem();
16 ~MockWorkItem(); 16 ~MockWorkItem();
17 17
18 MOCK_METHOD0(DoImpl, bool()); 18 MOCK_METHOD0(Do, bool());
19 MOCK_METHOD0(RollbackImpl, void()); 19 MOCK_METHOD0(Rollback, void());
20 20
21 private: 21 private:
22 DISALLOW_COPY_AND_ASSIGN(MockWorkItem); 22 DISALLOW_COPY_AND_ASSIGN(MockWorkItem);
23 }; 23 };
24 24
25 class MockCondition : public WorkItem::Condition { 25 class MockCondition : public WorkItem::Condition {
26 public: 26 public:
27 MockCondition(); 27 MockCondition();
28 ~MockCondition(); 28 ~MockCondition();
29 29
30 MOCK_CONST_METHOD0(ShouldRun, bool()); 30 MOCK_CONST_METHOD0(ShouldRun, bool());
31 31
32 private: 32 private:
33 DISALLOW_COPY_AND_ASSIGN(MockCondition); 33 DISALLOW_COPY_AND_ASSIGN(MockCondition);
34 }; 34 };
35 35
36 using StrictMockWorkItem = testing::StrictMock<MockWorkItem>; 36 using StrictMockWorkItem = testing::StrictMock<MockWorkItem>;
37 using StrictMockCondition = testing::StrictMock<MockCondition>; 37 using StrictMockCondition = testing::StrictMock<MockCondition>;
38 38
39 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_MOCKS_H_ 39 #endif // CHROME_INSTALLER_UTIL_WORK_ITEM_MOCKS_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/work_item_list_unittest.cc ('k') | chrome/installer/util/work_item_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698