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

Unified Diff: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java

Issue 2839993002: [Android] Adding Smart GO/NEXT feature in Chrome (Closed)
Patch Set: Rebased the patch from TOT Created 3 years, 6 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: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java
diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java
index 932370b989feead40510f248c6295d629cc93063..dfe5e555dc0d67c013562fcbfdf1ad88b5a3a956 100644
--- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java
+++ b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java
@@ -39,6 +39,7 @@ public class TestInputMethodManagerWrapper extends InputMethodManagerWrapper {
private final List<Pair<Range, Range>> mUpdateSelectionList;
private int mUpdateCursorAnchorInfoCounter;
private CursorAnchorInfo mLastCursorAnchorInfo;
+ private final ArrayList<EditorInfo> mEditorInfoList = new ArrayList<>();
public TestInputMethodManagerWrapper(ContentViewCore contentViewCore) {
super(null);
@@ -53,6 +54,7 @@ public class TestInputMethodManagerWrapper extends InputMethodManagerWrapper {
Log.d(TAG, "restartInput: count [%d]", mRestartInputCounter);
EditorInfo editorInfo = new EditorInfo();
mInputConnection = mContentViewCore.onCreateInputConnection(editorInfo);
+ mEditorInfoList.add(editorInfo);
}
@Override
@@ -63,6 +65,7 @@ public class TestInputMethodManagerWrapper extends InputMethodManagerWrapper {
if (mInputConnection != null) return;
EditorInfo editorInfo = new EditorInfo();
mInputConnection = mContentViewCore.onCreateInputConnection(editorInfo);
+ mEditorInfoList.add(editorInfo);
}
@Override
@@ -138,6 +141,7 @@ public class TestInputMethodManagerWrapper extends InputMethodManagerWrapper {
mShowSoftInputCounter = 0;
mHideSoftInputCounter = 0;
mUpdateSelectionList.clear();
+ mEditorInfoList.clear();
}
public InputConnection getInputConnection() {
@@ -168,6 +172,10 @@ public class TestInputMethodManagerWrapper extends InputMethodManagerWrapper {
return mLastCursorAnchorInfo;
}
+ public ArrayList<EditorInfo> getEditorInfoList() {
+ return mEditorInfoList;
+ }
+
public void onUpdateSelection(Range oldSel, Range oldComp, Range newSel, Range newComp) {}
public void expectsSelectionOutsideComposition() {}

Powered by Google App Engine
This is Rietveld 408576698