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

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

Issue 445363009: Fix out-of-bounds exception in SetComposingRegion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
index db2abf86ee4fe044c4558596138af2ace2898236..d597e381117879393c52a0ec1c0275479c66bff8 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
@@ -454,6 +454,21 @@ public class ImeTest extends ContentShellTestBase {
@SmallTest
@Feature({"TextInput", "Main"})
+ public void testSetComposingRegionOutOfBounds() throws Throwable {
+ DOMUtils.focusNode(mContentViewCore, "textarea");
+ assertWaitForKeyboardStatus(true);
+
+ mConnection = (TestAdapterInputConnection) getAdapterInputConnection();
+ waitAndVerifyEditableCallback(mConnection.mImeUpdateQueue, 0, "", 0, 0, -1, -1);
+ setComposingText(mConnection, "hello", 1);
+
+ setComposingRegion(mConnection, 0, 0);
+ setComposingRegion(mConnection, 0, 9);
+ setComposingRegion(mConnection, 9, 0);
jdduke (slow) 2014/08/07 20:07:31 Nice, I assume this fails without your fix?
bcwhite 2014/08/07 20:10:20 It does, yes.
+ }
+
+ @SmallTest
+ @Feature({"TextInput", "Main"})
public void testEnterKeyEventWhileComposingText() throws Throwable {
DOMUtils.focusNode(mContentViewCore, "input_radio");
assertWaitForKeyboardStatus(false);
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698