Commit b7db0ccb authored by sczs's avatar sczs Committed by Commit Bot

Enables kInfobarUIRebootOnlyiOS13 by default

This is now needed in order to enable this locally and not via a finch
config which might not land before the re-sping gets to users.

Bug: 1071853
Change-Id: I71b42ca95e54197ddf76b4301616be36c37ad1ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2157505
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760756}
parent dfb7c942
...@@ -129,6 +129,7 @@ source_set("eg_tests") { ...@@ -129,6 +129,7 @@ source_set("eg_tests") {
"//ios/chrome/browser/download", "//ios/chrome/browser/download",
"//ios/chrome/browser/download:test_support", "//ios/chrome/browser/download:test_support",
"//ios/chrome/browser/ui/browser_view", "//ios/chrome/browser/ui/browser_view",
"//ios/chrome/browser/ui/infobars:feature_flags",
"//ios/chrome/browser/ui/infobars/banners:public", "//ios/chrome/browser/ui/infobars/banners:public",
"//ios/chrome/browser/ui/util", "//ios/chrome/browser/ui/util",
"//ios/chrome/test:eg_test_support", "//ios/chrome/test:eg_test_support",
...@@ -168,6 +169,7 @@ source_set("eg2_tests") { ...@@ -168,6 +169,7 @@ source_set("eg2_tests") {
"//ios/chrome/browser:chrome_url_constants", "//ios/chrome/browser:chrome_url_constants",
"//ios/chrome/browser/download:mime_types", "//ios/chrome/browser/download:mime_types",
"//ios/chrome/browser/download:test_support", "//ios/chrome/browser/download:test_support",
"//ios/chrome/browser/ui/infobars:feature_flags",
"//ios/chrome/browser/ui/infobars/banners:public", "//ios/chrome/browser/ui/infobars/banners:public",
"//ios/chrome/test:eg_test_support+eg2", "//ios/chrome/test:eg_test_support+eg2",
"//ios/chrome/test/earl_grey:eg_test_support+eg2", "//ios/chrome/test/earl_grey:eg_test_support+eg2",
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "ios/chrome/browser/download/download_test_util.h" #include "ios/chrome/browser/download/download_test_util.h"
#include "ios/chrome/browser/download/pass_kit_mime_type.h" #include "ios/chrome/browser/download/pass_kit_mime_type.h"
#import "ios/chrome/browser/ui/infobars/banners/infobar_banner_constants.h" #import "ios/chrome/browser/ui/infobars/banners/infobar_banner_constants.h"
#import "ios/chrome/browser/ui/infobars/infobar_feature.h"
#include "ios/chrome/grit/ios_strings.h" #include "ios/chrome/grit/ios_strings.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
...@@ -86,7 +87,9 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse( ...@@ -86,7 +87,9 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse(
// Turn on Messages UI. // Turn on Messages UI.
#if defined(CHROME_EARL_GREY_1) #if defined(CHROME_EARL_GREY_1)
_featureList.InitAndEnableFeature(kIOSInfobarUIReboot); _featureList.InitWithFeatures(
/*enabled_features=*/{kIOSInfobarUIReboot},
/*disabled_features=*/{kInfobarUIRebootOnlyiOS13});
#endif #endif
self.testServer->RegisterRequestHandler(base::Bind(&GetResponse)); self.testServer->RegisterRequestHandler(base::Bind(&GetResponse));
...@@ -96,6 +99,7 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse( ...@@ -96,6 +99,7 @@ std::unique_ptr<net::test_server::HttpResponse> GetResponse(
- (AppLaunchConfiguration)appConfigurationForTestCase { - (AppLaunchConfiguration)appConfigurationForTestCase {
AppLaunchConfiguration config; AppLaunchConfiguration config;
config.features_enabled.push_back(kIOSInfobarUIReboot); config.features_enabled.push_back(kIOSInfobarUIReboot);
config.features_disabled.push_back(kInfobarUIRebootOnlyiOS13);
return config; return config;
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "components/infobars/core/infobar_feature.h" #include "components/infobars/core/infobar_feature.h"
#import "ios/chrome/browser/ui/infobars/banners/infobar_banner_constants.h" #import "ios/chrome/browser/ui/infobars/banners/infobar_banner_constants.h"
#import "ios/chrome/browser/ui/infobars/infobar_constants.h" #import "ios/chrome/browser/ui/infobars/infobar_constants.h"
#import "ios/chrome/browser/ui/infobars/infobar_feature.h"
#import "ios/chrome/browser/ui/infobars/infobar_manager_app_interface.h" #import "ios/chrome/browser/ui/infobars/infobar_manager_app_interface.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
...@@ -90,6 +91,7 @@ void VerifyTestInfoBarVisibleForCurrentTab(bool visible, NSString* message) { ...@@ -90,6 +91,7 @@ void VerifyTestInfoBarVisibleForCurrentTab(bool visible, NSString* message) {
- (AppLaunchConfiguration)appConfigurationForTestCase { - (AppLaunchConfiguration)appConfigurationForTestCase {
AppLaunchConfiguration config; AppLaunchConfiguration config;
config.features_enabled.push_back(kIOSInfobarUIReboot); config.features_enabled.push_back(kIOSInfobarUIReboot);
config.features_disabled.push_back(kInfobarUIRebootOnlyiOS13);
return config; return config;
} }
...@@ -199,7 +201,9 @@ void VerifyTestInfoBarVisibleForCurrentTab(bool visible, NSString* message) { ...@@ -199,7 +201,9 @@ void VerifyTestInfoBarVisibleForCurrentTab(bool visible, NSString* message) {
- (void)testInfobarTopMostVisible { - (void)testInfobarTopMostVisible {
// Turn on Messages UI. // Turn on Messages UI.
#if defined(CHROME_EARL_GREY_1) #if defined(CHROME_EARL_GREY_1)
_featureList.InitAndEnableFeature(kIOSInfobarUIReboot); _featureList.InitWithFeatures(
/*enabled_features=*/{kIOSInfobarUIReboot},
/*disabled_features=*/{kInfobarUIRebootOnlyiOS13});
#endif #endif
// Open a new tab and navigate to the test page. // Open a new tab and navigate to the test page.
...@@ -243,7 +247,9 @@ void VerifyTestInfoBarVisibleForCurrentTab(bool visible, NSString* message) { ...@@ -243,7 +247,9 @@ void VerifyTestInfoBarVisibleForCurrentTab(bool visible, NSString* message) {
- (void)testInfobarTallerLayout { - (void)testInfobarTallerLayout {
// Turn on Messages UI. // Turn on Messages UI.
#if defined(CHROME_EARL_GREY_1) #if defined(CHROME_EARL_GREY_1)
_featureList.InitAndEnableFeature(kIOSInfobarUIReboot); _featureList.InitWithFeatures(
/*enabled_features=*/{kIOSInfobarUIReboot},
/*disabled_features=*/{kInfobarUIRebootOnlyiOS13});
#endif #endif
// Open a new tab and navigate to the test page. // Open a new tab and navigate to the test page.
......
...@@ -40,8 +40,8 @@ const base::Feature kSaveCardInfobarMessagesUI{ ...@@ -40,8 +40,8 @@ const base::Feature kSaveCardInfobarMessagesUI{
const base::Feature kTranslateInfobarMessagesUI{ const base::Feature kTranslateInfobarMessagesUI{
"TranslateInfobarMessagesUI", base::FEATURE_ENABLED_BY_DEFAULT}; "TranslateInfobarMessagesUI", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kInfobarUIRebootOnlyiOS13{ const base::Feature kInfobarUIRebootOnlyiOS13{"InfobarUIRebootOnlyiOS13",
"InfobarUIRebootOnlyiOS13", base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
bool IsInfobarUIRebootEnabled() { bool IsInfobarUIRebootEnabled() {
if (base::FeatureList::IsEnabled(kInfobarUIRebootOnlyiOS13)) { if (base::FeatureList::IsEnabled(kInfobarUIRebootOnlyiOS13)) {
......
...@@ -257,7 +257,9 @@ void TestResponseProvider::GetLanguageResponse( ...@@ -257,7 +257,9 @@ void TestResponseProvider::GetLanguageResponse(
[super setUp]; [super setUp];
#if defined(CHROME_EARL_GREY_1) #if defined(CHROME_EARL_GREY_1)
_featureList.InitAndEnableFeature(kIOSInfobarUIReboot); _featureList.InitWithFeatures(
/*enabled_features=*/{kIOSInfobarUIReboot},
/*disabled_features=*/{kInfobarUIRebootOnlyiOS13});
#endif #endif
// Set up the fake URL for the translate script to hit the mock HTTP server. // Set up the fake URL for the translate script to hit the mock HTTP server.
...@@ -276,6 +278,7 @@ void TestResponseProvider::GetLanguageResponse( ...@@ -276,6 +278,7 @@ void TestResponseProvider::GetLanguageResponse(
- (AppLaunchConfiguration)appConfigurationForTestCase { - (AppLaunchConfiguration)appConfigurationForTestCase {
AppLaunchConfiguration config; AppLaunchConfiguration config;
config.features_enabled.push_back(kIOSInfobarUIReboot); config.features_enabled.push_back(kIOSInfobarUIReboot);
config.features_disabled.push_back(kInfobarUIRebootOnlyiOS13);
return config; return config;
} }
......
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