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

Unified Diff: components/ntp_snippets/category_rankers/mock_category_ranker.h

Issue 2568033005: [NTP::SectionOrder] Replace CategoryFactory with a category ranker. (Closed)
Patch Set: rebase. Created 4 years 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/ntp_snippets/category_rankers/mock_category_ranker.h
diff --git a/components/ntp_snippets/category_rankers/mock_category_ranker.h b/components/ntp_snippets/category_rankers/mock_category_ranker.h
new file mode 100644
index 0000000000000000000000000000000000000000..2828167956771e76daa862166914d1ad776dfdd1
--- /dev/null
+++ b/components/ntp_snippets/category_rankers/mock_category_ranker.h
@@ -0,0 +1,28 @@
+// 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 COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_MOCK_CATEGORY_RANKER_H_
+#define COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_MOCK_CATEGORY_RANKER_H_
+
+#include "base/time/time.h"
+#include "components/ntp_snippets/category.h"
+#include "components/ntp_snippets/category_rankers/category_ranker.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace ntp_snippets {
+
+class MockCategoryRanker : public CategoryRanker {
+ public:
+ MockCategoryRanker();
+ ~MockCategoryRanker() override;
+
+ MOCK_CONST_METHOD2(Compare, bool(Category left, Category right));
+ MOCK_METHOD2(ClearHistory, void(base::Time begin, base::Time end));
+ MOCK_METHOD1(AppendCategoryIfNecessary, void(Category category));
+ MOCK_METHOD1(OnSuggestionOpened, void(Category category));
+};
+
+} // namespace ntp_snippets
+
+#endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_MOCK_CATEGORY_RANKER_H_

Powered by Google App Engine
This is Rietveld 408576698