| 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 75809c5eed25af2fe6f5d46f93d4f5d330b78796..142f77771d73bfb4c75fefb3e3c7c7c7d5ed877a 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 | 
| @@ -136,19 +136,49 @@ public class ImeTest extends ContentShellTestBase { | 
|  | 
| @SmallTest | 
| @Feature({"TextInput", "Main"}) | 
| -    public void testDeleteSurroundingTextWithZeroValue() throws Throwable { | 
| +    public void testDeleteSurroundingTextWithRangeSelection() throws Throwable { | 
| commitText("hello", 1); | 
| waitAndVerifyUpdateSelection(0, 5, 5, -1, -1); | 
| -        deleteSurroundingText(0, 0); | 
|  | 
| -        setSelection(0, 0); | 
| -        waitAndVerifyUpdateSelection(1, 0, 0, -1, -1); | 
| +        setSelection(1, 4); | 
| +        waitAndVerifyUpdateSelection(1, 1, 4, -1, -1); | 
| + | 
| deleteSurroundingText(0, 0); | 
| +        assertTextsAroundCursor("h", "ell", "o"); | 
| + | 
| +        deleteSurroundingText(1, 1); | 
| +        assertTextsAroundCursor("", "ell", ""); | 
| + | 
| +        deleteSurroundingText(1, 0); | 
| +        assertTextsAroundCursor("", "ell", ""); | 
| + | 
| +        deleteSurroundingText(0, 1); | 
| +        assertTextsAroundCursor("", "ell", ""); | 
| +    } | 
| + | 
| +    @SmallTest | 
| +    @Feature({"TextInput", "Main"}) | 
| +    public void testDeleteSurroundingTextWithCursorSelection() throws Throwable { | 
| +        commitText("hello", 1); | 
| +        waitAndVerifyUpdateSelection(0, 5, 5, -1, -1); | 
|  | 
| setSelection(2, 2); | 
| -        waitAndVerifyUpdateSelection(2, 2, 2, -1, -1); | 
| +        waitAndVerifyUpdateSelection(1, 2, 2, -1, -1); | 
| + | 
| deleteSurroundingText(0, 0); | 
| assertTextsAroundCursor("he", "", "llo"); | 
| + | 
| +        deleteSurroundingText(1, 1); | 
| +        assertTextsAroundCursor("h", "", "lo"); | 
| + | 
| +        deleteSurroundingText(10, 0); | 
| +        assertTextsAroundCursor("", "", "lo"); | 
| + | 
| +        deleteSurroundingText(0, 10); | 
| +        assertTextsAroundCursor("", "", ""); | 
| + | 
| +        deleteSurroundingText(10, 10); | 
| +        assertTextsAroundCursor("", "", ""); | 
| } | 
|  | 
| @SmallTest | 
|  |