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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 12 matching lines...) Expand all
23 import org.chromium.chrome.browser.preferences.PrefServiceBridge; 23 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
24 import org.chromium.chrome.browser.preferences.Preferences; 24 import org.chromium.chrome.browser.preferences.Preferences;
25 import org.chromium.chrome.browser.preferences.SignInPreference; 25 import org.chromium.chrome.browser.preferences.SignInPreference;
26 import org.chromium.chrome.browser.profiles.Profile; 26 import org.chromium.chrome.browser.profiles.Profile;
27 import org.chromium.chrome.browser.sync.ProfileSyncService; 27 import org.chromium.chrome.browser.sync.ProfileSyncService;
28 import org.chromium.chrome.test.ChromeTabbedActivityTestBase; 28 import org.chromium.chrome.test.ChromeTabbedActivityTestBase;
29 import org.chromium.chrome.test.util.ActivityUtils; 29 import org.chromium.chrome.test.util.ActivityUtils;
30 import org.chromium.chrome.test.util.ChromeRestriction; 30 import org.chromium.chrome.test.util.ChromeRestriction;
31 import org.chromium.chrome.test.util.browser.signin.SigninTestUtil; 31 import org.chromium.chrome.test.util.browser.signin.SigninTestUtil;
32 import org.chromium.components.bookmarks.BookmarkId; 32 import org.chromium.components.bookmarks.BookmarkId;
33 import org.chromium.components.sync.signin.ChromeSigninController;
34 import org.chromium.components.sync.test.util.MockAccountManager;
33 import org.chromium.content.browser.test.util.TestTouchUtils; 35 import org.chromium.content.browser.test.util.TestTouchUtils;
34 import org.chromium.sync.signin.ChromeSigninController;
35 import org.chromium.sync.test.util.MockAccountManager;
36 36
37 /** 37 /**
38 * Test suite for sign in tests. 38 * Test suite for sign in tests.
39 * 39 *
40 * These tests cover the sign in flow for both consumer and managed accounts. Th ey also verify 40 * These tests cover the sign in flow for both consumer and managed accounts. Th ey also verify
41 * the state of the browser while signed in, and any changes when signing out. 41 * the state of the browser while signed in, and any changes when signing out.
42 * 42 *
43 * The accounts used to sign in are mocked by a MockAccountManager. 43 * The accounts used to sign in are mocked by a MockAccountManager.
44 */ 44 */
45 public class SigninTest extends ChromeTabbedActivityTestBase { 45 public class SigninTest extends ChromeTabbedActivityTestBase {
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 getInstrumentation().waitForIdleSync(); 440 getInstrumentation().waitForIdleSync();
441 DialogFragment fragment = ActivityUtils.waitForFragment(activity, tag); 441 DialogFragment fragment = ActivityUtils.waitForFragment(activity, tag);
442 AlertDialog dialog = (AlertDialog) fragment.getDialog(); 442 AlertDialog dialog = (AlertDialog) fragment.getDialog();
443 assertTrue(dialog != null); 443 assertTrue(dialog != null);
444 assertTrue(dialog.isShowing()); 444 assertTrue(dialog.isShowing());
445 Button button = dialog.getButton(DialogInterface.BUTTON_POSITIVE); 445 Button button = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
446 assertNotNull("Could not find the accept button.", button); 446 assertNotNull("Could not find the accept button.", button);
447 TestTouchUtils.performClickOnMainSync(getInstrumentation(), button); 447 TestTouchUtils.performClickOnMainSync(getInstrumentation(), button);
448 } 448 }
449 } 449 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698