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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditorTest.java

Issue 2067323004: Allow copying and viewing account credentials in PasswordEntryEditor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments 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 side-by-side diff with in-line comments
Download patch
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..d81bac4e5b1a0a5dcb609c7f990a111a29d1cf9c
--- /dev/null
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/preferences/password/PasswordEntryEditorTest.java
@@ -0,0 +1,38 @@
+// 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());
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698