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

Unified Diff: chrome/browser/translate/chrome_translate_client_unittest.cc

Issue 2941953002: Add switches for language detection and translation logging. (Closed)
Patch Set: updates Created 3 years, 6 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
« no previous file with comments | « chrome/browser/translate/chrome_translate_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/chrome_translate_client_unittest.cc
diff --git a/chrome/browser/translate/chrome_translate_client_unittest.cc b/chrome/browser/translate/chrome_translate_client_unittest.cc
index 1793d8487dcfac1adef1e34d140fbb82de256ac2..18f9cf9723143b832067d93aeff9003a6c7914a2 100644
--- a/chrome/browser/translate/chrome_translate_client_unittest.cc
+++ b/chrome/browser/translate/chrome_translate_client_unittest.cc
@@ -9,9 +9,11 @@
#include "base/command_line.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
+#include "base/test/scoped_feature_list.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/sync/user_event_service_factory.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
+#include "components/sync/driver/sync_driver_switches.h"
#include "components/sync/user_events/fake_user_event_service.h"
#include "components/translate/core/common/language_detection_details.h"
#include "content/public/browser/web_contents.h"
@@ -31,6 +33,9 @@ class ChromeTranslateClientTest : public ChromeRenderViewHostTestHarness {
browser_sync::UserEventServiceFactory::GetInstance()
->SetTestingFactoryAndUse(browser_context(),
&BuildFakeUserEventService));
+ scoped_feature_list_ = base::MakeUnique<base::test::ScopedFeatureList>();
+ scoped_feature_list_->InitAndEnableFeature(
+ switches::kSyncUserLanguageDetectionEvents);
}
void TearDown() override { ChromeRenderViewHostTestHarness::TearDown(); }
@@ -41,6 +46,7 @@ class ChromeTranslateClientTest : public ChromeRenderViewHostTestHarness {
}
private:
+ std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_;
syncer::FakeUserEventService* fake_user_event_service_;
};
« no previous file with comments | « chrome/browser/translate/chrome_translate_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698