Chromium Code Reviews| 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 29 matching lines...) Expand all Loading... | |
| 40 import java.util.concurrent.TimeoutException; | 40 import java.util.concurrent.TimeoutException; |
| 41 | 41 |
| 42 /** | 42 /** |
| 43 * Integration tests for text input using cases based on fixed regressions. | 43 * Integration tests for text input using cases based on fixed regressions. |
| 44 */ | 44 */ |
| 45 public class ImeTest extends ContentShellTestBase { | 45 public class ImeTest extends ContentShellTestBase { |
| 46 private static final String DATA_URL = UrlUtils.encodeHtmlDataUri( | 46 private static final String DATA_URL = UrlUtils.encodeHtmlDataUri( |
| 47 "<html><head><meta name=\"viewport\"" | 47 "<html><head><meta name=\"viewport\"" |
| 48 + "content=\"width=device-width, initial-scale=2.0, maximum-scale=2. 0\" /></head>" | 48 + "content=\"width=device-width, initial-scale=2.0, maximum-scale=2. 0\" /></head>" |
| 49 + "<body><form action=\"about:blank\">" | 49 + "<body><form action=\"about:blank\">" |
| 50 + "<br/><p><span id=\"plain_text\">This is Plain Text One</span></p> " | |
|
ymalik
2015/11/05 00:49:08
@aelias
Making scroll properties relative to the l
aelias_OOO_until_Jul13
2015/11/05 01:08:29
Would it work to remove the "initial-scale=2.0, ma
ymalik
2015/11/05 02:12:06
Yes that works as well. Do you prefer that? I assu
| |
| 50 + "<input id=\"input_text\" type=\"text\" /><br/></form><form>" | 51 + "<input id=\"input_text\" type=\"text\" /><br/></form><form>" |
| 51 + "<input id=\"input_radio\" type=\"radio\" style=\"width:50px;heigh t:50px\" />" | 52 + "<input id=\"input_radio\" type=\"radio\" style=\"width:50px;heigh t:50px\" />" |
| 52 + "<br/><textarea id=\"textarea\" rows=\"4\" cols=\"20\"></textarea> " | 53 + "<br/><textarea id=\"textarea\" rows=\"4\" cols=\"20\"></textarea> " |
| 53 + "<br/><textarea id=\"textarea2\" rows=\"4\" cols=\"20\" autocomple te=\"off\">" | 54 + "<br/><textarea id=\"textarea2\" rows=\"4\" cols=\"20\" autocomple te=\"off\">" |
| 54 + "</textarea>" | 55 + "</textarea>" |
| 55 + "<br/><input id=\"input_number1\" type=\"number\" /><br/>" | 56 + "<br/><input id=\"input_number1\" type=\"number\" /><br/>" |
| 56 + "<br/><input id=\"input_number2\" type=\"number\" /><br/>" | 57 + "<br/><input id=\"input_number2\" type=\"number\" /><br/>" |
| 57 + "<br/><p><span id=\"plain_text\">This is Plain Text One</span></p> " | |
| 58 + "</form></body></html>"); | 58 + "</form></body></html>"); |
| 59 | 59 |
| 60 private TestAdapterInputConnection mConnection; | 60 private TestAdapterInputConnection mConnection; |
| 61 private TestAdapterInputConnectionFactory mConnectionFactory; | 61 private TestAdapterInputConnectionFactory mConnectionFactory; |
| 62 private ImeAdapter mImeAdapter; | 62 private ImeAdapter mImeAdapter; |
| 63 | 63 |
| 64 private ContentViewCore mContentViewCore; | 64 private ContentViewCore mContentViewCore; |
| 65 private WebContents mWebContents; | 65 private WebContents mWebContents; |
| 66 private TestCallbackHelperContainer mCallbackContainer; | 66 private TestCallbackHelperContainer mCallbackContainer; |
| 67 private TestInputMethodManagerWrapper mInputMethodManagerWrapper; | 67 private TestInputMethodManagerWrapper mInputMethodManagerWrapper; |
| (...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1265 public void assertEqualState(String text, int selectionStart, int select ionEnd, | 1265 public void assertEqualState(String text, int selectionStart, int select ionEnd, |
| 1266 int compositionStart, int compositionEnd) { | 1266 int compositionStart, int compositionEnd) { |
| 1267 assertEquals("Text did not match", text, mText); | 1267 assertEquals("Text did not match", text, mText); |
| 1268 assertEquals("Selection start did not match", selectionStart, mSelec tionStart); | 1268 assertEquals("Selection start did not match", selectionStart, mSelec tionStart); |
| 1269 assertEquals("Selection end did not match", selectionEnd, mSelection End); | 1269 assertEquals("Selection end did not match", selectionEnd, mSelection End); |
| 1270 assertEquals("Composition start did not match", compositionStart, mC ompositionStart); | 1270 assertEquals("Composition start did not match", compositionStart, mC ompositionStart); |
| 1271 assertEquals("Composition end did not match", compositionEnd, mCompo sitionEnd); | 1271 assertEquals("Composition end did not match", compositionEnd, mCompo sitionEnd); |
| 1272 } | 1272 } |
| 1273 } | 1273 } |
| 1274 } | 1274 } |
| OLD | NEW |