Commit 45c1f87d authored by Mihai Sardarescu's avatar Mihai Sardarescu Committed by Commit Bot

Reland "[iOS] Enable Earl Grey 1 and 2 tests for ClearSyncedData feature."

This reverts commit fcca6197.

Reason for revert: Required downstream fix was submitted.

Original change's description:
> Revert "[iOS] Enable Earl Grey 1 and 2 tests for ClearSyncedData feature."
> 
> This reverts commit 3edb7dbb.
> 
> Reason for revert: consistently fails on downstream bots.
> 
> Original change's description:
> > [iOS] Enable Earl Grey 1 and 2 tests for ClearSyncedData feature.
> > 
> > Previously the test case testSignOutAndClearDataFromNonManagedAccountClearsData() was disabled due to a misuse of the ScopedFeatureList flag, which should only be used for unit tests. This meant that the flag was not set correctly in the tests.
> > 
> > The change uses the AppLaunchManager to enable the experimental flag on Earl Grey 2 and the flag within the Earl Grey 1 JSON setup.
> > 
> > Bug: 1045981
> > Change-Id: I3160477a5230d24617168800a5cabacb4b8fd672
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2023835
> > Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
> > Reviewed-by: Ben Pastene <bpastene@chromium.org>
> > Commit-Queue: Nohemi Fernandez <fernandex@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#737283}
> 
> TBR=sdefresne@chromium.org,bpastene@chromium.org,fernandex@chromium.org
> 
> Change-Id: I58ffda870f5d63c9b23fb9fb40903d14b2fd9ead
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1045981
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032120
> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#737316}

TBR=sdefresne@chromium.org,bpastene@chromium.org,fernandex@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1045981
Change-Id: I861b7342e2407bc972e6d794ec2ad85a4cd73019
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2037993Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738519}
parent 2f9dc9df
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
}, },
{ {
"app": "ios_chrome_settings_egtests", "app": "ios_chrome_settings_egtests",
"test args": [
"--enable-features=ClearSyncedData"
],
"xcode parallelization": true, "xcode parallelization": true,
"shards": 1, "shards": 1,
"swarming tasks": 3 "swarming tasks": 3
......
...@@ -49,9 +49,7 @@ id<GREYMatcher> NoBookmarksLabel() { ...@@ -49,9 +49,7 @@ id<GREYMatcher> NoBookmarksLabel() {
@interface AccountCollectionsTestCase : ChromeTestCase @interface AccountCollectionsTestCase : ChromeTestCase
@end @end
@implementation AccountCollectionsTestCase { @implementation AccountCollectionsTestCase
base::test::ScopedFeatureList _featureList;
}
- (void)tearDown { - (void)tearDown {
[ChromeEarlGrey waitForBookmarksToFinishLoading]; [ChromeEarlGrey waitForBookmarksToFinishLoading];
...@@ -62,9 +60,14 @@ id<GREYMatcher> NoBookmarksLabel() { ...@@ -62,9 +60,14 @@ id<GREYMatcher> NoBookmarksLabel() {
[super tearDown]; [super tearDown];
} }
- (void)setUp { - (void)launchAppForTestMethod {
_featureList.InitAndEnableFeature(kClearSyncedData); [[AppLaunchManager sharedManager]
ensureAppLaunchedWithFeaturesEnabled:{kClearSyncedData}
disabled:{}
relaunchPolicy:NoForceRelaunchAndResetState];
}
- (void)setUp {
[super setUp]; [super setUp];
[ChromeEarlGrey waitForBookmarksToFinishLoading]; [ChromeEarlGrey waitForBookmarksToFinishLoading];
...@@ -205,8 +208,7 @@ id<GREYMatcher> NoBookmarksLabel() { ...@@ -205,8 +208,7 @@ id<GREYMatcher> NoBookmarksLabel() {
// Tests that selecting sign-out and clear data from a non-managed user account // Tests that selecting sign-out and clear data from a non-managed user account
// clears the user's synced data. // clears the user's synced data.
// TODO(crbug.com/1045981): Fix and enable. - (void)testSignOutAndClearDataFromNonManagedAccountClearsData {
- (void)DISABLED_testSignOutAndClearDataFromNonManagedAccountClearsData {
FakeChromeIdentity* fakeIdentity = [SigninEarlGreyUtils fakeIdentity1]; FakeChromeIdentity* fakeIdentity = [SigninEarlGreyUtils fakeIdentity1];
// Sign In |fakeIdentity|. // Sign In |fakeIdentity|.
......
...@@ -917,7 +917,9 @@ ...@@ -917,7 +917,9 @@
"type": "raw", "type": "raw",
}, },
"ios_chrome_settings_egtests": { "ios_chrome_settings_egtests": {
"args": [], "args": [
"--enable-features=ClearSyncedData",
],
"label": "//ios/chrome/test/earl_grey:ios_chrome_settings_egtests", "label": "//ios/chrome/test/earl_grey:ios_chrome_settings_egtests",
"type": "raw", "type": "raw",
}, },
......
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