| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.content.browser.input; | 5 package org.chromium.content.browser.input; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.content.ClipData; | 8 import android.content.ClipData; |
| 9 import android.content.ClipboardManager; | 9 import android.content.ClipboardManager; |
| 10 import android.content.Context; | 10 import android.content.Context; |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 focusElementAndWaitForStateUpdate("contenteditable_event"); | 1120 focusElementAndWaitForStateUpdate("contenteditable_event"); |
| 1121 beginBatchEdit(); | 1121 beginBatchEdit(); |
| 1122 setComposingText("a", 1); | 1122 setComposingText("a", 1); |
| 1123 finishComposingText(); | 1123 finishComposingText(); |
| 1124 endBatchEdit(); | 1124 endBatchEdit(); |
| 1125 waitAndVerifyUpdateSelection(0, 1, 1, -1, -1); | 1125 waitAndVerifyUpdateSelection(0, 1, 1, -1, -1); |
| 1126 | 1126 |
| 1127 // TODO(changwan): reduce the number of selection changes | 1127 // TODO(changwan): reduce the number of selection changes |
| 1128 waitForEventLogs("selectionchange,selectionchange,selectionchange," | 1128 waitForEventLogs("selectionchange,selectionchange,selectionchange," |
| 1129 + "keydown(229),compositionstart(),compositionupdate(a),input," | 1129 + "keydown(229),compositionstart(),compositionupdate(a),input," |
| 1130 + "keyup(229),compositionend(a),input,selectionchange,selectionc
hange," | 1130 + "keyup(229),compositionupdate(a),input,compositionend(a),selec
tionchange," |
| 1131 + "selectionchange,selectionchange,selectionchange"); | 1131 + "selectionchange,selectionchange,selectionchange,selectionchan
ge"); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 @MediumTest | 1134 @MediumTest |
| 1135 @Feature({"TextInput"}) | 1135 @Feature({"TextInput"}) |
| 1136 public void testContentEditableEvents_CommitText() throws Throwable { | 1136 public void testContentEditableEvents_CommitText() throws Throwable { |
| 1137 focusElementAndWaitForStateUpdate("contenteditable_event"); | 1137 focusElementAndWaitForStateUpdate("contenteditable_event"); |
| 1138 commitText("a", 1); | 1138 commitText("a", 1); |
| 1139 waitAndVerifyUpdateSelection(0, 1, 1, -1, -1); | 1139 waitAndVerifyUpdateSelection(0, 1, 1, -1, -1); |
| 1140 | 1140 |
| 1141 // TODO(changwan): reduce the number of selection changes | 1141 // TODO(changwan): reduce the number of selection changes |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1542 | 1542 |
| 1543 public void clearTextInputTypeHistory() { | 1543 public void clearTextInputTypeHistory() { |
| 1544 mTextInputTypeList.clear(); | 1544 mTextInputTypeList.clear(); |
| 1545 } | 1545 } |
| 1546 | 1546 |
| 1547 public EditorInfo getOutAttrs() { | 1547 public EditorInfo getOutAttrs() { |
| 1548 return mOutAttrs; | 1548 return mOutAttrs; |
| 1549 } | 1549 } |
| 1550 } | 1550 } |
| 1551 } | 1551 } |
| OLD | NEW |