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

Unified Diff: chrome/installer/util/work_item_mocks.h

Issue 1869383003: Simplify WorkItemListTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no inline destructors Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/work_item_list_unittest.cc ('k') | chrome/installer/util/work_item_mocks.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « chrome/installer/util/work_item_list_unittest.cc ('k') | chrome/installer/util/work_item_mocks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698