Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3425)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninTest.java

Issue 2014833002: Show dialogs for syncing to managed accounts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace getContext with getActivity in AccountManagementFragment. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java_sources.gni ('k') | chrome/browser/android/signin/signin_manager_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninTest.java
index 9486de84ee03064788093d6dc5c452dd20198f34..4d9a5333debceb3c702d5c7d01e774b44d03d911 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninTest.java
@@ -4,7 +4,6 @@
package org.chromium.chrome.browser.signin;
-import android.accounts.Account;
import android.app.Activity;
import android.app.DialogFragment;
import android.app.Fragment;
@@ -286,11 +285,8 @@ public class SigninTest extends ChromeTabbedActivityTestBase {
@MediumTest
public void testConsumerSignin() throws InterruptedException {
- Account testAccount = SigninTestUtil.addTestAccount();
-
- // Sign in to that account.
- boolean isManaged = false;
- signInToSingleAccount(testAccount.name, isManaged);
+ SigninTestUtil.addTestAccount();
+ signInToSingleAccount();
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
@@ -328,8 +324,7 @@ public class SigninTest extends ChromeTabbedActivityTestBase {
});
}
- private void signInToSingleAccount(String accountName, boolean isManaged)
- throws InterruptedException {
+ private void signInToSingleAccount() {
// Verify that we aren't signed in yet.
assertFalse(ChromeSigninController.get(mContext).isSignedIn());
@@ -355,15 +350,10 @@ public class SigninTest extends ChromeTabbedActivityTestBase {
Button positiveButton = (Button) signinActivity.findViewById(R.id.positive_button);
// Press 'sign in'.
TestTouchUtils.performClickOnMainSync(getInstrumentation(), positiveButton);
+ getInstrumentation().waitForIdleSync();
// Press 'ok, got it' (the same button is reused).
TestTouchUtils.performClickOnMainSync(getInstrumentation(), positiveButton);
- if (isManaged) {
- // If the account is managed then there is going to be a second dialog.
- assertFalse(ChromeSigninController.get(mContext).isSignedIn());
- acceptAlertDialogWithTag(prefActivity, SigninManager.CONFIRM_MANAGED_SIGNIN_DIALOG_TAG);
- }
-
// Sync doesn't actually start up until we finish the sync setup. This usually happens
// in the resume of the Main activity, but we forcefully do this here.
getInstrumentation().waitForIdleSync();
« no previous file with comments | « chrome/android/java_sources.gni ('k') | chrome/browser/android/signin/signin_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698