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

Unified Diff: components/ntp_snippets/content_suggestions_service_unittest.cc

Issue 2368583002: [NTP Snippets] Cleanups from clang-tidy (Closed)
Patch Set: 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 3957dd3723210a5cbec0d0a30f3e88b38acebe2f..7831ab581b342005415d44ee5a3cdc885af46d10 100644
--- a/components/ntp_snippets/content_suggestions_service_unittest.cc
+++ b/components/ntp_snippets/content_suggestions_service_unittest.cc
@@ -22,15 +22,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::_;
@@ -71,11 +67,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);
}
@@ -121,13 +117,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