Skip to content

Commit

Permalink
[ios] Add RemoveExcessNTPs SingleNTP fieldtrial config
Browse files Browse the repository at this point in the history
Change-Id: Ie3ad9622f97795a79bf443066fe7ebbd91537a0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3291767
Auto-Submit: Chris Lu <[email protected]>
Reviewed-by: Sergio Collazos <[email protected]>
Commit-Queue: Chris Lu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#972606}
  • Loading branch information
Chris Lu authored and Chromium LUCI CQ committed Feb 17, 2022
1 parent 6e3c300 commit a002198
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ - (AppLaunchConfiguration)appConfigurationForTestCase {
// Use commandline args to enable the Discover feed for this test case.
// Disabled elsewhere to account for possible flakiness.
AppLaunchConfiguration config;
// TODO(crbug.com/1265565):Once kSingleNtp is launched, investigate further as
// to why this test is failing.
if ([self isRunningTest:@selector
(testNewSearchFromNewTabMenuAfterTogglingFeed)]) {
config.features_disabled.push_back(kSingleNtp);
}
config.additional_args.push_back(std::string("--") +
switches::kEnableDiscoverFeed);
config.features_enabled.push_back(kDiscoverFeedInNtp);
Expand Down Expand Up @@ -437,7 +443,10 @@ - (void)testPromoTap {
[NewTabPageAppInterface setWhatsNewPromoToMoveToDock];

// Open a new tab to have the promo.
[ChromeEarlGreyUI openNewTab];
// Need to close all NTPs to ensure NotificationPromo is reset when
// kSingleNtp is enabled.
[ChromeEarlGrey closeCurrentTab];
[ChromeEarlGrey openNewTab];

// Tap the promo.
[[EarlGrey
Expand Down
30 changes: 30 additions & 0 deletions testing/variations/fieldtrial_testing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5400,6 +5400,21 @@
]
}
],
"RemoveExcessNTPs": [
{
"platforms": [
"ios"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"RemoveExcessNTPs"
]
}
]
}
],
"ReportCertificateErrors": [
{
"platforms": [
Expand Down Expand Up @@ -5814,6 +5829,21 @@
]
}
],
"SingleNTP": [
{
"platforms": [
"ios"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"SingleNTP"
]
}
]
}
],
"SnoozeIPH": [
{
"platforms": [
Expand Down

0 comments on commit a002198

Please sign in to comment.