Chromium Code Reviews| Index: chrome/android/junit/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditorTest.java |
| diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditorTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditorTest.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..811f066e553a3e8a1976216edf4b2c737b1118fe |
| --- /dev/null |
| +++ b/chrome/android/junit/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditorTest.java |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.chrome.browser.preferences.password; |
| + |
| +import static org.junit.Assert.assertNotNull; |
| + |
| +import android.app.Activity; |
| +import android.app.FragmentManager; |
| +import android.app.FragmentTransaction; |
| + |
| +import org.chromium.testing.local.LocalRobolectricTestRunner; |
| + |
| +import org.junit.Test; |
| + |
| +import org.junit.runner.RunWith; |
| + |
| +import org.robolectric.Robolectric; |
| + |
| +/** |
| + * Tests for the "Save Passwords" settings screen. |
| + */ |
| +@RunWith(LocalRobolectricTestRunner.class) |
| +public class PasswordEntryEditorTest{ |
| + |
| + @Test |
| + public void testView() { |
| + Activity mTestActivity = Robolectric.setupActivity(Activity.class); |
| + PasswordEntryEditor sMockPasswordEntryEditor = new PasswordEntryEditor(); |
| + FragmentManager fragmentManager = mTestActivity.getFragmentManager(); |
| + FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); |
| + fragmentTransaction.add(sMockPasswordEntryEditor, null); |
| + fragmentTransaction.commit(); |
| + fragmentManager.executePendingTransactions(); |
| + assertNotNull(sMockPasswordEntryEditor.getView()); |
| + |
|
Bernhard Bauer
2016/08/18 18:57:05
No empty line right before the end of the method.
dozsa
2016/08/19 08:36:07
Done.
|
| + } |
| +} |