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

Side by Side Diff: components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider_unittest.cc

Issue 2744253004: NTP: clang-format (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/physical_web_pages/physical_web_page_suggestio ns_provider.h" 5 #include "components/ntp_snippets/physical_web_pages/physical_web_page_suggestio ns_provider.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 IgnoreOnCategoryStatusChangedToAvailable(); 353 IgnoreOnCategoryStatusChangedToAvailable();
354 IgnoreOnSuggestionInvalidated(); 354 IgnoreOnSuggestionInvalidated();
355 IgnoreOnNewSuggestions(); 355 IgnoreOnNewSuggestions();
356 physical_web_data_source()->SetMetadataList( 356 physical_web_data_source()->SetMetadataList(
357 CreateDummyPhysicalWebPages({1, 2})); 357 CreateDummyPhysicalWebPages({1, 2}));
358 CreateProvider(); 358 CreateProvider();
359 359
360 provider()->DismissSuggestion(GetDummySuggestionId(1)); 360 provider()->DismissSuggestion(GetDummySuggestionId(1));
361 provider()->DismissSuggestion(GetDummySuggestionId(2)); 361 provider()->DismissSuggestion(GetDummySuggestionId(2));
362 362
363 physical_web_data_source()->SetMetadataList( 363 physical_web_data_source()->SetMetadataList(CreateDummyPhysicalWebPages({2}));
364 CreateDummyPhysicalWebPages({2}));
365 FireUrlLost("https://resolved_url.com/1"); 364 FireUrlLost("https://resolved_url.com/1");
366 365
367 physical_web_data_source()->SetMetadataList( 366 physical_web_data_source()->SetMetadataList(
368 CreateDummyPhysicalWebPages({1, 2})); 367 CreateDummyPhysicalWebPages({1, 2}));
369 std::vector<ContentSuggestion> dismissed_suggestions; 368 std::vector<ContentSuggestion> dismissed_suggestions;
370 provider()->GetDismissedSuggestionsForDebugging( 369 provider()->GetDismissedSuggestionsForDebugging(
371 provided_category(), 370 provided_category(),
372 base::Bind(&CaptureDismissedSuggestions, &dismissed_suggestions)); 371 base::Bind(&CaptureDismissedSuggestions, &dismissed_suggestions));
373 EXPECT_THAT(dismissed_suggestions, 372 EXPECT_THAT(dismissed_suggestions,
374 ElementsAre(HasUrl("https://resolved_url.com/2"))); 373 ElementsAre(HasUrl("https://resolved_url.com/2")));
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 EXPECT_CALL(*observer(), OnNewSuggestions(_, provided_category(), _)); 458 EXPECT_CALL(*observer(), OnNewSuggestions(_, provided_category(), _));
460 CreateProvider(); 459 CreateProvider();
461 460
462 FireUrlLost("https://scanned_url.com/1"); 461 FireUrlLost("https://scanned_url.com/1");
463 FireUrlLost("https://scanned_url.com/1"); 462 FireUrlLost("https://scanned_url.com/1");
464 EXPECT_CALL(*observer(), OnSuggestionInvalidated(_, GetDummySuggestionId(1))); 463 EXPECT_CALL(*observer(), OnSuggestionInvalidated(_, GetDummySuggestionId(1)));
465 FireUrlLost("https://scanned_url.com/3"); 464 FireUrlLost("https://scanned_url.com/3");
466 } 465 }
467 466
468 } // namespace ntp_snippets 467 } // namespace ntp_snippets
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698