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() {} |