Chromium Code Reviews| Index: components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc |
| diff --git a/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc |
| index 84b83172c3c06ff8e2c1023bb16acc941e47b934..02be1cf2f36fd2c4413fd37a05b9ef82f64690b4 100644 |
| --- a/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc |
| +++ b/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc |
| @@ -32,6 +32,7 @@ |
| #include "components/ntp_snippets/category_rankers/constant_category_ranker.h" |
| #include "components/ntp_snippets/category_rankers/mock_category_ranker.h" |
| #include "components/ntp_snippets/fake_content_suggestions_provider_observer.h" |
| +#include "components/ntp_snippets/features.h" |
| #include "components/ntp_snippets/ntp_snippets_constants.h" |
| #include "components/ntp_snippets/pref_names.h" |
| #include "components/ntp_snippets/remote/persistent_scheduler.h" |
| @@ -91,11 +92,11 @@ MATCHER_P(HasCode, code, "") { |
| const base::Time::Exploded kDefaultCreationTime = {2015, 11, 4, 25, 13, 46, 45}; |
| const char kTestContentSuggestionsServerEndpoint[] = |
| - "https://localunittest-chromecontentsuggestions-pa.googleapis.com/v1/" |
| + "https://alpha-chromecontentsuggestions-pa.sandbox.googleapis.com/v1/" |
|
jkrcal
2017/02/03 10:17:49
Changed this to avoid warnings from RemoteSuggesti
|
| "suggestions/fetch"; |
| const char kAPIKey[] = "fakeAPIkey"; |
| const char kTestContentSuggestionsServerWithAPIKey[] = |
| - "https://localunittest-chromecontentsuggestions-pa.googleapis.com/v1/" |
| + "https://alpha-chromecontentsuggestions-pa.sandbox.googleapis.com/v1/" |
| "suggestions/fetch?key=fakeAPIkey"; |
| const char kSuggestionUrl[] = "http://localhost/foobar"; |
| @@ -368,11 +369,12 @@ class RemoteSuggestionsProviderImplTest : public ::testing::Test { |
| RemoteSuggestionsProviderImplTest() |
| : params_manager_(ntp_snippets::kStudyName, |
| {{"content_suggestions_backend", |
| - kTestContentSuggestionsServerEndpoint}, |
| - {"fetching_personalization", "non_personal"}}), |
| + kTestContentSuggestionsServerEndpoint}}, |
| + {ntp_snippets::kArticleSuggestionsFeature.name}), |
| fake_url_fetcher_factory_( |
| /*default_factory=*/&failing_url_fetcher_factory_), |
| test_url_(kTestContentSuggestionsServerWithAPIKey), |
| + fake_token_service_(nullptr), |
|
jkrcal
2017/02/03 10:17:49
Added to increase clarity that null token service
|
| category_ranker_(base::MakeUnique<ConstantCategoryRanker>()), |
| user_classifier_(/*pref_service=*/nullptr), |
| suggestions_fetcher_(nullptr), |
| @@ -416,8 +418,6 @@ class RemoteSuggestionsProviderImplTest : public ::testing::Test { |
| base::Bind(&ParseJson), kAPIKey, &user_classifier_); |
| suggestions_fetcher_ = suggestions_fetcher.get(); |
| - utils_.fake_signin_manager()->SignIn("foo@bar.com"); |
|
jkrcal
2017/02/03 10:17:49
I emulate the previous (not-signed-in) behaviour)
Marc Treib
2017/02/03 10:52:08
So the previous state was signed-in, but personali
|
| - |
| auto image_fetcher = base::MakeUnique<NiceMock<MockImageFetcher>>(); |
| image_fetcher_ = image_fetcher.get(); |