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

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

Issue 2613863006: Add a ThreadLocal flag to replace the reflection in shouldTriggerDelayedOnCreateInputConnection() (Closed)
Patch Set: fix cast error Created 3 years, 11 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/junit/src/org/chromium/content/browser/input/ThreadedInputConnectionFactoryTest.java
diff --git a/content/public/android/junit/src/org/chromium/content/browser/input/ThreadedInputConnectionFactoryTest.java b/content/public/android/junit/src/org/chromium/content/browser/input/ThreadedInputConnectionFactoryTest.java
index 59436513d1c60229219955b11d38c169519cbaf3..639144d43989c1146e34fd1341ea2f60a5769751 100644
--- a/content/public/android/junit/src/org/chromium/content/browser/input/ThreadedInputConnectionFactoryTest.java
+++ b/content/public/android/junit/src/org/chromium/content/browser/input/ThreadedInputConnectionFactoryTest.java
@@ -153,6 +153,7 @@ public class ThreadedInputConnectionFactoryTest {
new Answer<InputConnection>() {
@Override
public InputConnection answer(InvocationOnMock invocation) throws Throwable {
+ mFactory.setTriggerDelayedOnCreateInputConnection(false);
return ThreadUtils.runOnUiThreadBlockingNoException(callable);
}
});
@@ -200,6 +201,8 @@ public class ThreadedInputConnectionFactoryTest {
@Test
@Feature({"TextInput"})
public void testCreateInputConnection_Success() {
+ mFactory.setTriggerDelayedOnCreateInputConnection(true);
+
// Pause all the loopers.
Robolectric.getForegroundThreadScheduler().pause();
mImeShadowLooper.pause();
@@ -239,6 +242,8 @@ public class ThreadedInputConnectionFactoryTest {
@Test
@Feature({"TextInput"})
public void testCreateInputConnection_Failure() {
+ mFactory.setTriggerDelayedOnCreateInputConnection(true);
+
// Pause all the loopers.
Robolectric.getForegroundThreadScheduler().pause();
mImeShadowLooper.pause();

Powered by Google App Engine
This is Rietveld 408576698