DescriptionSplit BrowsingDataRemoverTest into two tests for Impl and Delegate.
BrowsingDataRemoverImplTest will eventually be moved to content/ together
with BrowsingDataRemoverImpl.
All tests and their helper classes have been moved to one or the other unittest
based on whether the tested datatype is present in content/ or only in chrome/.
A few changes had to be made:
- The *ImplTest class was converted to use BrowserContext instead of
TestingProfile, as it will use either BrowserContext or TestingBrowserContext
after it's moved to content/.
- URLRequestContext is now retrieved through StoragePartition where it
originally was directly retrieved through TestingProfile. This is because
BrowserContext does not directly expose a GetURLRequestContext method.
- The downloads test also tested the behavior of ChromeDownloadManagerDelegate.
As downloads are a content/ datatype, the main part of the test was moved
to *ImplTest, but a section testing ChromeDownloadManagerDelegate was moved
to *DelegateTest.
There are a few dependencies that were not yet removed in this CL, but will be
removed in a followup:
1. *DelegateTest needs to see and be friend of BrowsingDataRemoverImpl to test
the usage of BrowsingDataFilterBuilder. To fix this, we need to improve
BrowsingDataFilterBuilder first
(uploaded as https://codereview.chromium.org/2647683002/).
2. *ImplTest refers to extensions, which are not known to content/. This is
caused by BrowsingDataHelper::EXTENSION mask which is respected in
StoragePartition deletions. To fix this, BrowsingDataHelper must be improved
first (also coming soon).
3. *ImplTest works with BrowsingContext, but needs to use a TestingProfile to
create an instance of BrowsingDataRemoverImpl. This is because the factory
does not accept a TestingBrowsingContext. This will be fixed naturally when
we move BrowsingDataRemoverImpl to content/ and replace the factory with
something like ::CreateFor(BrowsingContext*).
BUG=668114
Review-Url: https://codereview.chromium.org/2641853002
Cr-Commit-Position: refs/heads/master@{#445367}
Committed: https://chromium.googlesource.com/chromium/src/+/29b98cde67e8350d241fad23847ef72fbb939de5
Patch Set 1 #Patch Set 2 : Update. #
Total comments: 2
Patch Set 3 : Updated year #
Messages
Total messages: 28 (18 generated)
|