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

Unified Diff: components/download/internal/test_support/mock_model_client.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_model_client.h
diff --git a/components/download/internal/test_support/mock_model_client.h b/components/download/internal/test_support/mock_model_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..6604f2ecbc81c31f063a68db388d9368d920de16
--- /dev/null
+++ b/components/download/internal/test_support/mock_model_client.h
@@ -0,0 +1,29 @@
+// 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_SUPPORT_MOCK_MODEL_CLIENT_H_
+#define COMPONENTS_DOWNLOAD_INTERNAL_TEST_SUPPORT_MOCK_MODEL_CLIENT_H_
+
+namespace download {
+
+class MockModelClient : public Model::Client {
+ public:
+ MockModelClient();
+ ~MockModelClient() override;
+
+ // DownloadModel::Client implementation.
+ MOCK_METHOD1(OnInitialized, void(bool));
+ MOCK_METHOD1(OnDestroyed, void(bool));
+ MOCK_METHOD2(OnStoreUpdateFailed, void(DownloadClient, const std::string&));
+ MOCK_METHOD3(OnItemAdded, void(bool, DownloadClient, const std::string&));
+};
+
+} // namespace download
+
+#endif // COMPONENTS_DOWNLOAD_INTERNAL_TEST_SUPPORT_MOCK_MODEL_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698