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

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

Issue 2148293004: [Sync] //components/sync external changes [DO NOT SUBMIT] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sc-1
Patch Set: Rebase. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.signin; 5 package org.chromium.chrome.browser.signin;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.app.DialogFragment; 8 import android.app.DialogFragment;
9 import android.app.Fragment; 9 import android.app.Fragment;
10 import android.app.Instrumentation.ActivityMonitor; 10 import android.app.Instrumentation.ActivityMonitor;
(...skipping 10 matching lines...) Expand all
21 import org.chromium.chrome.browser.preferences.MainPreferences; 21 import org.chromium.chrome.browser.preferences.MainPreferences;
22 import org.chromium.chrome.browser.preferences.PrefServiceBridge; 22 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
23 import org.chromium.chrome.browser.preferences.Preferences; 23 import org.chromium.chrome.browser.preferences.Preferences;
24 import org.chromium.chrome.browser.preferences.SignInPreference; 24 import org.chromium.chrome.browser.preferences.SignInPreference;
25 import org.chromium.chrome.browser.profiles.Profile; 25 import org.chromium.chrome.browser.profiles.Profile;
26 import org.chromium.chrome.browser.sync.ProfileSyncService; 26 import org.chromium.chrome.browser.sync.ProfileSyncService;
27 import org.chromium.chrome.test.ChromeTabbedActivityTestBase; 27 import org.chromium.chrome.test.ChromeTabbedActivityTestBase;
28 import org.chromium.chrome.test.util.ActivityUtils; 28 import org.chromium.chrome.test.util.ActivityUtils;
29 import org.chromium.chrome.test.util.browser.signin.SigninTestUtil; 29 import org.chromium.chrome.test.util.browser.signin.SigninTestUtil;
30 import org.chromium.components.bookmarks.BookmarkId; 30 import org.chromium.components.bookmarks.BookmarkId;
31 import org.chromium.components.sync.signin.ChromeSigninController;
32 import org.chromium.components.sync.test.util.MockAccountManager;
31 import org.chromium.content.browser.test.util.TestTouchUtils; 33 import org.chromium.content.browser.test.util.TestTouchUtils;
32 import org.chromium.sync.signin.ChromeSigninController;
33 import org.chromium.sync.test.util.MockAccountManager;
34 34
35 /** 35 /**
36 * Test suite for sign in tests. 36 * Test suite for sign in tests.
37 * 37 *
38 * These tests cover the sign in flow for both consumer and managed accounts. Th ey also verify 38 * These tests cover the sign in flow for both consumer and managed accounts. Th ey also verify
39 * the state of the browser while signed in, and any changes when signing out. 39 * the state of the browser while signed in, and any changes when signing out.
40 * 40 *
41 * The accounts used to sign in are mocked by a MockAccountManager. 41 * The accounts used to sign in are mocked by a MockAccountManager.
42 */ 42 */
43 public class SigninTest extends ChromeTabbedActivityTestBase { 43 public class SigninTest extends ChromeTabbedActivityTestBase {
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 getInstrumentation().waitForIdleSync(); 437 getInstrumentation().waitForIdleSync();
438 DialogFragment fragment = ActivityUtils.waitForFragment(activity, tag); 438 DialogFragment fragment = ActivityUtils.waitForFragment(activity, tag);
439 AlertDialog dialog = (AlertDialog) fragment.getDialog(); 439 AlertDialog dialog = (AlertDialog) fragment.getDialog();
440 assertTrue(dialog != null); 440 assertTrue(dialog != null);
441 assertTrue(dialog.isShowing()); 441 assertTrue(dialog.isShowing());
442 Button button = dialog.getButton(DialogInterface.BUTTON_POSITIVE); 442 Button button = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
443 assertNotNull("Could not find the accept button.", button); 443 assertNotNull("Could not find the accept button.", button);
444 TestTouchUtils.performClickOnMainSync(getInstrumentation(), button); 444 TestTouchUtils.performClickOnMainSync(getInstrumentation(), button);
445 } 445 }
446 } 446 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698