New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 661572 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: ----
Type: ----



Sign in to add a comment

content_shell_test_apk failing on chromium.android/Lollipop and KitKat Tablet Tester

Project Member Reported by mattcary@chromium.org, Nov 2 2016

Issue description

content_shell_test_apk failing on chromium.android/Lollipop and KitKat Tablet Tester

See, eg, https://uberchromegw.corp.google.com/i/chromium.android/builders/KitKat%20Tablet%20Tester/builds/5914

Is this related to your change crrev.com/2468043002?



 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/903f2f8e038a6639ba0517e602e2613ca9c63ecf

commit 903f2f8e038a6639ba0517e602e2613ca9c63ecf
Author: amaralp <amaralp@chromium.org>
Date: Wed Nov 02 21:27:04 2016

Disabling flaky IME test

My CL removing OnShowingPastePopup (crrev.com/2468043002) probably made this test flakier on tablets ( crbug.com/661572 ).

BUG= 661572 

Review-Url: https://codereview.chromium.org/2474723002
Cr-Commit-Position: refs/heads/master@{#429405}

[modify] https://crrev.com/903f2f8e038a6639ba0517e602e2613ca9c63ecf/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java

Status: Fixed (was: Available)

Comment 3 by yabinh@chromium.org, Dec 28 2016

Cc: yabinh@chromium.org changwan@chromium.org aelias@chromium.org
Status: Assigned (was: Fixed)
Hi amaralp@, do you have any update on this issue?
I was deflakying IME tests and this test seems to be the only one still flaky.
I haven't been working on this issue. As Comment 1 suggests this test was already flaky and became even flakier after I landed crrev.com/2468043002. Have you been able to reproduce the flake recently?
Yeah, it's flaky before crrev.com/2468043002. As a lot of flaky IME tests, it's because the selection was incorrect after calling commitText. Now that bug has been fixed. crrev.com/2468043002 seems to be the only cause to the flakiness.

I just ran the test on Nexus 9. The failure rate was 21/100 with the same detailed logs:

C   13.253s Main  [FAIL] org.chromium.content.browser.input.ImeTest#testPastePopupShowAndHide:
C   13.253s Main  junit.framework.AssertionFailedError: Criteria not met in allotted time.
C   13.253s Main  	at org.chromium.content.browser.test.util.CriteriaHelper.pollInstrumentationThread(CriteriaHelper.java:79)
C   13.253s Main  	at org.chromium.content.browser.test.util.CriteriaHelper.pollUiThread(CriteriaHelper.java:117)
C   13.253s Main  	at org.chromium.content.browser.test.util.CriteriaHelper.pollUiThread(CriteriaHelper.java:138)
C   13.253s Main  	at org.chromium.content.browser.input.ImeTest.testPastePopupShowAndHide(ImeTest.java:1143)
C   13.253s Main  	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:220)
C   13.253s Main  	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:205)
C   13.253s Main  	at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
C   13.254s Main  	at org.chromium.content_shell_apk.ContentShellTestBase.runTest(ContentShellTestBase.java:252)
C   13.254s Main  	at org.chromium.base.test.BaseTestResult.runParameterized(BaseTestResult.java:161)
C   13.254s Main  	at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:124)
C   13.254s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:198)
C   13.254s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:183)
C   13.254s Main  	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:560)
C   13.254s Main  	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1932)

I see.

Do you know how setting the composition clears the paste popup? Is it because it clears the insertion handle (https://cs.chromium.org/chromium/src/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java?rcl=0&l=811) ?
Yeah, that's possible.
I did't look into it deeply, but I found that when the test fails, TouchSelectionController::OnInsertionChanged() is not called.
I think that the problem is that setting the composition is done before the insertion handle is shown. This makes it so that the insertion handle is never cleared and hence the paste popup is never cleared. I'll make a CL fixing this.
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/37c0c94ce99fb212021274dc1a7a895649d4fc64

commit 37c0c94ce99fb212021274dc1a7a895649d4fc64
Author: amaralp <amaralp@chromium.org>
Date: Fri Jan 06 17:51:19 2017

Make ImeTest wait for insertion handle to be shown

The Ime test, testPastePopupShowAndHide, was flaking because of a race condition
where the paste popup menu was shown before the insertion handle was shown. This
is a problem because it allows the scenario:

1) Paste menu shown
2) Set composition
3) Insertion handle is shown

This causes the paste menu to not be hidden since setting the composition only
clears the menu by clearing the insertion handle. This CL makes setting the
composition wait for the insertion handle to be shown to guarantee this sequence:

1) Paste menu and insertion handle shown
2) Set composition
3) Insertion handle cleared
4) Paste menu hidden

BUG= 661572 

Review-Url: https://codereview.chromium.org/2617583003
Cr-Commit-Position: refs/heads/master@{#441971}

[modify] https://crrev.com/37c0c94ce99fb212021274dc1a7a895649d4fc64/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java

Status: Fixed (was: Assigned)
This test is now enabled and no longer flaking.

Sign in to add a comment