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.browser.sync.ui; | 5 package org.chromium.chrome.browser.sync.ui; |
6 | 6 |
7 import android.test.suitebuilder.annotation.SmallTest; | 7 import android.test.suitebuilder.annotation.SmallTest; |
8 import android.widget.CheckedTextView; | 8 import android.widget.CheckedTextView; |
9 import android.widget.ListView; | 9 import android.widget.ListView; |
10 | 10 |
11 import org.chromium.base.test.util.Feature; | 11 import org.chromium.base.test.util.Feature; |
12 import org.chromium.base.test.util.FlakyTest; | 12 import org.chromium.base.test.util.FlakyTest; |
13 import org.chromium.chrome.R; | 13 import org.chromium.chrome.R; |
14 import org.chromium.chrome.browser.sync.SyncTestBase; | 14 import org.chromium.chrome.browser.sync.SyncTestBase; |
15 import org.chromium.sync.PassphraseType; | 15 import org.chromium.components.sync.PassphraseType; |
16 | 16 |
17 /** | 17 /** |
18 * Tests to make sure that PassphraseTypeDialogFragment presents the correct opt
ions. | 18 * Tests to make sure that PassphraseTypeDialogFragment presents the correct opt
ions. |
19 */ | 19 */ |
20 public class PassphraseTypeDialogFragmentTest extends SyncTestBase { | 20 public class PassphraseTypeDialogFragmentTest extends SyncTestBase { |
21 private static final String TAG = "PassphraseTypeDialogFragmentTest"; | 21 private static final String TAG = "PassphraseTypeDialogFragmentTest"; |
22 | 22 |
23 private static final boolean ENABLED = true; | 23 private static final boolean ENABLED = true; |
24 private static final boolean DISABLED = false; | 24 private static final boolean DISABLED = false; |
25 private static final boolean CHECKED = true; | 25 private static final boolean CHECKED = true; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 TypeOptions options = optionsList[i]; | 112 TypeOptions options = optionsList[i]; |
113 assertEquals("Option " + i + " type is wrong.", options.type, adapte
r.getType(i)); | 113 assertEquals("Option " + i + " type is wrong.", options.type, adapte
r.getType(i)); |
114 CheckedTextView checkedView = (CheckedTextView) listView.getChildAt(
i); | 114 CheckedTextView checkedView = (CheckedTextView) listView.getChildAt(
i); |
115 assertEquals("Option " + i + " enabled state is wrong.", | 115 assertEquals("Option " + i + " enabled state is wrong.", |
116 options.isEnabled, checkedView.isEnabled()); | 116 options.isEnabled, checkedView.isEnabled()); |
117 assertEquals("Option " + i + " checked state is wrong.", | 117 assertEquals("Option " + i + " checked state is wrong.", |
118 options.isChecked, checkedView.isChecked()); | 118 options.isChecked, checkedView.isChecked()); |
119 } | 119 } |
120 } | 120 } |
121 } | 121 } |
OLD | NEW |