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

Issue 2894073002: Prevent real IME from interfering with UrlBarTest (Closed)

Created:
3 years, 7 months ago by Changwan Ryu
Modified:
3 years, 7 months ago
Reviewers:
Ted C
CC:
chromium-reviews, jdonnelly+watch_chromium.org, jam, darin-cc_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent real IME from interfering with UrlBarTest Android framework does not provide an easy way to remove keyboard app from the testing (unless you use Robolectric). So far we have been allowing the current keyboard app to interfere with test and thus flaked test results. Especially, when you make selection change, Google Latin Keyboard tries to look at the new status by running beginBatchEdit() -> getTextBeforeCursor() -> endBatchEdit(). And this disrupted batch edit logic such as mInBatchEditMode. With this change, onCreateInputConnection() will now return null, so keyboard app cannot interact with the text. Also, dispatchKeyEvent will ignore key events when it has to. Note that the test can still interact with BaseInputConnection's method and thus affects EditText's Editable through UrlBar#getInputConnection(). In doing so, I've guarded KeyUtils#dispatchKeyEventToView() to work with UI thread. BUG=723901 Review-Url: https://codereview.chromium.org/2894073002 Cr-Commit-Position: refs/heads/master@{#473782} Committed: https://chromium.googlesource.com/chromium/src/+/bae36d8062ad39d994cdf27a99418ec3fbe5aa13

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -19 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteEditText.java View 4 chunks +15 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/UrlBarTest.java View 17 chunks +60 lines, -18 lines 0 comments Download
M content/public/test/android/javatests/src/org/chromium/content/browser/test/util/KeyUtils.java View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (8 generated)
Changwan Ryu
3 years, 7 months ago (2017-05-18 22:15:56 UTC) #3
Ted C
lgtm
3 years, 7 months ago (2017-05-23 00:04:49 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2894073002/1
3 years, 7 months ago (2017-05-23 00:08:15 UTC) #9
commit-bot: I haz the power
3 years, 7 months ago (2017-05-23 02:00:57 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/bae36d8062ad39d994cdf27a9941...

Powered by Google App Engine
This is Rietveld 408576698