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

Unified Diff: components/download/internal/test/mock_model_client.h

Issue 2870753003: Add a Model to the download component. (Closed)
Patch Set: Renamed test base class 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/mock_model_client.h
diff --git a/components/download/internal/test/mock_model_client.h b/components/download/internal/test/mock_model_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..2b82f0cd4be2b2914d9175634b72a29f3c6a18d1
--- /dev/null
+++ b/components/download/internal/test/mock_model_client.h
@@ -0,0 +1,32 @@
+// 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/model.h"
+
+#include "components/download/internal/entry.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+#ifndef COMPONENTS_DOWNLOAD_INTERNAL_TEST_MOCK_MODEL_CLIENT_H_
+#define COMPONENTS_DOWNLOAD_INTERNAL_TEST_MOCK_MODEL_CLIENT_H_
+
+namespace download {
+namespace test {
+
+class MockModelClient : public Model::Client {
+ public:
+ MockModelClient();
+ ~MockModelClient() override;
+
+ // Model::Client implementation.
+ MOCK_METHOD1(OnInitialized, void(bool));
+ MOCK_METHOD1(OnDestroyed, void(bool));
+ MOCK_METHOD3(OnItemAdded, void(bool, DownloadClient, const std::string&));
+ MOCK_METHOD3(OnItemUpdated, void(bool, DownloadClient, const std::string&));
+ MOCK_METHOD3(OnItemRemoved, void(bool, DownloadClient, const std::string&));
+};
+
+} // namespace test
+} // namespace download
+
+#endif // COMPONENTS_DOWNLOAD_INTERNAL_TEST_MOCK_MODEL_CLIENT_H_
« no previous file with comments | « components/download/internal/test/entry_utils.cc ('k') | components/download/internal/test/mock_model_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698