| 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.content.Context; | 7 import android.content.Context; |
| 8 import android.os.IBinder; | 8 import android.os.IBinder; |
| 9 import android.os.ResultReceiver; | 9 import android.os.ResultReceiver; |
| 10 import android.test.suitebuilder.annotation.MediumTest; | 10 import android.test.suitebuilder.annotation.MediumTest; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 | 187 |
| 188 private static class TestImeAdapterDelegate implements ImeAdapterDelegate { | 188 private static class TestImeAdapterDelegate implements ImeAdapterDelegate { |
| 189 @Override | 189 @Override |
| 190 public void onImeEvent() {} | 190 public void onImeEvent() {} |
| 191 | 191 |
| 192 @Override | 192 @Override |
| 193 public void onDismissInput() {} | 193 public void onDismissInput() {} |
| 194 | 194 |
| 195 @Override | 195 @Override |
| 196 public void onKeyboardBoundsUnchanged() {} |
| 197 |
| 198 @Override |
| 196 public View getAttachedView() { | 199 public View getAttachedView() { |
| 197 return null; | 200 return null; |
| 198 } | 201 } |
| 199 | 202 |
| 200 @Override | 203 @Override |
| 201 public ResultReceiver getNewShowKeyboardReceiver() { | 204 public ResultReceiver getNewShowKeyboardReceiver() { |
| 202 return null; | 205 return null; |
| 203 } | 206 } |
| 204 } | 207 } |
| 205 | 208 |
| 206 private static void assertCorrectState(String text, int selectionStart, int
selectionEnd, | 209 private static void assertCorrectState(String text, int selectionStart, int
selectionEnd, |
| 207 int compositionStart, int compositionEnd, ImeState actual) { | 210 int compositionStart, int compositionEnd, ImeState actual) { |
| 208 assertEquals("Text did not match", text, actual.text); | 211 assertEquals("Text did not match", text, actual.text); |
| 209 assertEquals("Selection start did not match", selectionStart, actual.sel
ectionStart); | 212 assertEquals("Selection start did not match", selectionStart, actual.sel
ectionStart); |
| 210 assertEquals("Selection end did not match", selectionEnd, actual.selecti
onEnd); | 213 assertEquals("Selection end did not match", selectionEnd, actual.selecti
onEnd); |
| 211 assertEquals("Composition start did not match", compositionStart, actual
.compositionStart); | 214 assertEquals("Composition start did not match", compositionStart, actual
.compositionStart); |
| 212 assertEquals("Composition end did not match", compositionEnd, actual.com
positionEnd); | 215 assertEquals("Composition end did not match", compositionEnd, actual.com
positionEnd); |
| 213 } | 216 } |
| 214 } | 217 } |
| OLD | NEW |