Commit 3edb7dbb authored by Nohemi Fernandez's avatar Nohemi Fernandez Committed by Commit Bot

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