| Index: components/ntp_snippets/ntp_snippets_service_unittest.cc
|
| diff --git a/components/ntp_snippets/ntp_snippets_service_unittest.cc b/components/ntp_snippets/ntp_snippets_service_unittest.cc
|
| index 9d56af38b90dc1b5d961c3ee86a7914847bb83a3..6387742b9fe761937bf601f1c35700b54ab3d916 100644
|
| --- a/components/ntp_snippets/ntp_snippets_service_unittest.cc
|
| +++ b/components/ntp_snippets/ntp_snippets_service_unittest.cc
|
| @@ -23,6 +23,7 @@
|
| #include "base/time/time.h"
|
| #include "components/image_fetcher/image_decoder.h"
|
| #include "components/image_fetcher/image_fetcher.h"
|
| +#include "components/ntp_snippets/content_suggestions_category_factory.h"
|
| #include "components/ntp_snippets/ntp_snippet.h"
|
| #include "components/ntp_snippets/ntp_snippets_database.h"
|
| #include "components/ntp_snippets/ntp_snippets_fetcher.h"
|
| @@ -330,15 +331,17 @@ class NTPSnippetsServiceTest : public test::NTPSnippetsTestBase {
|
| /*image_fetcher=*/nullptr, base::MakeUnique<NTPSnippetsDatabase>(
|
| database_dir_.path(), task_runner),
|
| base::MakeUnique<NTPSnippetsStatusService>(
|
| - fake_signin_manager(), mock_sync_service(), pref_service())));
|
| + fake_signin_manager(), mock_sync_service(), pref_service()),
|
| + &category_factory_));
|
|
|
| if (enabled)
|
| WaitForDBLoad(service_.get());
|
| }
|
|
|
| std::string MakeUniqueID(const std::string& within_category_id) {
|
| - return NTPSnippetsService::MakeUniqueID(
|
| - ContentSuggestionsCategory::ARTICLES, within_category_id);
|
| + return service()->MakeUniqueID(category_factory_.FromKnownCategory(
|
| + KnownSuggestionsCategories::ARTICLES),
|
| + within_category_id);
|
| }
|
|
|
| protected:
|
| @@ -366,6 +369,7 @@ class NTPSnippetsServiceTest : public test::NTPSnippetsTestBase {
|
| const GURL test_url_;
|
| std::unique_ptr<OAuth2TokenService> fake_token_service_;
|
| MockScheduler scheduler_;
|
| + ContentSuggestionsCategoryFactory category_factory_;
|
| // Last so that the dependencies are deleted after the service.
|
| std::unique_ptr<NTPSnippetsService> service_;
|
|
|
|
|