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

Unified Diff: components/download/internal/test_support/mock_store.h

Issue 2870753003: Add a Model to the download component. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: components/download/internal/test_support/mock_store.h
diff --git a/components/download/internal/test_support/mock_store.h b/components/download/internal/test_support/mock_store.h
new file mode 100644
index 0000000000000000000000000000000000000000..ee9fd27aeb054db7625d51697d1a3afaa8e89d84
--- /dev/null
+++ b/components/download/internal/test_support/mock_store.h
@@ -0,0 +1,30 @@
+// Copyright 2017 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.
+
+#include "components/download/internal/store.h"
+
+#include "components/download/internal/entry.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+#ifndef COMPONENTS_DOWNLOAD_INTERNAL_TEST_SUPPORT_MOCK_STORE_H_
+#define COMPONENTS_DOWNLOAD_INTERNAL_TEST_SUPPORT_MOCK_STORE_H_
+
+namespace download {
+
+class MockStore : public Store {
+ public:
+ MockStore();
+ ~MockStore() override;
+
+ // Store implementation.
+ MOCK_METHOD0(IsInitialized, bool());
+ MOCK_METHOD1(Initialize, void(const InitCallback&));
+ MOCK_METHOD1(Destroy, void(const StoreCallback&));
+ MOCK_METHOD2(Update, void(const Entry&, const StoreCallback&));
+ MOCK_METHOD2(Remove, void(const std::string&, const StoreCallback&));
+};
+
+} // namespace download
+
+#endif // COMPONENTS_DOWNLOAD_INTERNAL_TEST_SUPPORT_MOCK_STORE_H_

Powered by Google App Engine
This is Rietveld 408576698