OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.preferences; | 5 package org.chromium.chrome.browser.preferences; |
6 | 6 |
7 import android.accounts.Account; | 7 import android.accounts.Account; |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.app.Instrumentation; | 9 import android.app.Instrumentation; |
10 import android.content.Context; | 10 import android.content.Context; |
11 import android.content.Intent; | 11 import android.content.Intent; |
12 import android.test.suitebuilder.annotation.SmallTest; | 12 import android.test.suitebuilder.annotation.SmallTest; |
13 | 13 |
14 import org.chromium.base.ThreadUtils; | 14 import org.chromium.base.ThreadUtils; |
15 import org.chromium.base.test.util.CommandLineFlags; | 15 import org.chromium.base.test.util.CommandLineFlags; |
16 import org.chromium.base.test.util.Feature; | 16 import org.chromium.base.test.util.Feature; |
17 import org.chromium.chrome.browser.preferences.password.SavePasswordsPreferences
; | 17 import org.chromium.chrome.browser.preferences.password.SavePasswordsPreferences
; |
18 import org.chromium.chrome.browser.sync.ProfileSyncService; | 18 import org.chromium.chrome.browser.sync.ProfileSyncService; |
| 19 import org.chromium.components.sync.AndroidSyncSettings; |
| 20 import org.chromium.components.sync.signin.AccountManagerHelper; |
| 21 import org.chromium.components.sync.test.util.AccountHolder; |
| 22 import org.chromium.components.sync.test.util.MockAccountManager; |
| 23 import org.chromium.components.sync.test.util.MockSyncContentResolverDelegate; |
19 import org.chromium.content.browser.test.NativeLibraryTestBase; | 24 import org.chromium.content.browser.test.NativeLibraryTestBase; |
20 import org.chromium.sync.AndroidSyncSettings; | |
21 import org.chromium.sync.signin.AccountManagerHelper; | |
22 import org.chromium.sync.test.util.AccountHolder; | |
23 import org.chromium.sync.test.util.MockAccountManager; | |
24 import org.chromium.sync.test.util.MockSyncContentResolverDelegate; | |
25 | 25 |
26 /** | 26 /** |
27 * Tests for verifying whether users are presented with the correct option of vi
ewing | 27 * Tests for verifying whether users are presented with the correct option of vi
ewing |
28 * passwords according to the user group they belong to (syncing with sync passp
hrase, | 28 * passwords according to the user group they belong to (syncing with sync passp
hrase, |
29 * syncing without sync passsphrase, non-syncing). | 29 * syncing without sync passsphrase, non-syncing). |
30 */ | 30 */ |
31 | 31 |
32 public class PasswordViewingTypeTest extends NativeLibraryTestBase { | 32 public class PasswordViewingTypeTest extends NativeLibraryTestBase { |
33 | 33 |
34 private MainPreferences mMainPreferences; | 34 private MainPreferences mMainPreferences; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 * Verifies that non-syncing users are allowed to natively view passwords. | 156 * Verifies that non-syncing users are allowed to natively view passwords. |
157 */ | 157 */ |
158 @SmallTest | 158 @SmallTest |
159 public void testNonSyncingNativePasswordView() throws InterruptedException { | 159 public void testNonSyncingNativePasswordView() throws InterruptedException { |
160 setSyncability(false); | 160 setSyncability(false); |
161 assertEquals(SavePasswordsPreferences.class.getCanonicalName(), | 161 assertEquals(SavePasswordsPreferences.class.getCanonicalName(), |
162 mPasswordsPref.getFragment()); | 162 mPasswordsPref.getFragment()); |
163 } | 163 } |
164 | 164 |
165 } | 165 } |
OLD | NEW |