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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnectionFactory.java

Issue 1721613002: Add JUnit tests for ImeThread activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adjusted to robolectric 3.0 Created 4 years, 3 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/android/java/src/org/chromium/content/browser/input/ThreadedInputConnectionFactory.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnectionFactory.java b/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnectionFactory.java
index f81493c3508156b9f4930708f3fe2181b40b8c08..497481bfbbe35db438892c4a0c3e6d5aab69fe63 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnectionFactory.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnectionFactory.java
@@ -203,7 +203,7 @@ public class ThreadedInputConnectionFactory implements ChromiumBaseInputConnecti
if (DEBUG_LOGS) Log.w(TAG, "checkRegisterResult - retry: " + retry);
// Success.
if (mInputMethodManagerWrapper.isActive(mProxyView)) {
- mInputMethodUma.recordProxyViewSuccess();
+ onRegisterProxyViewSuccess();
return;
}
@@ -214,12 +214,18 @@ public class ThreadedInputConnectionFactory implements ChromiumBaseInputConnecti
return;
}
- onRegisterProxyViewFailed();
+ onRegisterProxyViewFailure();
}
@VisibleForTesting
- protected void onRegisterProxyViewFailed() {
- Log.w(TAG, "onRegisterProxyViewFailed");
+ protected void onRegisterProxyViewSuccess() {
+ Log.d(TAG, "onRegisterProxyViewSuccess");
+ mInputMethodUma.recordProxyViewSuccess();
+ }
+
+ @VisibleForTesting
+ protected void onRegisterProxyViewFailure() {
+ Log.w(TAG, "onRegisterProxyViewFailure");
mInputMethodUma.recordProxyViewFailure();
}

Powered by Google App Engine
This is Rietveld 408576698