| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/ntp_snippets/remote/remote_suggestions_provider.h" | 5 #include "components/ntp_snippets/remote/remote_suggestions_provider.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "components/ntp_snippets/pref_names.h" | 31 #include "components/ntp_snippets/pref_names.h" |
| 32 #include "components/ntp_snippets/remote/ntp_snippet.h" | 32 #include "components/ntp_snippets/remote/ntp_snippet.h" |
| 33 #include "components/ntp_snippets/remote/ntp_snippets_fetcher.h" | 33 #include "components/ntp_snippets/remote/ntp_snippets_fetcher.h" |
| 34 #include "components/ntp_snippets/remote/ntp_snippets_scheduler.h" | 34 #include "components/ntp_snippets/remote/ntp_snippets_scheduler.h" |
| 35 #include "components/ntp_snippets/remote/remote_suggestions_database.h" | 35 #include "components/ntp_snippets/remote/remote_suggestions_database.h" |
| 36 #include "components/ntp_snippets/remote/test_utils.h" | 36 #include "components/ntp_snippets/remote/test_utils.h" |
| 37 #include "components/ntp_snippets/user_classifier.h" | 37 #include "components/ntp_snippets/user_classifier.h" |
| 38 #include "components/prefs/testing_pref_service.h" | 38 #include "components/prefs/testing_pref_service.h" |
| 39 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" | 39 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" |
| 40 #include "components/signin/core/browser/fake_signin_manager.h" | 40 #include "components/signin/core/browser/fake_signin_manager.h" |
| 41 #include "components/variations/variations_associated_data.h" | 41 #include "components/variations/variations_params_manager.h" |
| 42 #include "net/url_request/test_url_fetcher_factory.h" | 42 #include "net/url_request/test_url_fetcher_factory.h" |
| 43 #include "net/url_request/url_request_test_util.h" | 43 #include "net/url_request/url_request_test_util.h" |
| 44 #include "testing/gmock/include/gmock/gmock.h" | 44 #include "testing/gmock/include/gmock/gmock.h" |
| 45 #include "testing/gtest/include/gtest/gtest.h" | 45 #include "testing/gtest/include/gtest/gtest.h" |
| 46 #include "ui/gfx/image/image.h" | 46 #include "ui/gfx/image/image.h" |
| 47 #include "ui/gfx/image/image_unittest_util.h" | 47 #include "ui/gfx/image/image_unittest_util.h" |
| 48 | 48 |
| 49 using image_fetcher::ImageFetcher; | 49 using image_fetcher::ImageFetcher; |
| 50 using image_fetcher::ImageFetcherDelegate; | 50 using image_fetcher::ImageFetcherDelegate; |
| 51 using testing::ElementsAre; | 51 using testing::ElementsAre; |
| (...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1587 base::StringPrintf("http://localhost/snippet-id-%d", i))); | 1587 base::StringPrintf("http://localhost/snippet-id-%d", i))); |
| 1588 } | 1588 } |
| 1589 LoadFromJSONString(service.get(), GetTestJson(suggestions)); | 1589 LoadFromJSONString(service.get(), GetTestJson(suggestions)); |
| 1590 // TODO(tschumann): We should probably trim out any additional results and | 1590 // TODO(tschumann): We should probably trim out any additional results and |
| 1591 // only serve the MaxSnippetCount items. | 1591 // only serve the MaxSnippetCount items. |
| 1592 EXPECT_THAT(service->GetSnippetsForTesting(articles_category()), | 1592 EXPECT_THAT(service->GetSnippetsForTesting(articles_category()), |
| 1593 SizeIs(service->GetMaxSnippetCountForTesting() + 1)); | 1593 SizeIs(service->GetMaxSnippetCountForTesting() + 1)); |
| 1594 } | 1594 } |
| 1595 | 1595 |
| 1596 } // namespace ntp_snippets | 1596 } // namespace ntp_snippets |
| OLD | NEW |