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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc

Issue 2665743002: [Remote suggestions] Clean up variation params in the fetcher. (Closed)
Patch Set: Add a comment Created 3 years, 10 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/remote/remote_suggestions_fetcher_unittest.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
index 14ac6b11058cd907a5a27a2c85540503409cd60d..f5716a1e768d5328cb295b129ae56e903b1db1d4 100644
--- a/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
@@ -267,6 +267,8 @@ void ParseJsonDelayed(const std::string& json,
} // namespace
+// TODO(jkrcal): Add unit-tests with signin client being signed in (covering
+// sign-in / refresh tokens / access token code). crbug.com/688310
class RemoteSuggestionsFetcherTestBase : public testing::Test {
public:
explicit RemoteSuggestionsFetcherTestBase(const GURL& gurl)
@@ -682,26 +684,6 @@ TEST_F(NTPSnippetsContentSuggestionsFetcherTest, ExclusiveCategoryOnly) {
Eq("http://localhost/foo2"));
}
-// TODO(fhorschig): Check for behavioral changes instead of state.
-TEST_F(ChromeReaderSnippetsFetcherTest, PersonalizesDependingOnVariations) {
- // Default setting should be both personalization options.
- EXPECT_THAT(snippets_fetcher().personalization(), Eq(Personalization::kBoth));
-
- SetVariationParam("fetching_personalization", "personal");
- ResetSnippetsFetcher();
- EXPECT_THAT(snippets_fetcher().personalization(),
- Eq(Personalization::kPersonal));
-
- SetVariationParam("fetching_personalization", "non_personal");
- ResetSnippetsFetcher();
- EXPECT_THAT(snippets_fetcher().personalization(),
- Eq(Personalization::kNonPersonal));
-
- SetVariationParam("fetching_personalization", "both");
- ResetSnippetsFetcher();
- EXPECT_THAT(snippets_fetcher().personalization(), Eq(Personalization::kBoth));
-}
-
TEST_F(ChromeReaderSnippetsFetcherTest, ShouldFetchSuccessfullyEmptyList) {
const std::string kJsonStr = "{\"recos\": []}";
SetFakeResponse(/*response_data=*/kJsonStr, net::HTTP_OK,

Powered by Google App Engine
This is Rietveld 408576698