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

Side by Side Diff: components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc

Issue 2809963003: remote_suggestions_provider_impl_unittest.cc: Remove unused code (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_impl.h" 5 #include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 namespace { 82 namespace {
83 83
84 MATCHER_P(IdEq, value, "") { 84 MATCHER_P(IdEq, value, "") {
85 return arg->id() == value; 85 return arg->id() == value;
86 } 86 }
87 87
88 MATCHER_P(IdWithinCategoryEq, expected_id, "") { 88 MATCHER_P(IdWithinCategoryEq, expected_id, "") {
89 return arg.id().id_within_category() == expected_id; 89 return arg.id().id_within_category() == expected_id;
90 } 90 }
91 91
92 MATCHER_P(IsCategory, id, "") {
93 return arg.id() == static_cast<int>(id);
94 }
95
96 MATCHER_P(HasCode, code, "") { 92 MATCHER_P(HasCode, code, "") {
97 return arg.code == code; 93 return arg.code == code;
98 } 94 }
99 95
100 const base::Time::Exploded kDefaultCreationTime = {2015, 11, 4, 25, 13, 46, 45}; 96 const base::Time::Exploded kDefaultCreationTime = {2015, 11, 4, 25, 13, 46, 45};
101 const char kTestContentSuggestionsServerEndpoint[] = 97 const char kTestContentSuggestionsServerEndpoint[] =
102 "https://alpha-chromecontentsuggestions-pa.sandbox.googleapis.com/v1/" 98 "https://alpha-chromecontentsuggestions-pa.sandbox.googleapis.com/v1/"
103 "suggestions/fetch"; 99 "suggestions/fetch";
104 const char kAPIKey[] = "fakeAPIkey"; 100 const char kAPIKey[] = "fakeAPIkey";
105 const char kTestContentSuggestionsServerWithAPIKey[] = 101 const char kTestContentSuggestionsServerWithAPIKey[] =
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 WaitForSuggestionsProviderInitialization(service.get(), 1808 WaitForSuggestionsProviderInitialization(service.get(),
1813 /*set_empty_response=*/true); 1809 /*set_empty_response=*/true);
1814 1810
1815 // The scheduler should be notified of clearing the history. 1811 // The scheduler should be notified of clearing the history.
1816 EXPECT_CALL(*scheduler(), OnSuggestionsCleared()); 1812 EXPECT_CALL(*scheduler(), OnSuggestionsCleared());
1817 service->OnStatusChanged(RemoteSuggestionsStatus::ENABLED_AND_SIGNED_OUT, 1813 service->OnStatusChanged(RemoteSuggestionsStatus::ENABLED_AND_SIGNED_OUT,
1818 RemoteSuggestionsStatus::ENABLED_AND_SIGNED_IN); 1814 RemoteSuggestionsStatus::ENABLED_AND_SIGNED_IN);
1819 } 1815 }
1820 1816
1821 } // namespace ntp_snippets 1817 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698