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

Unified Diff: chrome/browser/browsing_data/browsing_data_counter_utils_unittest.cc

Issue 2153863002: Move counters for passwords, history and autofill to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@separate_build_targets_in_components_bd
Patch Set: Addressed comments Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data/browsing_data_counter_utils_unittest.cc
diff --git a/chrome/browser/browsing_data/browsing_data_counter_utils_unittest.cc b/chrome/browser/browsing_data/browsing_data_counter_utils_unittest.cc
index e25ed931623482daa40df64eb74d964306fd5e2f..c00812865fe05159ddc9e5a7e3e4f90ebbc67cca 100644
--- a/chrome/browser/browsing_data/browsing_data_counter_utils_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_counter_utils_unittest.cc
@@ -10,9 +10,10 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/browsing_data/autofill_counter.h"
+#include "chrome/browser/web_data_service_factory.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/browsing_data/core/counters/autofill_counter.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(ENABLE_EXTENSIONS)
@@ -34,7 +35,10 @@ class BrowsingDataCounterUtilsTest : public testing::Test {
// Tests the complex output of the Autofill counter.
TEST_F(BrowsingDataCounterUtilsTest, AutofillCounterResult) {
- AutofillCounter counter(GetProfile());
+ browsing_data::AutofillCounter counter(
+ WebDataServiceFactory::GetAutofillWebDataForProfile(
+ GetProfile(), ServiceAccessType::EXPLICIT_ACCESS)
+ .get());
// This test assumes that the strings are served exactly as defined,
// i.e. that the locale is set to the default "en".
@@ -61,10 +65,8 @@ TEST_F(BrowsingDataCounterUtilsTest, AutofillCounterResult) {
};
for (const TestCase& test_case : kTestCases) {
- AutofillCounter::AutofillResult result(
- &counter,
- test_case.num_suggestions,
- test_case.num_credit_cards,
+ browsing_data::AutofillCounter::AutofillResult result(
+ &counter, test_case.num_suggestions, test_case.num_credit_cards,
test_case.num_addresses);
SCOPED_TRACE(base::StringPrintf(
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_counter_utils.cc ('k') | chrome/browser/browsing_data/cache_counter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698