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

Side by Side Diff: chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: rebase Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/ntp_snippets/download_suggestions_provider.h" 5 #include "chrome/browser/ntp_snippets/download_suggestions_provider.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "chrome/browser/ntp_snippets/fake_download_item.h" 12 #include "chrome/browser/ntp_snippets/fake_download_item.h"
13 #include "components/ntp_snippets/category.h" 13 #include "components/ntp_snippets/category.h"
14 #include "components/ntp_snippets/category_factory.h" 14 #include "components/ntp_snippets/category_factory.h"
15 #include "components/ntp_snippets/mock_content_suggestions_provider_observer.h" 15 #include "components/ntp_snippets/mock_content_suggestions_provider_observer.h"
16 #include "components/ntp_snippets/offline_pages/offline_pages_test_utils.h" 16 #include "components/ntp_snippets/offline_pages/offline_pages_test_utils.h"
17 #include "components/offline_pages/client_namespace_constants.h" 17 #include "components/offline_pages/core/client_namespace_constants.h"
18 #include "components/prefs/testing_pref_service.h" 18 #include "components/prefs/testing_pref_service.h"
19 #include "content/public/test/mock_download_item.h" 19 #include "content/public/test/mock_download_item.h"
20 #include "content/public/test/mock_download_manager.h" 20 #include "content/public/test/mock_download_manager.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 using content::DownloadItem; 23 using content::DownloadItem;
24 using content::MockDownloadManager; 24 using content::MockDownloadManager;
25 using ntp_snippets::Category; 25 using ntp_snippets::Category;
26 using ntp_snippets::CategoryFactory; 26 using ntp_snippets::CategoryFactory;
27 using ntp_snippets::ContentSuggestion; 27 using ntp_snippets::ContentSuggestion;
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 IgnoreOnSuggestionInvalidated(); 922 IgnoreOnSuggestionInvalidated();
923 923
924 *(downloads_manager()->mutable_items()) = CreateDummyAssetDownloads({1, 2}); 924 *(downloads_manager()->mutable_items()) = CreateDummyAssetDownloads({1, 2});
925 EXPECT_CALL( 925 EXPECT_CALL(
926 *observer(), 926 *observer(),
927 OnNewSuggestions(_, downloads_category(), 927 OnNewSuggestions(_, downloads_category(),
928 UnorderedElementsAre(HasUrl("http://download.com/1"), 928 UnorderedElementsAre(HasUrl("http://download.com/1"),
929 HasUrl("http://download.com/2")))); 929 HasUrl("http://download.com/2"))));
930 CreateProvider(/*show_assets=*/true, /*show_offline_pages=*/false); 930 CreateProvider(/*show_assets=*/true, /*show_offline_pages=*/false);
931 } 931 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698