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

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

Issue 2883073002: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/Editor.cpp » ('j') | 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 61b64b00ee4f73c58fb2ad2b9f9abba121c05260..99b1a89629204a99c2168c577e83ead21c322834 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
@@ -420,6 +420,12 @@ public class ImeTest extends ContentShellTestBase {
// Without previous composition.
commitText("", -1);
waitAndVerifyUpdateSelection(4, 2, 2, -1, -1);
+
+ // Although it is not documented in the spec, commitText() also removes existing selection.
+ setSelection(2, 5);
+ commitText("", 1);
+ waitAndVerifyUpdateSelection(5, 2, 5, -1, -1);
+ waitAndVerifyUpdateSelection(6, 2, 2, -1, -1);
}
@SmallTest
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698