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

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

Issue 2771713003: RemoteSuggestionsFetcher: Use common AccessTokenFetcher helper class (Closed)
Patch Set: Created 3 years, 9 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
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 "components/ntp_snippets/remote/remote_suggestions_fetcher.h" 5 #include "components/ntp_snippets/remote/remote_suggestions_fetcher.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 }; 392 };
393 393
394 class RemoteSuggestionsSignedOutFetcherTest 394 class RemoteSuggestionsSignedOutFetcherTest
395 : public RemoteSuggestionsFetcherTestBase { 395 : public RemoteSuggestionsFetcherTestBase {
396 public: 396 public:
397 RemoteSuggestionsSignedOutFetcherTest() 397 RemoteSuggestionsSignedOutFetcherTest()
398 : RemoteSuggestionsFetcherTestBase( 398 : RemoteSuggestionsFetcherTestBase(
399 GURL(kTestChromeContentSuggestionsSignedOutUrl)) {} 399 GURL(kTestChromeContentSuggestionsSignedOutUrl)) {}
400 }; 400 };
401 401
402 // TODO(jkrcal): Add unit-tests for the "authentication in progress" case as it
403 // requires more changes (instead FakeSigninManagerBase use FakeSigninManager
404 // which does not exist on ChromeOS). crbug.com/688310
405 class RemoteSuggestionsSignedInFetcherTest 402 class RemoteSuggestionsSignedInFetcherTest
406 : public RemoteSuggestionsFetcherTestBase { 403 : public RemoteSuggestionsFetcherTestBase {
407 public: 404 public:
408 RemoteSuggestionsSignedInFetcherTest() 405 RemoteSuggestionsSignedInFetcherTest()
409 : RemoteSuggestionsFetcherTestBase( 406 : RemoteSuggestionsFetcherTestBase(
410 GURL(kTestChromeContentSuggestionsSignedInUrl)) {} 407 GURL(kTestChromeContentSuggestionsSignedInUrl)) {}
411 }; 408 };
412 409
413 TEST_F(RemoteSuggestionsSignedOutFetcherTest, ShouldNotFetchOnCreation) { 410 TEST_F(RemoteSuggestionsSignedOutFetcherTest, ShouldNotFetchOnCreation) {
414 // The lack of registered baked in responses would cause any fetch to fail. 411 // The lack of registered baked in responses would cause any fetch to fail.
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 fetched_categories) { 987 fetched_categories) {
991 if (fetched_categories) { 988 if (fetched_categories) {
992 // Matchers above aren't any more precise than this, so this is sufficient 989 // Matchers above aren't any more precise than this, so this is sufficient
993 // for test-failure diagnostics. 990 // for test-failure diagnostics.
994 return os << "list with " << fetched_categories->size() << " elements"; 991 return os << "list with " << fetched_categories->size() << " elements";
995 } 992 }
996 return os << "null"; 993 return os << "null";
997 } 994 }
998 995
999 } // namespace ntp_snippets 996 } // namespace ntp_snippets
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698