Fix flakiness in PasswordGenerationInteractiveTest.PopupShownAndPasswordSelected

The reason of flakiness is the following:
1.SendKeyToPopup(ui::VKEY_RETURN) initiates sending MOJO message with a
generated password to the renderer.
2.And then immediate GetFieldValue("password_field") runs JavaScript for
extracting of value of password field, which might be not filled yet, depending
on timing of MOJO from 1 and executing JavaScript.

This CL fixes this with the same approach as in
PasswordManagerBrowserTestBase::WaitForElementValue namely waiting for filling
password field value.

The flakiness of this test becomes especially bad after CL
https://chromium-review.googlesource.com/c/chromium/src/+/1146724 . Because
that CL makes renderer part significantly faster, as result the test fails in
about 50% of cases.

Bug: 866444


Change-Id: Ifbe521bf824a1055d9955a7764e5d1cae11307aa
Reviewed-on: https://chromium-review.googlesource.com/1154914
Commit-Queue: Vadym Doroshenko <dvadym@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579073}
1 file changed