Index: chrome/installer/util/work_item_mocks.h |
diff --git a/chrome/installer/util/work_item_mocks.h b/chrome/installer/util/work_item_mocks.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..37c9a6abcbf0767b1aa09164de4663ab77df20c0 |
--- /dev/null |
+++ b/chrome/installer/util/work_item_mocks.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_INSTALLER_UTIL_WORK_ITEM_MOCKS_H_ |
+#define CHROME_INSTALLER_UTIL_WORK_ITEM_MOCKS_H_ |
+ |
+#include "base/macros.h" |
+#include "chrome/installer/util/conditional_work_item_list.h" |
+#include "chrome/installer/util/work_item.h" |
+#include "testing/gmock/include/gmock/gmock.h" |
+ |
+class MockWorkItem : public WorkItem { |
+ public: |
+ MockWorkItem(); |
+ ~MockWorkItem(); |
+ |
+ MOCK_METHOD0(Do, bool()); |
+ MOCK_METHOD0(Rollback, void()); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MockWorkItem); |
+}; |
+ |
+class MockCondition : public WorkItem::Condition { |
+ public: |
+ MockCondition(); |
+ ~MockCondition(); |
+ |
+ MOCK_CONST_METHOD0(ShouldRun, bool()); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MockCondition); |
+}; |
+ |
+using StrictMockWorkItem = testing::StrictMock<MockWorkItem>; |
+using StrictMockCondition = testing::StrictMock<MockCondition>; |
+ |
+#endif // CHROME_INSTALLER_UTIL_WORK_ITEM_MOCKS_H_ |