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

Unified Diff: components/ntp_snippets/content_suggestions_service_unittest.cc

Issue 2368583002: [NTP Snippets] Cleanups from clang-tidy (Closed)
Patch Set: rebase Created 4 years, 3 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/ntp_snippets/content_suggestions_service_unittest.cc
diff --git a/components/ntp_snippets/content_suggestions_service_unittest.cc b/components/ntp_snippets/content_suggestions_service_unittest.cc
index cc33ef7604bd94402684333df955c01a5c4773ab..d0629cbd7bb9d67acebdb4a77ff444e798e23ce0 100644
--- a/components/ntp_snippets/content_suggestions_service_unittest.cc
+++ b/components/ntp_snippets/content_suggestions_service_unittest.cc
@@ -23,15 +23,11 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/image/image.h"
-using testing::ByRef;
-using testing::Const;
using testing::ElementsAre;
using testing::Eq;
using testing::InvokeWithoutArgs;
using testing::IsEmpty;
-using testing::IsNull;
using testing::Mock;
-using testing::NotNull;
using testing::Property;
using testing::_;
@@ -56,11 +52,11 @@ class MockProvider : public ContentSuggestionsProvider {
}
}
- CategoryStatus GetCategoryStatus(Category category) {
+ CategoryStatus GetCategoryStatus(Category category) override {
return statuses_[category.id()];
}
- CategoryInfo GetCategoryInfo(Category category) {
+ CategoryInfo GetCategoryInfo(Category category) override {
return CategoryInfo(base::ASCIIToUTF16("Section title"),
ContentSuggestionsCardLayout::FULL_CARD, true, true);
}
@@ -107,13 +103,18 @@ class MockProvider : public ContentSuggestionsProvider {
class MockServiceObserver : public ContentSuggestionsService::Observer {
public:
+ MockServiceObserver() = default;
+ ~MockServiceObserver() override = default;
+
MOCK_METHOD1(OnNewSuggestions, void(Category category));
MOCK_METHOD2(OnCategoryStatusChanged,
void(Category changed_category, CategoryStatus new_status));
MOCK_METHOD2(OnSuggestionInvalidated,
void(Category category, const std::string& suggestion_id));
MOCK_METHOD0(ContentSuggestionsServiceShutdown, void());
- ~MockServiceObserver() override {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockServiceObserver);
};
} // namespace

Powered by Google App Engine
This is Rietveld 408576698