• Ryan Landay's avatar
    Avoid scrolling in ImeTest to attempt to reduce flakiness · 201f97c5
    Ryan Landay authored
    There are two problems with ImeTest that seem to be caused by scrolling (caused
    by calling methods in DOMUtils, such as clickNode(), on various elements):
    
    - Various test cases in ImeTest are intermittently failing in startup
      (crbug.com/781174). I am unable to reproduce the problem or determine what's
      happening. Test output and screenshots taken upon failure seem to indicate
      that focus is somehow getting moved to the <textarea> element in the HTML file
      immediately after the first <input> element, instead of remaining on the
      <input>. I am hopeful that avoiding scrolling resolves this problem. At the
      very least, it will rule out a potential cause of the issue.
    
    - In https://chromium-review.googlesource.com/c/chromium/src/+/740373, I
      attempted to land a change to the HTML file used by ImeTest to support a few
      new tests. The change made the webpage longer so more scrolling happens. In
      particular, a test failure results because single taps on two different
      elements are getting counted as a double tap, because scrolling is bringing
      the second element to the location of the first element (so the taps are now
      in the same location on screen, whereas before they were in different
      locations, and hence the taps weren't eligible to be interpreted as a
      double-tap.
    
      This issue *does* reproduce locally, and I have confirmed that avoiding
      scrolling fixes the issue.
    
    This CL avoids scrolling in ImeTest by making the whole webpage fit on-screen.
    
    Moving the elements closer together seems to make a click in
    testKeyboardAppFinishesCompositionOnUnexpectedSelectionChange() get counted as a
    double-click in some test runs (I had to compile a release build to test this),
    so I'm also adding a call to Thread.sleep() in that test to avoid this problem.
    
    Bug: 781174
    Change-Id: I4982be105846b954e7495fee682fcfe988dd2155
    Reviewed-on: https://chromium-review.googlesource.com/773105Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
    Commit-Queue: Ryan Landay <rlanday@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#517142}
    201f97c5
input_forms.html 4.42 KB