Commit f0b716f9 authored by Ryan Landay's avatar Ryan Landay Committed by Commit Bot

Attempt to reduce flakiness in TextSuggestionMenuTest#testApplySuggestion()

This test is intermittently failing. Based on the screenshots from the failing
try bots, it appears the issue is that the test is tapping at the beginning of
"hello world" instead of at the end.

I'm unable to reproduce the problem locally, but my best guess as to why this is
happening is that we're not waiting to make sure the text has actually been
committed before attempting to find the bounds of the span element that's
supposed to be after the text, so I'm adding this check (which we also have in
testDeleteWordMarkedWithSpellingMarker()).

Bug: 789954
Change-Id: I06b85282057c361adc9da3f6ee289870ecf0c164
Reviewed-on: https://chromium-review.googlesource.com/802187Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521804}
parent 0e33dbf7
......@@ -177,6 +177,18 @@ public class TextSuggestionMenuTest {
mRule.commitText(textToCommit, 1);
// Wait for renderer to acknowledge commitText().
CriteriaHelper.pollInstrumentationThread(new Criteria() {
@Override
public boolean isSatisfied() {
try {
return DOMUtils.getNodeContents(webContents, "div").equals("hello world");
} catch (InterruptedException | TimeoutException e) {
return false;
}
}
});
DOMUtils.clickNode(cvc, "span");
waitForMenuToShow(cvc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment