OLD | NEW |
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.test.util; | 5 package org.chromium.chrome.test.util; |
6 | 6 |
7 import android.accounts.Account; | 7 import android.accounts.Account; |
8 import android.accounts.AccountManager; | 8 import android.accounts.AccountManager; |
9 import android.accounts.AccountManagerCallback; | 9 import android.accounts.AccountManagerCallback; |
10 import android.accounts.AccountManagerFuture; | 10 import android.accounts.AccountManagerFuture; |
11 import android.accounts.AuthenticatorException; | 11 import android.accounts.AuthenticatorException; |
12 import android.accounts.OperationCanceledException; | 12 import android.accounts.OperationCanceledException; |
13 import android.app.Instrumentation; | 13 import android.app.Instrumentation; |
14 import android.content.Context; | 14 import android.content.Context; |
15 import android.os.Bundle; | 15 import android.os.Bundle; |
16 import android.text.TextUtils; | 16 import android.text.TextUtils; |
17 | 17 |
18 import org.chromium.sync.signin.ChromeSigninController; | 18 import org.chromium.components.sync.signin.ChromeSigninController; |
19 import org.chromium.sync.test.util.AccountHolder; | 19 import org.chromium.components.sync.test.util.AccountHolder; |
20 import org.chromium.sync.test.util.MockAccountManager; | 20 import org.chromium.components.sync.test.util.MockAccountManager; |
21 | 21 |
22 import java.io.IOException; | 22 import java.io.IOException; |
23 | 23 |
24 /** | 24 /** |
25 * A tool used for running tests as signed in. | 25 * A tool used for running tests as signed in. |
26 */ | 26 */ |
27 public class ChromeSigninUtils { | 27 public class ChromeSigninUtils { |
28 /** Bundle tags */ | 28 /** Bundle tags */ |
29 private static final String USERNAME = "username"; | 29 private static final String USERNAME = "username"; |
30 private static final String PASSWORD = "password"; | 30 private static final String PASSWORD = "password"; |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 */ | 224 */ |
225 private Bundle buildExceptionBundle(Exception e) { | 225 private Bundle buildExceptionBundle(Exception e) { |
226 Bundle bundle = new Bundle(); | 226 Bundle bundle = new Bundle(); |
227 bundle.putInt(AccountManager.KEY_ERROR_CODE, | 227 bundle.putInt(AccountManager.KEY_ERROR_CODE, |
228 AccountManager.ERROR_CODE_INVALID_RESPONSE); | 228 AccountManager.ERROR_CODE_INVALID_RESPONSE); |
229 bundle.putString(AccountManager.KEY_ERROR_MESSAGE, e.toString()); | 229 bundle.putString(AccountManager.KEY_ERROR_MESSAGE, e.toString()); |
230 return bundle; | 230 return bundle; |
231 } | 231 } |
232 } | 232 } |
233 } | 233 } |
OLD | NEW |