Commit c005d1f5 authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Commit Bot

[Android] Rename SyncTestRule setUpAccountAndSignin method

MOBILE_IDENTITY_CONSISTENCY allows users to be signed in without
syncing. Renaming this method in SyncTestRule to properly reflect what
it does.

Bug: 1135669
Change-Id: I0260636efc98c46a8250d25324ea8763e069e5d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454049
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814690}
parent 2e54d5fd
......@@ -66,7 +66,7 @@ public class PasswordGenerationIntegrationTest {
@Before
public void setUp() throws InterruptedException {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
ManualFillingTestHelper.disableServerPredictions();
mHelper.loadTestPage(FORM_URL, false);
}
......
......@@ -57,7 +57,7 @@ public class AutofillUpstreamTest {
@Before
public void setUp() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mServer = new EmbeddedTestServer();
mServer.initializeNative(InstrumentationRegistry.getContext(),
EmbeddedTestServer.ServerHTTPSSetting.USE_HTTP);
......
......@@ -108,7 +108,7 @@ import java.io.IOException;
public void testSyncErrorInfoBarNotShownWhenNoError() {
Assert.assertEquals("InfoBar should not be shown before signing in", 0,
mSyncTestRule.getInfoBars().size());
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
mFakeProfileSyncService.setEngineInitialized(true);
mFakeProfileSyncService.setAuthError(GoogleServiceAuthError.State.NONE);
......@@ -182,13 +182,13 @@ import java.io.IOException;
}
private void showSyncErrorInfoBarForAuthError() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mFakeProfileSyncService.setAuthError(GoogleServiceAuthError.State.INVALID_GAIA_CREDENTIALS);
mSyncTestRule.loadUrlInNewTab(UrlConstants.CHROME_BLANK_URL);
}
private void showSyncErrorInfoBarForPassphraseRequired() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mFakeProfileSyncService.setEngineInitialized(true);
mFakeProfileSyncService.setPassphraseRequiredForPreferredDataTypes(true);
mSyncTestRule.loadUrlInNewTab(UrlConstants.CHROME_BLANK_URL);
......
......@@ -158,7 +158,7 @@ public class MainSettingsFragmentTest {
mRenderTestRule.render(view, "main_settings_signed_out");
// Sign in and render changes.
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
mRenderTestRule.render(view, "main_settings_signed_in");
}
......@@ -175,7 +175,7 @@ public class MainSettingsFragmentTest {
mRenderTestRule.render(view, "main_settings_signed_out_safety_check");
// Sign in and render changes.
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
mRenderTestRule.render(view, "main_settings_signed_in_safety_check");
}
......@@ -347,7 +347,7 @@ public class MainSettingsFragmentTest {
mMainSettings.findPreference(MainSettings.PREF_ACCOUNT_SECTION));
// SignIn to see the changes
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
Assert.assertEquals("SignInPreference should be at the signed in state. ",
signInPreference.getState(), State.SIGNED_IN);
......@@ -375,7 +375,7 @@ public class MainSettingsFragmentTest {
mMainSettings.findPreference(MainSettings.PREF_MANAGE_SYNC).isVisible());
// SignIn to see the changes
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
Assert.assertEquals("SignInPreference should be at the signed in state. ",
signInPreference.getState(), State.SIGNED_IN);
......
......@@ -76,7 +76,7 @@ public class AutofillTest {
@Before
public void setUp() throws Exception {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
// Make sure the initial state is clean.
assertClientAutofillProfileCount(0);
assertServerAutofillProfileCountWithName(0, STREET);
......
......@@ -84,7 +84,7 @@ public class BookmarksTest {
// Without this call to fake that knowledge for testing, it crashes.
mBookmarkBridge.loadEmptyPartnerBookmarkShimForTesting();
});
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
// Make sure initial state is clean.
assertClientBookmarkCount(0);
assertServerBookmarkCountWithName(0, TITLE);
......
......@@ -108,7 +108,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testSyncEverythingAndDataTypes() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
ManageSyncSettings fragment = startManageSyncPreferences();
ChromeSwitchPreference syncEverything = getSyncEverything(fragment);
......@@ -128,7 +128,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testSettingDataTypes() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
ManageSyncSettings fragment = startManageSyncPreferences();
ChromeSwitchPreference syncEverything = getSyncEverything(fragment);
......@@ -161,7 +161,7 @@ public class ManageSyncSettingsTest {
@Feature({"Sync"})
@Features.EnableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testUnsettingAllDataTypesStopsSync() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
ManageSyncSettings fragment = startManageSyncPreferences();
......@@ -180,7 +180,7 @@ public class ManageSyncSettingsTest {
@Feature({"Sync"})
@Features.EnableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testSettingAnyDataTypeStartsSync() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setChosenDataTypes(false, new HashSet<>());
mSyncTestRule.stopSync();
ManageSyncSettings fragment = startManageSyncPreferences();
......@@ -197,7 +197,7 @@ public class ManageSyncSettingsTest {
@Feature({"Sync"})
@Features.EnableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testTogglingSyncEverythingStartsSync() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setChosenDataTypes(false, new HashSet<>());
mSyncTestRule.stopSync();
ManageSyncSettings fragment = startManageSyncPreferences();
......@@ -212,7 +212,7 @@ public class ManageSyncSettingsTest {
@Feature({"Sync"})
@Features.EnableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testTogglingSyncEverythingDoesNotStopSync() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setChosenDataTypes(false, new HashSet<>());
mSyncTestRule.startSync();
ManageSyncSettings fragment = startManageSyncPreferences();
......@@ -228,7 +228,7 @@ public class ManageSyncSettingsTest {
@Feature({"Sync"})
@Features.EnableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testPressingTurnOffSyncAndSignOutShowsSignOutDialog() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setChosenDataTypes(true, null);
mSyncTestRule.startSync();
ManageSyncSettings fragment = startManageSyncPreferences();
......@@ -247,7 +247,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testPaymentsIntegrationChecked() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setPaymentsIntegrationEnabled(true);
ManageSyncSettings fragment = startManageSyncPreferences();
......@@ -264,7 +264,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testPaymentsIntegrationUnchecked() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setPaymentsIntegrationEnabled(false);
mSyncTestRule.setChosenDataTypes(false, UI_DATATYPES.keySet());
......@@ -282,7 +282,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testPaymentsIntegrationCheckboxDisablesPaymentsIntegration() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setPaymentsIntegrationEnabled(true);
ManageSyncSettings fragment = startManageSyncPreferences();
......@@ -303,7 +303,7 @@ public class ManageSyncSettingsTest {
@FlakyTest(message = "crbug.com/988622")
@Feature({"Sync"})
public void testPaymentsIntegrationCheckboxEnablesPaymentsIntegration() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setPaymentsIntegrationEnabled(false);
mSyncTestRule.setChosenDataTypes(false, UI_DATATYPES.keySet());
......@@ -322,7 +322,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testPaymentsIntegrationCheckboxClearsServerAutofillCreditCards() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setPaymentsIntegrationEnabled(true);
Assert.assertFalse(
......@@ -351,7 +351,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testPaymentsIntegrationDisabledByAutofillSyncCheckbox() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setPaymentsIntegrationEnabled(true);
ManageSyncSettings fragment = startManageSyncPreferences();
......@@ -376,7 +376,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testPaymentsIntegrationEnabledBySyncEverything() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setPaymentsIntegrationEnabled(false);
mSyncTestRule.disableDataType(ModelType.AUTOFILL);
......@@ -417,7 +417,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testChoosePassphraseTypeWhenSyncIsOff() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
ManageSyncSettings fragment = startManageSyncPreferences();
Preference encryption = getEncryption(fragment);
......@@ -438,7 +438,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testEnterPassphraseWhenSyncIsOff() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
final ManageSyncSettings fragment = startManageSyncPreferences();
mSyncTestRule.stopSync();
......@@ -451,7 +451,7 @@ public class ManageSyncSettingsTest {
@SmallTest
@Feature({"Sync"})
public void testPassphraseCreation() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
final ManageSyncSettings fragment = startManageSyncPreferences();
TestThreadUtils.runOnUiThreadBlocking(
......@@ -528,7 +528,7 @@ public class ManageSyncSettingsTest {
Collections.singletonList(trustedVaultKey));
mSyncTestRule.getFakeServerHelper().setTrustedVaultNigori(trustedVaultKey);
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
// Initially FakeTrustedVaultClientBackend doesn't provide any keys, so PSS should remain
// in TrustedVaultKeyRequired state.
......@@ -550,7 +550,7 @@ public class ManageSyncSettingsTest {
@Feature({"Sync"})
@Features.EnableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testAdvancedSyncFlowPreferencesAndBottomBarShown() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
final ManageSyncSettings fragment = startManageSyncPreferencesFromSyncConsentFlow();
Assert.assertTrue(
......@@ -567,7 +567,7 @@ public class ManageSyncSettingsTest {
@Feature({"Sync", "RenderTest"})
@Features.EnableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testAdvancedSyncFlowTopView() throws Exception {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
final ManageSyncSettings fragment = startManageSyncPreferencesFromSyncConsentFlow();
InstrumentationRegistry.getInstrumentation().waitForIdleSync();
......@@ -579,7 +579,7 @@ public class ManageSyncSettingsTest {
@Feature({"Sync", "RenderTest"})
@Features.EnableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testAdvancedSyncFlowBottomView() throws Exception {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
final ManageSyncSettings fragment = startManageSyncPreferencesFromSyncConsentFlow();
TestThreadUtils.runOnUiThreadBlocking(() -> {
......
......@@ -58,7 +58,7 @@ public class ManageSyncSettingsWithFakeProfileSyncServiceTest {
final FakeProfileSyncService fakeProfileSyncService =
(FakeProfileSyncService) mSyncTestRule.getProfileSyncService();
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
// Trigger PassphraseDialogFragment to be shown when taping on Encryption.
fakeProfileSyncService.setPassphraseRequiredForPreferredDataTypes(true);
......
......@@ -93,7 +93,7 @@ public class OpenTabsTest {
@Before
public void setUp() throws Exception {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mClientName = getClientName();
mSessionTagCounter = 0;
}
......
......@@ -63,7 +63,7 @@ public class SyncAndServicesSettingsTest {
@LargeTest
@Feature({"Sync", "Preferences"})
public void testSyncSwitch() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
SyncAndServicesSettings fragment = startSyncAndServicesPreferences();
final ChromeSwitchPreference syncSwitch = getSyncSwitch(fragment);
......@@ -85,7 +85,7 @@ public class SyncAndServicesSettingsTest {
@LargeTest
@Feature({"Sync", "Preferences"})
public void testOpeningSettingsDoesntEnableSync() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.stopSync();
SyncAndServicesSettings fragment = startSyncAndServicesPreferences();
closeFragment(fragment);
......@@ -99,7 +99,7 @@ public class SyncAndServicesSettingsTest {
@LargeTest
@Feature({"Sync", "Preferences"})
public void testOpeningSettingsDoesntStartEngine() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.stopSync();
startSyncAndServicesPreferences();
TestThreadUtils.runOnUiThreadBlocking(() -> {
......@@ -111,7 +111,7 @@ public class SyncAndServicesSettingsTest {
@LargeTest
@Feature({"Sync", "Preferences"})
public void testDefaultControlStatesWithSyncOffThenOn() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.stopSync();
SyncAndServicesSettings fragment = startSyncAndServicesPreferences();
assertSyncOffState(fragment);
......@@ -124,7 +124,7 @@ public class SyncAndServicesSettingsTest {
@LargeTest
@Feature({"Sync", "Preferences"})
public void testDefaultControlStatesWithSyncOnThenOff() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
SyncAndServicesSettings fragment = startSyncAndServicesPreferences();
assertSyncOnState(fragment);
......@@ -137,7 +137,7 @@ public class SyncAndServicesSettingsTest {
@Feature({"Sync", "Preferences"})
@DisabledTest(message = "https://crbug.com/991135")
public void testSyncSwitchClearsServerAutofillCreditCards() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.setPaymentsIntegrationEnabled(true);
Assert.assertFalse(
......
......@@ -44,7 +44,7 @@ public class SyncAndServicesSettingsWithFakeProfileSyncServiceTest {
public void testTrustedVaultKeyRequiredShowsSyncErrorCard() throws Exception {
FakeProfileSyncService fakeProfileSyncService =
(FakeProfileSyncService) mSyncTestRule.getProfileSyncService();
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
SyncTestUtil.waitForSyncActive();
fakeProfileSyncService.setEngineInitialized(true);
fakeProfileSyncService.setTrustedVaultKeyRequiredForPreferredDataTypes(true);
......
......@@ -48,7 +48,7 @@ public class SyncTest {
@LargeTest
@Feature({"Sync"})
public void testSignInAndOut() {
Account account = mSyncTestRule.setUpAccountAndSignInForTesting();
Account account = mSyncTestRule.setUpAccountAndEnableSyncForTesting();
// Signing out should disable sync.
mSyncTestRule.signOut();
......@@ -63,7 +63,7 @@ public class SyncTest {
@LargeTest
@Feature({"Sync"})
public void testStopAndClear() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
CriteriaHelper.pollUiThread(
()
-> IdentityServicesProvider.get()
......@@ -95,7 +95,7 @@ public class SyncTest {
@DisabledTest(message = "crbug.com/588050,crbug.com/595893")
public void testRename() {
// The two accounts object that would represent the account rename.
final Account oldAccount = mSyncTestRule.setUpAccountAndSignInForTesting();
final Account oldAccount = mSyncTestRule.setUpAccountAndEnableSyncForTesting();
final Account newAccount = mSyncTestRule.addAccount("test2@gmail.com");
TestThreadUtils.runOnUiThreadBlocking(() -> {
......@@ -133,7 +133,7 @@ public class SyncTest {
@LargeTest
@Feature({"Sync"})
public void testStopAndStartSync() {
Account account = mSyncTestRule.setUpAccountAndSignInForTesting();
Account account = mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.stopSync();
Assert.assertEquals(account, mSyncTestRule.getCurrentSignedInAccount());
......@@ -146,7 +146,7 @@ public class SyncTest {
@LargeTest
@Feature({"Sync"})
public void testStopAndStartSyncThroughAndroidChromeSync() {
Account account = mSyncTestRule.setUpAccountAndSignInForTesting();
Account account = mSyncTestRule.setUpAccountAndEnableSyncForTesting();
String authority = AndroidSyncSettings.getContractAuthority();
Assert.assertTrue(AndroidSyncSettingsTestUtils.getIsSyncEnabledOnUiThread());
......@@ -167,7 +167,7 @@ public class SyncTest {
@Feature({"Sync"})
@DisabledTest(message = "crbug.com/1103515")
public void testStopAndStartSyncThroughAndroidMasterSync() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
Assert.assertTrue(AndroidSyncSettingsTestUtils.getIsSyncEnabledOnUiThread());
Assert.assertTrue(SyncTestUtil.isSyncRequested());
......@@ -187,7 +187,7 @@ public class SyncTest {
@Features.DisableFeatures(ChromeFeatureList.DECOUPLE_SYNC_FROM_ANDROID_MASTER_SYNC)
@DisabledTest(message = "Test is flaky crbug.com/1100890")
public void testReenableMasterSyncFirst() {
Account account = mSyncTestRule.setUpAccountAndSignInForTesting();
Account account = mSyncTestRule.setUpAccountAndEnableSyncForTesting();
String authority = AndroidSyncSettings.getContractAuthority();
Assert.assertTrue(AndroidSyncSettingsTestUtils.getIsSyncEnabledOnUiThread());
......@@ -220,7 +220,7 @@ public class SyncTest {
@Features.DisableFeatures(ChromeFeatureList.DECOUPLE_SYNC_FROM_ANDROID_MASTER_SYNC)
@Feature({"Sync"})
public void testReenableChromeSyncFirst() {
Account account = mSyncTestRule.setUpAccountAndSignInForTesting();
Account account = mSyncTestRule.setUpAccountAndEnableSyncForTesting();
String authority = AndroidSyncSettings.getContractAuthority();
Assert.assertTrue(AndroidSyncSettingsTestUtils.getIsSyncEnabledOnUiThread());
......@@ -253,7 +253,7 @@ public class SyncTest {
@Features.DisableFeatures(ChromeFeatureList.DECOUPLE_SYNC_FROM_ANDROID_MASTER_SYNC)
@Feature({"Sync"})
public void testMasterSyncBlocksSyncStart() {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
mSyncTestRule.stopSync();
Assert.assertFalse(SyncTestUtil.isSyncRequested());
......
......@@ -198,7 +198,7 @@ public class SyncTestRule extends ChromeActivityTestRule<ChromeActivity> {
* this. For most purposes this function should be used as this emulates the basic sign in flow.
* @return the test account that is signed in.
*/
public Account setUpAccountAndSignInForTesting() {
public Account setUpAccountAndEnableSyncForTesting() {
Account account =
mAccountManagerTestRule.addTestAccountThenSigninAndEnableSync(mProfileSyncService);
enableUKM();
......
......@@ -69,7 +69,7 @@ public class TypedUrlsTest {
@Before
public void setUp() throws Exception {
mSyncTestRule.setUpAccountAndSignInForTesting();
mSyncTestRule.setUpAccountAndEnableSyncForTesting();
// Make sure the initial state is clean.
assertClientTypedUrlCount(0);
assertServerTypedUrlCountWithName(0, URL);
......
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