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

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

Issue 2874783004: Remove selected text when committing empty text (Closed)
Patch Set: Created 3 years, 7 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/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 edf7101d03a303cd8b575a15d08d6ac4c4517249..17a29d47ffa88dc2470be9a66bd1b68354f3a22c 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
@@ -340,6 +340,12 @@ public class ImeTest {
// Without previous composition.
mRule.commitText("", -1);
mRule.waitAndVerifyUpdateSelection(4, 2, 2, -1, -1);
+
+ // Although it is not documented in the spec, commitText() also removes existing selection.
+ mRule.setSelection(2, 5);
+ mRule.commitText("", 1);
+ mRule.waitAndVerifyUpdateSelection(5, 2, 5, -1, -1);
+ mRule.waitAndVerifyUpdateSelection(6, 2, 2, -1, -1);
}
@Test
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/Editor.cpp » ('j') | third_party/WebKit/Source/core/editing/Editor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698