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

Unified Diff: components/translate/core/browser/translate_browser_metrics_unittest.cc

Issue 2819813002: Translate: remove --disable-translate flag (Closed)
Patch Set: Merge branch 'master' into translate_remove_disable_flag Created 3 years, 8 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: components/translate/core/browser/translate_browser_metrics_unittest.cc
diff --git a/components/translate/core/browser/translate_browser_metrics_unittest.cc b/components/translate/core/browser/translate_browser_metrics_unittest.cc
index ef0fb141ac2939551ae52382f3e81ed9889ff54e..283dfd5ea240af38c49980742a9ca72d3a81e301 100644
--- a/components/translate/core/browser/translate_browser_metrics_unittest.cc
+++ b/components/translate/core/browser/translate_browser_metrics_unittest.cc
@@ -30,7 +30,6 @@ class MetricsRecorder {
}
void CheckInitiationStatus(int expected_disabled_by_prefs,
- int expected_disabled_by_switch,
int expected_disabled_by_config,
int expected_disabled_by_build,
int expected_language_is_not_supported,
@@ -47,10 +46,6 @@ class MetricsRecorder {
GetCountWithoutSnapshot(translate::TranslateBrowserMetrics::
INITIATION_STATUS_DISABLED_BY_PREFS));
EXPECT_EQ(
- expected_disabled_by_switch,
- GetCountWithoutSnapshot(translate::TranslateBrowserMetrics::
- INITIATION_STATUS_DISABLED_BY_SWITCH));
- EXPECT_EQ(
expected_disabled_by_config,
GetCountWithoutSnapshot(translate::TranslateBrowserMetrics::
INITIATION_STATUS_DISABLED_BY_CONFIG));
@@ -132,46 +127,43 @@ TEST(TranslateBrowserMetricsTest, ReportInitiationStatus) {
MetricsRecorder recorder(translate::TranslateBrowserMetrics::GetMetricsName(
translate::TranslateBrowserMetrics::UMA_INITIATION_STATUS));
- recorder.CheckInitiationStatus(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ recorder.CheckInitiationStatus(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::INITIATION_STATUS_DISABLED_BY_PREFS);
- recorder.CheckInitiationStatus(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- translate::TranslateBrowserMetrics::ReportInitiationStatus(
- translate::TranslateBrowserMetrics::INITIATION_STATUS_DISABLED_BY_SWITCH);
- recorder.CheckInitiationStatus(1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ recorder.CheckInitiationStatus(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::INITIATION_STATUS_DISABLED_BY_CONFIG);
- recorder.CheckInitiationStatus(1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ recorder.CheckInitiationStatus(1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::INITIATION_STATUS_DISABLED_BY_KEY);
- recorder.CheckInitiationStatus(1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0);
+ recorder.CheckInitiationStatus(1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::
INITIATION_STATUS_LANGUAGE_IS_NOT_SUPPORTED);
- recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0);
+ recorder.CheckInitiationStatus(1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::
INITIATION_STATUS_MIME_TYPE_IS_NOT_SUPPORTED);
- recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0);
+ recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::
INITIATION_STATUS_URL_IS_NOT_SUPPORTED);
- recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0);
+ recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::INITIATION_STATUS_SIMILAR_LANGUAGES);
- recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0);
+ recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::INITIATION_STATUS_ACCEPT_LANGUAGES);
- recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0);
+ recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::INITIATION_STATUS_AUTO_BY_CONFIG);
- recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0);
+ recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::INITIATION_STATUS_AUTO_BY_LINK);
- recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0);
+ recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0);
translate::TranslateBrowserMetrics::ReportInitiationStatus(
translate::TranslateBrowserMetrics::INITIATION_STATUS_SHOW_INFOBAR);
- recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ recorder.CheckInitiationStatus(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
}
TEST(TranslateBrowserMetricsTest, ReportLanguageDetectionError) {

Powered by Google App Engine
This is Rietveld 408576698