PasswordAutofillAgentTest.InlineAutocomplete depends on details of style recalc timing

This CL fixes an incorrect assumption in
PasswordAutofillAgentTest.InlineAutocomplete. Previously, this code assumed
that one trip through the event loop was sufficient to ensure that style was
recalcuated. After we move recalc style to be triggered by
requestAnimationFrame, this assumption will no longer be valid. This CL changes
the test to explicitly recalc style by calling WebView::layout.

Unfortunately, we cannot simply call WebView::layout in straight-line code
because this test does some of its work off the event loop. Instead, we need to
schedule the call to layout after we schedule the other async work.

BUG=337617
R=gcasto@chromium.org

Review URL: https://codereview.chromium.org/136003013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247590 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed