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

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

Issue 834293002: Fix problem with accents caused by race condition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 dispatchKeyEvent( 623 dispatchKeyEvent(
624 mConnection, new KeyEvent( 624 mConnection, new KeyEvent(
625 0, 0, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_I, 0, KeyEv ent.META_ALT_ON)); 625 0, 0, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_I, 0, KeyEv ent.META_ALT_ON));
626 dispatchKeyEvent( 626 dispatchKeyEvent(
627 mConnection, new KeyEvent( 627 mConnection, new KeyEvent(
628 0, 0, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_I, 0, KeyEven t.META_ALT_ON)); 628 0, 0, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_I, 0, KeyEven t.META_ALT_ON));
629 assertEquals("hiˆ", mConnection.getTextBeforeCursor(9, 0)); 629 assertEquals("hiˆ", mConnection.getTextBeforeCursor(9, 0));
630 630
631 // O (accented key) 631 // O (accented key)
632 dispatchKeyEvent(mConnection, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEven t.KEYCODE_O)); 632 dispatchKeyEvent(mConnection, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEven t.KEYCODE_O));
633 assertUpdateStateCall(mConnection, 1000);
aurimas (slooooooooow) 2015/01/06 21:12:39 What is the reason we no longer get this update?
bcwhite 2015/01/06 22:08:30 The update state wasn't being cleared in the test
634 assertEquals("hi", mConnection.getTextBeforeCursor(9, 0)); 633 assertEquals("hi", mConnection.getTextBeforeCursor(9, 0));
635 dispatchKeyEvent(mConnection, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent. KEYCODE_O)); 634 dispatchKeyEvent(mConnection, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent. KEYCODE_O));
636 assertEquals("hiô", mConnection.getTextBeforeCursor(9, 0)); 635 assertEquals("hiô", mConnection.getTextBeforeCursor(9, 0));
637 } 636 }
638 637
639 @SmallTest 638 @SmallTest
640 @Feature({"TextInput", "Main"}) 639 @Feature({"TextInput", "Main"})
641 public void testSetComposingRegionOutOfBounds() throws Throwable { 640 public void testSetComposingRegionOutOfBounds() throws Throwable {
642 DOMUtils.focusNode(mWebContents, "textarea"); 641 DOMUtils.focusNode(mWebContents, "textarea");
643 assertWaitForKeyboardStatus(true); 642 assertWaitForKeyboardStatus(true);
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 public void assertEqualState(String text, int selectionStart, int select ionEnd, 1010 public void assertEqualState(String text, int selectionStart, int select ionEnd,
1012 int compositionStart, int compositionEnd) { 1011 int compositionStart, int compositionEnd) {
1013 assertEquals("Text did not match", text, mText); 1012 assertEquals("Text did not match", text, mText);
1014 assertEquals("Selection start did not match", selectionStart, mSelec tionStart); 1013 assertEquals("Selection start did not match", selectionStart, mSelec tionStart);
1015 assertEquals("Selection end did not match", selectionEnd, mSelection End); 1014 assertEquals("Selection end did not match", selectionEnd, mSelection End);
1016 assertEquals("Composition start did not match", compositionStart, mC ompositionStart); 1015 assertEquals("Composition start did not match", compositionStart, mC ompositionStart);
1017 assertEquals("Composition end did not match", compositionEnd, mCompo sitionEnd); 1016 assertEquals("Composition end did not match", compositionEnd, mCompo sitionEnd);
1018 } 1017 }
1019 } 1018 }
1020 } 1019 }
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698