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

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

Issue 2084903002: Moved BrowsingDataCounter and part of BrowsingDataCounterUtils to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 b36cc7059ed69f5338d422295081e54577ea5c6e..e25ed931623482daa40df64eb74d964306fd5e2f 100644
--- a/chrome/browser/browsing_data/browsing_data_counter_utils_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_counter_utils_unittest.cc
@@ -7,10 +7,12 @@
#include <string>
#include <vector>
+#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/test/base/testing_browser_process.h"
+#include "chrome/test/base/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(ENABLE_EXTENSIONS)
@@ -18,9 +20,21 @@
#include "chrome/browser/browsing_data/hosted_apps_counter.h"
#endif
+class BrowsingDataCounterUtilsTest : public testing::Test {
+ public:
+ BrowsingDataCounterUtilsTest() {}
+ ~BrowsingDataCounterUtilsTest() override {}
+
+ TestingProfile* GetProfile() { return &profile_; }
+
+ private:
+ base::MessageLoop loop_;
+ TestingProfile profile_;
+};
+
// Tests the complex output of the Autofill counter.
-TEST(BrowsingDataCounterUtilsTest, AutofillCounterResult) {
- AutofillCounter counter;
+TEST_F(BrowsingDataCounterUtilsTest, AutofillCounterResult) {
+ AutofillCounter counter(GetProfile());
// This test assumes that the strings are served exactly as defined,
// i.e. that the locale is set to the default "en".
@@ -68,8 +82,8 @@ TEST(BrowsingDataCounterUtilsTest, AutofillCounterResult) {
#if defined(ENABLE_EXTENSIONS)
// Tests the complex output of the hosted apps counter.
-TEST(BrowsingDataCounterUtilsTest, HostedAppsCounterResult) {
- HostedAppsCounter counter;
+TEST_F(BrowsingDataCounterUtilsTest, HostedAppsCounterResult) {
+ HostedAppsCounter counter(GetProfile());
// This test assumes that the strings are served exactly as defined,
// i.e. that the locale is set to the default "en".
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_counter_utils.cc ('k') | chrome/browser/browsing_data/browsing_data_remover.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698