Commit 39b6d264 authored by Moe Ahmadi's avatar Moe Ahmadi Committed by Commit Bot

Reland "[iOS][Translate] Adds EarlGrey tests for the new translate infobar (part 2)"

This is a reland of e09772fe

The original CL was reverted because testInfobarAutoNeverTranslateMaxTries was
timing out. That test is disabled in this reland.

Original change's description:
> [iOS][Translate] Adds EarlGrey tests for the new translate infobar (part 2)
>
> Adds tests for:
>
> 1. Auto Always translate (incl. max tries)
> 2. Never translate language
> 3. Auto Never translate (incl. max tries)
> 4. Never translate site
>
>
> Bug: 910994
> Change-Id: Ice90d639afd1f48dbdace62f6da8932f7b78d185
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1521592
> Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
> Reviewed-by: anthonyvd <anthonyvd@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#642911}

Bug: 910994
Change-Id: I06bbc66da0066690884706787b8fad1a543c455e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1538708Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644815}
parent b3bbf1d2
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
namespace translate { namespace translate {
namespace {
// The number of times user should consecutively translate for "Always // The number of times user should consecutively translate for "Always
// Translate" to automatically trigger. // Translate" to automatically trigger.
const int kAutoAlwaysThreshold = 5; const int kAutoAlwaysThreshold = 5;
...@@ -35,7 +34,6 @@ const int kAutoNeverThreshold = 10; ...@@ -35,7 +34,6 @@ const int kAutoNeverThreshold = 10;
const int kMaxNumberOfAutoAlways = 2; const int kMaxNumberOfAutoAlways = 2;
// The maximum number of times "Never Translate" is automatically triggered. // The maximum number of times "Never Translate" is automatically triggered.
const int kMaxNumberOfAutoNever = 2; const int kMaxNumberOfAutoNever = 2;
} // namespace
const base::Feature kTranslateCompactUI{"TranslateCompactUI", const base::Feature kTranslateCompactUI{"TranslateCompactUI",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
......
...@@ -29,6 +29,17 @@ class InfoBarManager; ...@@ -29,6 +29,17 @@ class InfoBarManager;
namespace translate { namespace translate {
// The number of times user should consecutively translate for "Always
// Translate" to automatically trigger.
extern const int kAutoAlwaysThreshold;
// The number of times user should consecutively dismiss the translate infobar
// for "Never Translate" to automatically trigger.
extern const int kAutoNeverThreshold;
// The maximum number of times "Always Translate" is automatically triggered.
extern const int kMaxNumberOfAutoAlways;
// The maximum number of times "Never Translate" is automatically triggered.
extern const int kMaxNumberOfAutoNever;
// Feature flag for "Translate Compact Infobar UI" project. // Feature flag for "Translate Compact Infobar UI" project.
extern const base::Feature kTranslateCompactUI; extern const base::Feature kTranslateCompactUI;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment