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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreInputConnectionTest.java

Issue 1362603002: Straighten up keyboard hide and show logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added a TODO and fixed test Created 5 years, 1 month 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: content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreInputConnectionTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreInputConnectionTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreInputConnectionTest.java
index 5243610edf36b95bda3179316f7d0eb992c49462..d8d9f312801b587a96ebb550eadcce9be0a1df53 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreInputConnectionTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewCoreInputConnectionTest.java
@@ -12,6 +12,7 @@ import org.chromium.content.browser.input.ImeAdapter;
import org.chromium.content.browser.input.InputMethodManagerWrapper;
import org.chromium.content.browser.test.util.TestInputMethodManagerWrapper;
import org.chromium.content_shell_apk.ContentShellTestBase;
+import org.chromium.ui.base.ime.TextInputType;
/**
* Tests that when InputConnection is recreated, the text is still retained.
@@ -37,7 +38,7 @@ public class ContentViewCoreInputConnectionTest extends ContentShellTestBase {
mContentViewCore = new ContentViewCore(getActivity());
mInputMethodManagerWrapper = new TestInputMethodManagerWrapper(mContentViewCore);
mImeAdapter = new TestImeAdapter(mInputMethodManagerWrapper);
- mImeAdapter.setInputMethodManagerWrapper(new TestInputMethodManagerWrapper(
+ mImeAdapter.setInputMethodManagerWrapperForTest(new TestInputMethodManagerWrapper(
mContentViewCore));
mContentViewCore.setImeAdapterForTest(mImeAdapter);
mContentViewCore.createContentViewAndroidDelegate();
@@ -53,6 +54,7 @@ public class ContentViewCoreInputConnectionTest extends ContentShellTestBase {
public void testRecreateInputConnection() throws Exception {
EditorInfo info = new EditorInfo();
+ mImeAdapter.setInputTypeForTest(TextInputType.TEXT);
mContentViewCore.onCreateInputConnection(info);
AdapterInputConnection adapter = mContentViewCore.getAdapterInputConnectionForTest();
adapter.updateState("Is this text restored?", 0, 0, 0, 0, true);

Powered by Google App Engine
This is Rietveld 408576698