| Index: chrome/renderer/autofill/password_autofill_agent_browsertest.cc
|
| diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
|
| index f5eed742853dcf79613ca2e49a01e40f566f2c0c..6a64f21860e68749608af881b31522c0596907a7 100644
|
| --- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
|
| +++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
|
| @@ -262,11 +262,23 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
|
| if (move_caret_to_end)
|
| username_input.setSelectionRange(username.length(), username.length());
|
| autofill_agent_->textFieldDidChange(username_input);
|
| - // Processing is delayed because of a WebKit bug, see
|
| - // PasswordAutocompleteManager::TextDidChangeInTextField() for details.
|
| + // Processing is delayed because of a Blink bug:
|
| + // https://bugs.webkit.org/show_bug.cgi?id=16976
|
| + // See PasswordAutofillAgent::TextDidChangeInTextField() for details.
|
| +
|
| + // Autocomplete will trigger a style recalculation when we put up the next
|
| + // frame, but we don't want to wait that long. Instead, trigger a style
|
| + // recalcuation manually after TextFieldDidChangeImpl runs.
|
| + base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
|
| + &PasswordAutofillAgentTest::LayoutMainFrame, base::Unretained(this)));
|
| +
|
| base::MessageLoop::current()->RunUntilIdle();
|
| }
|
|
|
| + void LayoutMainFrame() {
|
| + GetMainFrame()->view()->layout();
|
| + }
|
| +
|
| void SimulateUsernameChange(const std::string& username,
|
| bool move_caret_to_end) {
|
| SimulateUsernameChangeForElement(username, move_caret_to_end,
|
|
|