forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhaul ntp_snippets_service_unittest.cc.
A partial list of things done here: * Move tests that verified NTPSnippet::best_source() behavior into ntp_snippet_test.cc; they don't belong here. * Switch it to use the chromecontentsuggestions-pa. Testing new features like server-provided categories is not possible without this. * Replace MockContentSuggestionsProviderObserver with a fake. It shouldn't have been a mock, since we weren't using it to test behavior, only state. * In one case, test using what the observer sees, instead of peeking in through debugging hooks. * Get rid of special test base class and Mock::VerifyAndClear calls; I consider these anti-patterns. * Initialize the service better; give it an empty list of snippets for its first fetch, and wait for it to complete the fetch before returning (I think this is what was most strongly implicated by the failures with the other CL). * Create the service and expect the scheduling directly from each case, so they are more readable individually. Review-Url: https://codereview.chromium.org/2285133004 Cr-Commit-Position: refs/heads/master@{#415358}
- Loading branch information
Showing
5 changed files
with
672 additions
and
571 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.